Update 'Modules/Post-To-Bastyon.ahk'

Added error handling to failed tag input
main
Yuriy 11 months ago committed by Freedomain Development
parent 1880170b07
commit 9b506a8f73
Signed by: Freedomain Development
GPG Key ID: BAC4E7BB5476F65A

@ -148,47 +148,17 @@ if(Status = ""){
DevModeMsgBox(Tag)
; Tag = %Tag%
Xpath = //input[@placeholder='Categories and tags']
driver.FindElementByXPath(Xpath).SendKeys(Tag)
driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.ENTER)
try driver.FindElementByXPath(Xpath).SendKeys(Tag)
catch e {
Message = Failed to input tag: %tag%
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
}
; driver.findElementsByClass("sminput").item[2].click()
; JsToExecute = document.querySelector("#text[placeholder='Add Categories/Tags']").value = "#%Tag%"
; Status := JS_TryToExecute(JsToExecute)
;
; driver.SendKeys(driver.Keys.SPACE)
;
; JsToExecute = return document.querySelector("#text[placeholder='Add Categories/Tags']").value
; Status := JS_TryToExecute(JsToExecute)
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.ENTER)
if(A_index = 5)
Break
/*Tag := TagsArray[A_Index]
Tag := StrReplace(Tag, " ", "")
; Tag = %Tag%
Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000,SendKeysContent:=Tag)
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.Space)
*/
; if(A_index = 8) ; Steemit only allows 8 tags
; Break
}
; msgbox
/* Xpath = //div[@class='emojionearea-editor pastable']
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=3,SleepLength:=1000,StringTextContent:=PostTitleAndBody)
if(Status){
SaveOrPostProgress(Message:="Failed to Input Post",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
; Send,
}
*/
; Msgbox,4096,Pause!!,asdf
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")

Loading…
Cancel
Save