diff --git a/Chrome-Functions.ahk b/Chrome-Functions.ahk index b581bba..b7ddd07 100644 --- a/Chrome-Functions.ahk +++ b/Chrome-Functions.ahk @@ -15,6 +15,7 @@ global CurrentTabURL global URLOfLastErrorPage global chromeDLURL64 global chromedriverDLURL64 +global ChromeVersion ; Chrome Related Functions diff --git a/General-Functions.ahk b/General-Functions.ahk index 49c5264..efd027f 100644 --- a/General-Functions.ahk +++ b/General-Functions.ahk @@ -383,18 +383,6 @@ OnMsgBoxUpdateAvailable() { } -OnMsgBoxChromeDriverFailed() { - DetectHiddenWindows, On - Process, Exist - If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) { - WinMove,, 0 - ControlSetText Button1, Reload Script - ControlSetText Button2, ChromeDriver - ControlSetText Button3, Instructions - } -} - - SaveCurrentChromeVersionToIniFile(){ ; Msgbox % "ChromeFilepath: " ChromeFilepath diff --git a/Selenium-Functions.ahk b/Selenium-Functions.ahk index 1648ac0..46770ff 100644 --- a/Selenium-Functions.ahk +++ b/Selenium-Functions.ahk @@ -12,22 +12,43 @@ ShowSeleniumErrorMsgbox(){ ; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") OnMessage(0x44, "OnMsgBoxChromeDriverFailed") - MsgBox 0x40043, Error, Failed to Connect to Chrome. `nPossible Causes for this:`n1)One of your tabs is stuck loading/refreshing. (Try closing all tabs) `n2)Chrome has a dialogue box open `n3)ChromeDriver needs to be updated.`n`nClick "Reload" to reload the script to try again`nClick "ChromeDriver" to open up the ChromeDriver download page. `n`nClick "Instructions" to open up the instructions website for updating Chromedriver.`n`nPossibly Helpful Info:`nCurrent Chrome Version: %Chromeversion%Chrome Version of Last Successfull Upload: %PreviousWorkingChromeVersion% - OnMessage(0x44, "") + MsgBox 0x40043, Error, Failed to Connect to Chrome. `nPossible Causes for this:`n1) One of your tabs is stuck loading/refreshing. (Try closing all tabs and restarting) `n2) Chrome has a dialogue box open in one of your tabs. `n3) ChromeDriver needs to be updated.`n`nClick "Restart" to try the Upload again`nClick "ChromeDriver" to open up the ChromeDriver download page. `n`nClick "Instructions" to open up the instructions website for updating Chromedriver.`n`nPossibly Helpful Info:`nCurrent Chrome Version: %Chromeversion% `nChrome Version of Last Successfull Upload: %PreviousWorkingChromeVersion% +OnMessage(0x44, "") - IfMsgBox Yes, { - ; Reload script - Reload - } - Else IfMsgBox No, { - run, https://chromedriver.chromium.org/downloads - ExitApp - ; open chromedriver site - } Else IfMsgBox Cancel, { - URL = https://git.freedomainplaylists.com/yuriy/Freedomain-Social-Media-Poster#installation - run, %url% - } - ExitApp +IfMsgBox Yes, { +; Open Instructions Gitea page + + if(InStr(A_ScriptName, "Video")) + URL = https://git.freedomainplaylists.com/yuriy/Freedomain-Video-Uploader#installation + else, + URL = https://git.freedomainplaylists.com/yuriy/Freedomain-Social-Media-Poster#installation + + run, %URL% + run, "%A_ScriptFullPath%" "LastPost" +} +Else IfMsgBox No, { + ; open chromedriver download page + + run, https://chromedriver.chromium.org/downloads + run, "%A_ScriptFullPath%" "LastPost" + ; open chromedriver site + } Else IfMsgBox Cancel, { + ; Reload with last post + run, "%A_ScriptFullPath%" "LastPost" + } + ExitApp + +} + +OnMsgBoxChromeDriverFailed() { + DetectHiddenWindows, On + Process, Exist + If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) { + WinMove,, 0 + ControlSetText Button1, Instructions + ControlSetText Button2, ChromeDriver + ControlSetText Button3, Restart + } } ; -------------------------------Tab Navigation & Activation-------------------------------