reworked selenium connection error message

main
Yuriy 1 year ago
parent 7106ed522f
commit 1c000184df

@ -15,6 +15,7 @@ global CurrentTabURL
global URLOfLastErrorPage global URLOfLastErrorPage
global chromeDLURL64 global chromeDLURL64
global chromedriverDLURL64 global chromedriverDLURL64
global ChromeVersion
; Chrome Related Functions ; Chrome Related Functions

@ -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(){ SaveCurrentChromeVersionToIniFile(){
; Msgbox % "ChromeFilepath: " ChromeFilepath ; Msgbox % "ChromeFilepath: " ChromeFilepath

@ -12,22 +12,43 @@ ShowSeleniumErrorMsgbox(){
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") ; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
OnMessage(0x44, "OnMsgBoxChromeDriverFailed") 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% 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, "") OnMessage(0x44, "")
IfMsgBox Yes, { IfMsgBox Yes, {
; Reload script ; Open Instructions Gitea page
Reload
} if(InStr(A_ScriptName, "Video"))
Else IfMsgBox No, { URL = https://git.freedomainplaylists.com/yuriy/Freedomain-Video-Uploader#installation
run, https://chromedriver.chromium.org/downloads else,
ExitApp URL = https://git.freedomainplaylists.com/yuriy/Freedomain-Social-Media-Poster#installation
; open chromedriver site
} Else IfMsgBox Cancel, { run, %URL%
URL = https://git.freedomainplaylists.com/yuriy/Freedomain-Social-Media-Poster#installation run, "%A_ScriptFullPath%" "LastPost"
run, %url% }
} Else IfMsgBox No, {
ExitApp ; 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------------------------------- ; -------------------------------Tab Navigation & Activation-------------------------------

Loading…
Cancel
Save