From 6f970f33ce8220a180bca229822513c377c3f1f2 Mon Sep 17 00:00:00 2001 From: David Daily Date: Thu, 17 Mar 2022 15:26:06 -0500 Subject: [PATCH] suppress COM errors --- flag.ahk | 1 + 1 file changed, 1 insertion(+) diff --git a/flag.ahk b/flag.ahk index f6e4491..2101508 100644 --- a/flag.ahk +++ b/flag.ahk @@ -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