Skip to content

Commit

Permalink
Update check_update.ahk
Browse files Browse the repository at this point in the history
  • Loading branch information
ewerybody committed Apr 14, 2024
1 parent 10c5107 commit 906192c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/cmds/check_update.ahk
Original file line number Diff line number Diff line change
@@ -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, '*')

0 comments on commit 906192c

Please sign in to comment.