Skip to content

Commit

Permalink
Merge pull request #3 from chriskyfung/new-features
Browse files Browse the repository at this point in the history
Update the URL for Check Update
  • Loading branch information
Chris K.Y. FUNG authored Apr 22, 2021
2 parents c3d8af9 + bc69a5f commit b4bf1e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Windows-Hotkey-for-iFlyVoice/src/Win-Hotkey-for-iFlyVoice.ahk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CodeVersion := "3.1.0", copyright := "chriskyfung.github.io" ; // Declare the Current Version and state the copyright
CodeVersion := "3.0.3", copyright := "chriskyfung.github.io" ; // Declare the Current Version and state the copyright
;@Ahk2Exe-Let version = %A_PriorLine~U)^(.+"){1}(.+)".*$~$2% ; // Extract the version number (=> x.x.x) from the Prior Line

UiLang := "en-US"
Expand Down Expand Up @@ -112,14 +112,14 @@ CheckUpdate:
; // Initialize the WinHttpRequest Object
WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
; // Download the JSON-formatted release data from GitHub API
WebRequest.Open("GET", "https://api.github.com/repos/chriskyfung/voice-input-tools-for-windows/releases/latest")
WebRequest.Open("GET", "https://api.github.com/repos/chriskyfung/Agile-Win-Hotkey-for-iFlyVoice/releases/latest")
WebRequest.Send()
; // Use Regex to extract the latest version number
RegExMatch(WebRequest.ResponseText, "O)""tag_name"":""v(?<ver>[0-9a-zA-Z\.]+)""", SubPat)
LatestVersion := SubPat["ver"]
; // Compare the version numbers
if (Util_VersionCompare(LatestVersion,CodeVersion)) {
Run, https://github.com/chriskyfung/voice-input-tools-for-windows/releases/latest
Run, https://github.com/chriskyfung/Agile-Win-Hotkey-for-iFlyVoice/releases/latest
} else {
MsgBox % RegStr.Msg.CurrentVersion . ": v" . CodeVersion . "`n`n" . RegStr.Msg.ThisIsLastVersion
}
Expand Down

0 comments on commit b4bf1e0

Please sign in to comment.