formatting, added reusable lib for update checks

main
Yuriy 7 months ago
parent 8395c5c367
commit d7d3ce039f

@ -153,6 +153,7 @@ DownloadLatestChromium(){
Process, Close, chromedriver.exe
sleep, 5000 ; wait 5 seconds before checking again
continue
}
else,
break

@ -137,6 +137,10 @@ CheckDirExistAndCreate(Path){
; -------------------------------/CheckDirExistAndCreate-------------------------------
; Script Updates
; ------------------------------------------------
CheckIfUpdateAvailable(Filepath, CurrentVersion){
FileRead, ScriptUpdateContents, %Filepath%

@ -0,0 +1,21 @@
; This #include needs to be at the bottom of the parent script
CheckForUpdates:
; The GUI buttons must have variable set to vUpdateAvailable and vChromeUpdateAvailable for button to get updated
; The following variables need to be set in the parent script
; GitReleasesAPIURL
; ChromeFilepath
Message = Checking for Updates
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
if(CheckForUpdates(GitReleasesAPIURL))
GuiControl,,UpdateAvailable, Uploader Update Available!
if(CheckForChromeUpdates(ChromeFilepath)){
GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
ChromeUpdateAvailable := 1
}
Return
Loading…
Cancel
Save