fixed broken function, bit o' organization
This commit is contained in:
@@ -375,19 +375,6 @@ Return Var
|
||||
}
|
||||
|
||||
|
||||
|
||||
; OnMsgbox Functions
|
||||
;------------------------------------------------
|
||||
OnMsgBoxUpdateAvailable() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Cancel
|
||||
ControlSetText Button2, Install
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SaveCurrentChromeVersionToIniFile(){
|
||||
|
||||
if(InstalledChromeVersion = "")
|
||||
@@ -427,14 +414,7 @@ HasSubstringVal(haystack, needle)
|
||||
|
||||
; -------------------------------Functions-------------------------------
|
||||
|
||||
OnMsgBoxConfirmChromiumOverwrite() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Cancel
|
||||
ControlSetText Button2, Yes
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; https://www.autohotkey.com/docs/v2/Functions.htm#Variadic
|
||||
Join(sep, params*) {
|
||||
@@ -477,23 +457,6 @@ AddToTotalVideosUploadedCount(){
|
||||
|
||||
|
||||
|
||||
OnMsgBoxPodcastFinish() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
WinMove,, 0
|
||||
}
|
||||
}
|
||||
|
||||
OnMsgBoxSocialMediaPoster() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Yes
|
||||
ControlSetText Button2, Not Now
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Check_For_Stuck_Video_Upload(Index_Number, Upload_Status){
|
||||
@@ -616,8 +579,6 @@ CreateErrorLoggingFiles(Directory := ""){
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
; if passed argument is .exe file, then script has just been updated and we need to delete the old .exe file
|
||||
CheckIfUpdateInstalled(PassedInArgument :=""){
|
||||
|
||||
@@ -631,4 +592,58 @@ CheckIfUpdateInstalled(PassedInArgument :=""){
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; OnMsgbox - Custom Msgbox Screens
|
||||
;------------------------------------------------
|
||||
OnMsgBoxUpdateAvailable() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Cancel
|
||||
ControlSetText Button2, Install
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; Show a user confirmation msgbox with a PROCEED and STOP buttons
|
||||
; Used by the "Confirm before Submit" checkbox
|
||||
OnMsgBoxUserConfirmation() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, PROCEED
|
||||
ControlSetText Button2, STOP
|
||||
}
|
||||
}
|
||||
|
||||
OnMsgBoxConfirmChromiumOverwrite() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Cancel
|
||||
ControlSetText Button2, Yes
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
OnMsgBoxPodcastFinish() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
WinMove,, 0
|
||||
}
|
||||
}
|
||||
|
||||
OnMsgBoxSocialMediaPoster() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Yes
|
||||
ControlSetText Button2, Not Now
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,7 +722,7 @@ Selenium_LoopToSendValueByName(ElementName,NumOfLoops:=1,SleepLength:=1000,Strin
|
||||
|
||||
Selenium_LoopToSendValueToXpath(Xpath,NumOfLoops:=1,SleepLength:=1000,StringTextContent:="",ClearElement:=0){
|
||||
; Msgbox % "StringTextContent: " StringTextContent
|
||||
; Msgbox % "ClearElement: " ClearElement
|
||||
; Msgbox % "ClearElement: " ClearElement
|
||||
|
||||
loop, %NumOfLoops% {
|
||||
; msgbox % ClearElement
|
||||
@@ -834,26 +834,26 @@ SaveDriverURLOFErrorPage(){ ; save the url of the result page. That way if a tab
|
||||
|
||||
GetHTMLValueFromXpathOuterHTML(XPATH, HTMLElementName){
|
||||
|
||||
Try ElementOuterHTML := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
||||
; try Clipboard := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
||||
; Try MsgBox,,Element OuterHTML: `n, % driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
||||
Try ElementOuterHTML := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
||||
; try Clipboard := driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
||||
; Try MsgBox,,Element OuterHTML: `n, % driver.findelementbyxpath(Xpath).Attribute("outerHTML") ;XPATH-ID & Tag
|
||||
|
||||
; Match string between quotes following the HTMLELEMENTNAME
|
||||
RegexStatement = %HTMLElementName%="([^"]+)"
|
||||
; Match string between quotes following the HTMLELEMENTNAME
|
||||
RegexStatement = %HTMLElementName%="([^"]+)"
|
||||
|
||||
; regexMatch := RegExMatch(ElementOuterHTML, "value=""([^""]+)""", match)
|
||||
regexMatch := RegExMatch(ElementOuterHTML, RegexStatement, match)
|
||||
if (regexMatch)
|
||||
{
|
||||
ElementValue := match1
|
||||
; Msgbox % "PostURL: " PostURL
|
||||
; Message = URL Pulled out from OuterHTML: %PostURL%
|
||||
Return ElementValue
|
||||
ElementValue := match1
|
||||
; Msgbox % "PostURL: " PostURL
|
||||
; Message = URL Pulled out from OuterHTML: %PostURL%
|
||||
Return ElementValue
|
||||
}
|
||||
else {
|
||||
Message = Failed to Pull out value from OuterHTML
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return "Failed"
|
||||
Message = Failed to Pull out value from OuterHTML
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return "Failed"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1004,13 +1004,3 @@ OnMsgBoxJSReturnData() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
; Show a user confirmation msgbox with a proceed and STOP buttons
|
||||
; Used by the "Confirm before Submit" checkbox
|
||||
OnMsgBoxUserConfirmation() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, PROCEED
|
||||
ControlSetText Button2, STOP
|
||||
}
|
||||
Reference in New Issue
Block a user