diff --git a/Chrome-Functions.ahk b/Chrome-Functions.ahk index f3d417f..5a19ce7 100644 --- a/Chrome-Functions.ahk +++ b/Chrome-Functions.ahk @@ -153,6 +153,7 @@ DownloadLatestChromium(){ Process, Close, chromedriver.exe sleep, 5000 ; wait 5 seconds before checking again + continue } else, break diff --git a/General-Functions.ahk b/General-Functions.ahk index 835f6f2..09b7913 100644 --- a/General-Functions.ahk +++ b/General-Functions.ahk @@ -137,6 +137,10 @@ CheckDirExistAndCreate(Path){ ; -------------------------------/CheckDirExistAndCreate------------------------------- +; Script Updates +; ------------------------------------------------ + + CheckIfUpdateAvailable(Filepath, CurrentVersion){ FileRead, ScriptUpdateContents, %Filepath% diff --git a/Update-Functions.ahk b/Update-Functions.ahk new file mode 100644 index 0000000..f4a3069 --- /dev/null +++ b/Update-Functions.ahk @@ -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 \ No newline at end of file