"send webhook vbscript" Code Answer's

You're definitely familiar with the best coding language VBA that developers use to develop their projects and they get all their queries like "send webhook vbscript" answered properly. Developers are finding an appropriate answer about send webhook vbscript related to the VBA coding language. By visiting this online portal developers get answers concerning VBA codes question like send webhook vbscript. Enter your desired code related query in the search bar and get every piece of information about VBA code related question on send webhook vbscript. 

send webhook vbscript

By the person who googles for every little problemthe person who googles for every little problem on Mar 08, 2020
Dim time
user = CreateObject("WScript.Network").UserName
time = (FormatDateTime(Now, 2)& " "& FormatDateTime(Now, 4))
Set objFileToRead = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\Users\"& user& "\Desktop\state.txt",1)
state = objFileToRead.ReadAll()
objFileToRead.Close
Set objFileToRead = Nothing
url = "" 'my discord webhook
avatar = "https://discordapp.com/assets/dd4dbc0016779df1378e7812eabaa04d.png"
req1 = ("{ \" & Chr(34) & "username\" & Chr(34) & ":\" & Chr(34) & _
       "Manage bot\" & Chr(34) & ", \" & Chr(34) & "avatar_url\" & Chr(34) & _
       ":\" & Chr(34) & avatar)
req2 = Chr(34) & ", \" & Chr(34) & "content\" & Chr(34) & ":\" & Chr(34) & _
       time & " " & user & Chr(13) + Chr(10) & state & Chr(34) & " }"
Set oHTTP = CreateObject("Microsoft.XMLHTTP")
oHTTP.Open "POST", url, False
oHTTP.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
oHTTP.SetRequestHeader "Content-Length", Len(req1+req2)
oHTTP.Send req1+req2
HTTPPost = oHTTP.ResponseText
MsgBox oHTTP.ResponseText

Source: stackoverflow.com

Add Comment

0

All those coders who are working on the VBA based application and are stuck on send webhook vbscript can get a collection of related answers to their query. Programmers need to enter their query on send webhook vbscript related to VBA code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about send webhook vbscript for the programmers working on VBA code while coding their module. Coders are also allowed to rectify already present answers of send webhook vbscript while working on the VBA language code. Developers can add up suggestions if they deem fit any other answer relating to "send webhook vbscript". Visit this developer's friendly online web community, CodeProZone, and get your queries like send webhook vbscript resolved professionally and stay updated to the latest VBA updates. 

VBA answers related to "send webhook vbscript"

View All VBA queries

VBA queries related to "send webhook vbscript"

Browse Other Code Languages

CodeProZone