diff --git a/Freedomain Video Uploader.ahk b/Freedomain Video Uploader.ahk index a9e2009..d669840 100644 --- a/Freedomain Video Uploader.ahk +++ b/Freedomain Video Uploader.ahk @@ -29,7 +29,7 @@ global ScriptVersion global FullScriptName ScriptName = Freedomain Video Uploader -ScriptVersion = 3.0 +ScriptVersion = 3.1 FullScriptName := ScriptName . " - " . ScriptVersion @@ -553,6 +553,22 @@ else, { SecondaryButtonHeights := 35 } + + + +;---Check for Update--- +;------------------------------------------------ +if(AutoUpdateCheck AND !UpdateAvailable){ + ; DevModeMsgBox("checking for updates") + ; msgbox, checkin for update + ; DevModeMsgBox(GitReleasesAPIURL) + UpdateAvailable := CheckForUpdates(GitReleasesAPIURL) +} + +; DevModeMsgBox(AutoUpdateCheck) +; DevModeMsgBox(UpdateAvailable) + + ; -------------------------------GUI------------------------------- Gui, Font, s%GuiFontSize% @@ -784,16 +800,6 @@ if(SkipToDBInfo){ IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost - -;---Check for Update--- -;------------------------------------------------ - -if(AutoUpdateCheck AND !UpdateAvailable And !SkipUpdateCheckThisRun){ - ; msgbox, checkin for update - ; DevModeMsgBox(GitReleasesAPIURL) - CheckForUpdates(GitReleasesAPIURL) -} - Return ; -------------------------------GUI GoSubs------------------------------- diff --git a/Lib/SharedFunctions.ahk b/Lib/SharedFunctions.ahk index 2ea4f00..b2e6f9f 100644 --- a/Lib/SharedFunctions.ahk +++ b/Lib/SharedFunctions.ahk @@ -37,21 +37,22 @@ CheckForUpdates(GitReleasesAPIURL){ UpdateVersionNumber := parsed.1.name - ; DevModeMsgBox(UpdateVersionNumber) + Message = UpdateVersionNumber: %UpdateVersionNumber% + DevModeMsgBox(Message) if(ScriptVersion = UpdateVersionNumber OR ScriptVersion > UpdateVersionNumber){ - ToolTip - return - } - else, { + ToolTip + return 0 + } + else, { UpdateAvailable := 1 ; msgbox, update found! Message = Program Update Found SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile") ; IniWrite, 1, %SettingsIniFilepath%, %ScriptSettingsSection%, UpdateAvailable ; ToolTip - return + return 1 } } @@ -153,11 +154,11 @@ TakeScreenshotOfPage(SaveFilepath := ""){ ; sleep, 5000 if(SaveFilepath = ""){ - SaveFilepath := ErrorLoggingDirectory - } + SaveFilepath := ErrorLoggingDirectory + } - ; if(!FileExist(SaveFilepath)) - FileCreateDir, %SaveFilepath% + ; if(!FileExist(SaveFilepath)) + FileCreateDir, %SaveFilepath% /* if(!TakeScreenshotsOfErrors) Return @@ -969,14 +970,14 @@ ActivateChromeTab(URL){ ; NumberOfTabLoops := Driver.Windows.Count + 2 loop % NumberOfTabActivationLoops { ; loop through tabs to find matching tab - try driver.SwitchToNextWindow() + try driver.SwitchToNextWindow() - ; sleep, 1000 - ; msgbox, looping through tabs - try CurrentTabTitle := driver.window.title - try CurrentTabURL := driver.Url + ; sleep, 1000 + ; msgbox, looping through tabs + try CurrentTabTitle := driver.window.title + try CurrentTabURL := driver.Url - if(InStr(CurrentTabURL, URLBase)){ + if(InStr(CurrentTabURL, URLBase)){ Message = Found Tab:.`n%CurrentTabTitle% = %PageTitle%`n%CurrentTabURL% = %URLBase% DevModeMsgBox(message)