Push notifications when your compile finishes

From Valve Developer Community
Revision as of 19:17, 21 December 2020 by 9yz (talk | contribs) (Created page with "PAGE WIP, DON"T DELETE PLOX right|thumb|300px|Press "New" then add the path to your .exe (with the .exe name) in the commands window. <pre>PB_Tok...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PAGE WIP, DON"T DELETE PLOX


Press "New" then add the path to your .exe (with the .exe name) in the commands window.


PB_Token   := "YOUR TOKEN HERE"
PB_Title   := "Compile Done"
PB_Message := "Come back!"

MsgBox % PB_PushNote(PB_Token, PB_Title, PB_Message)

PB_PushNote(PB_Token, PB_Title, PB_Message)
{
	WinHTTP := ComObjCreate("WinHTTP.WinHttpRequest.5.1")
	WinHTTP.SetProxy(0)
	WinHTTP.Open("POST", "https://api.pushbullet.com/v2/pushes", 0)
	WinHTTP.SetCredentials(PB_Token, "", 0)
	WinHTTP.SetRequestHeader("Content-Type", "application/json")
	PB_Body := "{""type"": ""note"", ""title"": """ PB_Title """, ""body"": """ PB_Message """}"
	WinHTTP.Send(PB_Body)
	Result := WinHTTP.ResponseText
	Status := WinHTTP.Status
	return Status
}
Exit