reworked selenium connection error message

main
Yuriy 1 year ago
parent 7106ed522f
commit 1c000184df

@ -15,6 +15,7 @@ global CurrentTabURL
global URLOfLastErrorPage
global chromeDLURL64
global chromedriverDLURL64
global ChromeVersion
; 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(){
; Msgbox % "ChromeFilepath: " ChromeFilepath

@ -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%
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
; 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
ExitApp
run, "%A_ScriptFullPath%" "LastPost"
; open chromedriver site
} Else IfMsgBox Cancel, {
URL = https://git.freedomainplaylists.com/yuriy/Freedomain-Social-Media-Poster#installation
run, %url%
; 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-------------------------------

Loading…
Cancel
Save