diff --git a/lib/cmds/check_update.ahk b/lib/cmds/check_update.ahk index 3787e065..4d118882 100644 --- a/lib/cmds/check_update.ahk +++ b/lib/cmds/check_update.ahk @@ -1,11 +1,13 @@ ; check_update - Returns 1 if there is a different Autohotkey version online! -update_url := "https://autohotkey.com/download/1.1/version.txt" -whr := ComObjCreate("WinHttp.WinHttpRequest.5.1") +update_url := "https://autohotkey.com/download/2.0/version.txt" +whr := ComObject("WinHttp.WinHttpRequest.5.1") whr.Open("GET", update_url, false) whr.Send() whr.WaitForResponse() version := whr.ResponseText if (version == A_AhkVersion) - FileAppend, 0, * + result := 0 else - FileAppend, 1, * + result := 1 + +FileAppend(result, '*') \ No newline at end of file