suppress COM errors

This commit is contained in:
David Daily 2022-03-17 15:26:06 -05:00
parent 6a6b8ad9c6
commit 6f970f33ce
1 changed files with 1 additions and 0 deletions

View File

@ -2,6 +2,7 @@ If !(A_Args[1])
{
Exit
}
ComObjError(0) ; makes it not throw errors when it can't reach the IP
msg := "http://RasPi.daily:8888/lights/" . A_Args[1]
req := ComObjCreate("WinHttp.WinHttpRequest.5.1")
req.Open("GET", msg, False) ; Don't need the script to be responsive for anything else, its only doing this. This also makes sure that the request gets sent instead of exiting prematurely