Added a couple more error checks to Chrome Tab switching function

main
Yuriy 2 years ago
parent 6f2bc24753
commit 8b23cee3e9

@ -40,7 +40,7 @@ global UpdateVersionNumber
ScriptName = Freedomain Social Media Poster
ScriptVersion = 2.75
ScriptVersion = 2.76
FullScriptName := ScriptName . " " . ScriptVersion
;---ToDo---
@ -1561,6 +1561,8 @@ Return
;---------------/Facebook----------------------------------
/*
*/
; -------------------------------Parler-------------------------------
PostToParler:
@ -1887,7 +1889,8 @@ if(ImageAttachmentFilepath != ""){
Return
; -------------------------------/SubScribeStar-------------------------------
/*
*/
; -------------------------------LinkedIn-------------------------------
PostToLinkedIN:
@ -2118,6 +2121,8 @@ if(ImageAttachmentFilepath != ""){
Return
; -------------------------------/LinkedIn-------------------------------
/*
*/
; -------------------------------Minds-------------------------------
PostToMinds:
@ -2261,13 +2266,14 @@ if(ImageAttachmentFilepath != ""){
Return
}
}
} else, { ; otherwise, input just text
}
else, { ; otherwise, input just text
SaveOrPostProgress(Message:="Inputting Text Post",PostType:="Tooltip,ErrorLoggingTextFile")
; DevModeMsgBox("Inputting Text Post")
Xpath = //textarea[@id='minds-m-composer__textarea--1003']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PostTitleAndBody)
DevModeMsgBox("done")
if(Status){
Message = Failed to post with Xpath, trying with ID
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
@ -2305,7 +2311,8 @@ if(ImageAttachmentFilepath != ""){
js = document.querySelector("button[class='m-button m-button--blue m-button--small m-button--dropdown'] span[class='ng-star-inserted']").click();
try status := driver.executeScript(js)
catch e {
Msgbox % "status: " status
Message = Clicking submit button with JS resulted in status: %status%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
}
@ -2361,6 +2368,9 @@ if(ImageAttachmentFilepath != ""){
Return
; -------------------------------/Minds-------------------------------
/*
*/
; -------------------------------Locals-------------------------------
PostToLocals:
CurrentSite := "Locals"
@ -2368,9 +2378,15 @@ if(ImageAttachmentFilepath != ""){
; @todo: Add auto-login to locals
SaveOrPostProgress(Message:="Navigating to Post Creation Page",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
IniRead, LocalsURL, %SettingsIniFilepath%, %ScriptSettingsSection%, LocalsURL
Message = LocalsURL from Ini File: %LocalsURL%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
IniRead, LocalsURL, %SettingsIniFilepath%, %ScriptSettingsSection%, LocalsURL, %A_Space%
if(LocalsURL = ""){
Message = Please add your Locals Profile URL to the settings.ini file under`n`n[General]`nLocalsURL=
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; Message = LocalsURL from Ini File: %LocalsURL%
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; LocalsURL := StrReplace(Localsurl, "/share/post", "")
; LocalsURL := Localsurl . "/login"

@ -1 +1 @@
Subproject commit f056489f509d570de33c67e023e3edc5296fe3ac
Subproject commit 8a4c74ffafc09cdc5c7eebca06e4e9da2a71e79c
Loading…
Cancel
Save