|
|
@ -49,9 +49,12 @@ FullScriptName := ScriptName . " " . ScriptVersion
|
|
|
|
; @todo: Errorlog not getting appended to on > 1 run (ErrorLoggingFilePath) variable is missing somehwere
|
|
|
|
; @todo: Errorlog not getting appended to on > 1 run (ErrorLoggingFilePath) variable is missing somehwere
|
|
|
|
; @todo: Add tags support on all sites that support it - ask stef is useful
|
|
|
|
; @todo: Add tags support on all sites that support it - ask stef is useful
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Misc info
|
|
|
|
; Misc info
|
|
|
|
;------------------------------------------------
|
|
|
|
;------------------------------------------------
|
|
|
|
; Parler has a 1k char limit
|
|
|
|
; Parler has a 1k char limit
|
|
|
|
|
|
|
|
; All post submits: mark with "Post Submit Successful" OR "Post Submit Failed" for easier reading of errorlogs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;---Global Variables---
|
|
|
|
;---Global Variables---
|
|
|
@ -1253,7 +1256,7 @@ if(ImageAttachmentFilepath != ""){
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, Discord
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, Discord
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1362,7 +1365,7 @@ TelegramBody := ASCIISTRReplace(PostBody)
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, Telegram
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, Telegram
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1552,9 +1555,10 @@ if(Status){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, Facebook
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, Facebook
|
|
|
|
|
|
|
|
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Post Publish Successful
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PauseBetweenPosts()
|
|
|
|
PauseBetweenPosts()
|
|
|
@ -1886,7 +1890,7 @@ if(ImageAttachmentFilepath != ""){
|
|
|
|
|
|
|
|
|
|
|
|
PauseBetweenPosts()
|
|
|
|
PauseBetweenPosts()
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
Return
|
|
|
|
Return
|
|
|
@ -2117,7 +2121,7 @@ loop, 3 {
|
|
|
|
PauseBetweenPosts()
|
|
|
|
PauseBetweenPosts()
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2364,7 +2368,7 @@ loop, 3 {
|
|
|
|
PauseBetweenPosts()
|
|
|
|
PauseBetweenPosts()
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2493,13 +2497,14 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
try driver.executeScript(js)
|
|
|
|
try driver.executeScript(js)
|
|
|
|
|
|
|
|
|
|
|
|
Message = Double checking that post got submitted
|
|
|
|
Message = Double checking that post got submitted
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
sleep, 5000
|
|
|
|
sleep, 5000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try CurrentTabURL := driver.Url
|
|
|
|
try CurrentTabURL := driver.Url
|
|
|
|
if(InStr(CurrentTabURL, "share/post")) { ; post failed to submit if it's still on the create new post page
|
|
|
|
if(InStr(CurrentTabURL, "share/post")) { ; post failed to submit if it's still on the create new post page
|
|
|
|
Message = Error: Post Failed to Submit. Please check tab for reason.
|
|
|
|
Message = Error: Post Was Input but Failed to Submit.
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
Return
|
|
|
|
Return
|
|
|
@ -2527,7 +2532,7 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
PauseBetweenPosts()
|
|
|
|
PauseBetweenPosts()
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2535,229 +2540,231 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
Return
|
|
|
|
Return
|
|
|
|
; -------------------------------/Locals-------------------------------
|
|
|
|
; -------------------------------/Locals-------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
; -------------------------------Gab-------------------------------
|
|
|
|
; -------------------------------Gab-------------------------------
|
|
|
|
PostToGab:
|
|
|
|
PostToGab:
|
|
|
|
CurrentSite := "Gab"
|
|
|
|
CurrentSite := "Gab"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Navigating to Post Creation Page",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:="Navigating to Post Creation Page",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GabPostURL = https://gab.com/compose
|
|
|
|
GabPostURL = https://gab.com/compose
|
|
|
|
URLAttempt := NavigateFromBaseURLTo(GabPostURL)
|
|
|
|
URLAttempt := NavigateFromBaseURLTo(GabPostURL)
|
|
|
|
if(URLAttempt = "Failed")
|
|
|
|
if(URLAttempt = "Failed")
|
|
|
|
Return
|
|
|
|
Return
|
|
|
|
|
|
|
|
|
|
|
|
Status := CheckCurrentTabForCurrentSite()
|
|
|
|
Status := CheckCurrentTabForCurrentSite()
|
|
|
|
if(Status){
|
|
|
|
if(Status){
|
|
|
|
Return
|
|
|
|
Return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sleep, 1000
|
|
|
|
sleep, 1000
|
|
|
|
Message = Checking Login Status
|
|
|
|
Message = Checking Login Status
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Message = Inputting Post
|
|
|
|
; Message = Inputting Post
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Checking Login Status",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
SaveOrPostProgress(Message:="Checking Login Status",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
; New post input box
|
|
|
|
; New post input box
|
|
|
|
Xpath = //div[@data-block='true']//div
|
|
|
|
Xpath = //div[@data-block='true']//div
|
|
|
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
|
|
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
|
|
|
if(Status){
|
|
|
|
if(Status){
|
|
|
|
SaveOrPostProgress(Message:="Login Expired",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
SaveOrPostProgress(Message:="Login Expired",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
driver.Get("https://gab.com/auth/sign_in") ;go to login page
|
|
|
|
driver.Get("https://gab.com/auth/sign_in") ;go to login page
|
|
|
|
driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
|
|
|
driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
|
|
|
|
|
|
|
|
|
|
|
if(AutoLogin){
|
|
|
|
if(AutoLogin){
|
|
|
|
SaveOrPostProgress(Message:="Checking if chrome input email address",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
SaveOrPostProgress(Message:="Checking if chrome input email address",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
js = return document.querySelector("#user_email").value;
|
|
|
|
js = return document.querySelector("#user_email").value;
|
|
|
|
|
|
|
|
status := driver.executeScript(js)
|
|
|
|
|
|
|
|
if(StrLen(Status) > 0){
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Clicking Login Button",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
js = document.querySelector("button[name='button']").click()
|
|
|
|
status := driver.executeScript(js)
|
|
|
|
status := driver.executeScript(js)
|
|
|
|
if(StrLen(Status) > 0){
|
|
|
|
return
|
|
|
|
SaveOrPostProgress(Message:="Clicking Login Button",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
js = document.querySelector("button[name='button']").click()
|
|
|
|
|
|
|
|
status := driver.executeScript(js)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else, {
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Login Expired. Please log back in",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
|
|
|
|
Return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Inputting Post
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ImageAttachmentFilepath != ""){
|
|
|
|
|
|
|
|
; Click the upload image button
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Attaching Image First",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Xpath = //input[@type='file']
|
|
|
|
|
|
|
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=ImageAttachmentFilepath)
|
|
|
|
|
|
|
|
if(Status){
|
|
|
|
|
|
|
|
Message = Failed to attach Image
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
|
|
|
|
Return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Waiting 10 seconds for Image to finish uploading",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sleep, 10000
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else, {
|
|
|
|
Xpath = //div[@data-block='true']//div
|
|
|
|
|
|
|
|
Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
|
|
|
|
|
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000,SendKeysContent:=PostTitleAndBody)
|
|
|
|
|
|
|
|
if(Status){
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Login Expired. Please log back in",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:="Login Expired. Please log back in",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
Return
|
|
|
|
Return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Inputting Post
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
; Click the final "post" button
|
|
|
|
if(ImageAttachmentFilepath != ""){
|
|
|
|
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
; Click the upload image button
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Attaching Image First",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
Xpath = //*[@id="gabsocial"]/div/div[2]/div[2]/main/div/div[3]/div/div
|
|
|
|
Xpath = //input[@type='file']
|
|
|
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=2000)
|
|
|
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=ImageAttachmentFilepath)
|
|
|
|
if(Status){
|
|
|
|
if(Status){
|
|
|
|
Message = Failed to Submit Post
|
|
|
|
Message = Failed to attach Image
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
Return
|
|
|
|
Return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, Gab
|
|
|
|
SaveOrPostProgress(Message:="Waiting 10 seconds for Image to finish uploading",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sleep, 10000
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Xpath = //div[@data-block='true']//div
|
|
|
|
|
|
|
|
Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
|
|
|
|
|
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000,SendKeysContent:=PostTitleAndBody)
|
|
|
|
|
|
|
|
if(Status){
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Login Expired. Please log back in",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
|
|
|
|
Return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
|
|
|
|
|
|
|
PauseBetweenPosts()
|
|
|
|
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
; Click the final "post" button
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Xpath = //*[@id="gabsocial"]/div/div[2]/div[2]/main/div/div[3]/div/div
|
|
|
|
|
|
|
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=2000)
|
|
|
|
|
|
|
|
if(Status){
|
|
|
|
|
|
|
|
Message = Failed to Submit Post
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
Return
|
|
|
|
Return
|
|
|
|
; -------------------------------/Gab-------------------------------
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, Gab
|
|
|
|
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
|
|
|
|
|
|
|
|
; -------------------------------Bastyon-------------------------------
|
|
|
|
|
|
|
|
PostToPocketNet:
|
|
|
|
|
|
|
|
CurrentSite := "Bastyon"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Navigating to Post Creation Page",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
PauseBetweenPosts()
|
|
|
|
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
URLAttempt := NavigateFromBaseURLTo("https://bastyon.com/index")
|
|
|
|
Message = Post Publish Successful
|
|
|
|
if(URLAttempt = "Failed")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
Return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Status := CheckCurrentTabForCurrentSite()
|
|
|
|
Return
|
|
|
|
if(Status){
|
|
|
|
; -------------------------------/Gab-------------------------------
|
|
|
|
Return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
; Loop a bunch of times for page to load
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Waiting for Page to Load Fully",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
loop, 12 {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; click into input box
|
|
|
|
|
|
|
|
js = document.querySelector(".emojionearea-editor.pastable").click()
|
|
|
|
|
|
|
|
try driver.executeScript(js)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Xpath = //div[@class='emojionearea-editor pastable']
|
|
|
|
; -------------------------------Bastyon-------------------------------
|
|
|
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=5000)
|
|
|
|
PostToPocketNet:
|
|
|
|
if(!Status)
|
|
|
|
CurrentSite := "Bastyon"
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Xpath = //b[normalize-space()='Sign in']
|
|
|
|
|
|
|
|
try Status := driver.findelementbyxpath(Xpath).Attribute("textContent") ;XPath: ID=site-title & span tag
|
|
|
|
|
|
|
|
if(InStr(Status, "Sign in")){
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Msgbox % "Status: " Status
|
|
|
|
SaveOrPostProgress(Message:="Navigating to Post Creation Page",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
}
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
if(Status){ ; if failed to click into entry box
|
|
|
|
|
|
|
|
Message = Login Expired. Please log back in
|
|
|
|
URLAttempt := NavigateFromBaseURLTo("https://bastyon.com/index")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
if(URLAttempt = "Failed")
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
Return
|
|
|
|
Return
|
|
|
|
|
|
|
|
|
|
|
|
Status := CheckCurrentTabForCurrentSite()
|
|
|
|
|
|
|
|
if(Status){
|
|
|
|
|
|
|
|
Return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
; Loop a bunch of times for page to load
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:="Waiting for Page to Load Fully",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
loop, 12 {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; click into input box
|
|
|
|
|
|
|
|
js = document.querySelector(".emojionearea-editor.pastable").click()
|
|
|
|
|
|
|
|
try driver.executeScript(js)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Xpath = //div[@class='emojionearea-editor pastable']
|
|
|
|
|
|
|
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=5000)
|
|
|
|
|
|
|
|
if(!Status)
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Xpath = //b[normalize-space()='Sign in']
|
|
|
|
|
|
|
|
try Status := driver.findelementbyxpath(Xpath).Attribute("textContent") ;XPath: ID=site-title & span tag
|
|
|
|
|
|
|
|
if(InStr(Status, "Sign in")){
|
|
|
|
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Msgbox % "Status: " Status
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(Status){ ; if failed to click into entry box
|
|
|
|
|
|
|
|
Message = Login Expired. Please log back in
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
|
|
|
|
Return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Clearing Previous Post Content
|
|
|
|
Message = Clearing Previous Post Content
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
js = document.querySelector("div[title='Clear post'] i[class='fas fa-times-circle']").click()
|
|
|
|
js = document.querySelector("div[title='Clear post'] i[class='fas fa-times-circle']").click()
|
|
|
|
try driver.executeScript(js)
|
|
|
|
try driver.executeScript(js)
|
|
|
|
|
|
|
|
|
|
|
|
sleep, 1000
|
|
|
|
sleep, 1000
|
|
|
|
|
|
|
|
|
|
|
|
js = document.querySelector(".btn1.medium").click()
|
|
|
|
js = document.querySelector(".btn1.medium").click()
|
|
|
|
try driver.executeScript(js)
|
|
|
|
try driver.executeScript(js)
|
|
|
|
|
|
|
|
|
|
|
|
sleep, 1000
|
|
|
|
sleep, 1000
|
|
|
|
|
|
|
|
|
|
|
|
; msgbox
|
|
|
|
; msgbox
|
|
|
|
|
|
|
|
|
|
|
|
; input post text content
|
|
|
|
; input post text content
|
|
|
|
Message = Inputting Post Content
|
|
|
|
Message = Inputting Post Content
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
JsToExecute = document.getElementsByClassName('emojionearea-editor pastable')[0].innerText = '%JSPostTitleAndBody%'
|
|
|
|
JsToExecute = document.getElementsByClassName('emojionearea-editor pastable')[0].innerText = '%JSPostTitleAndBody%'
|
|
|
|
Status := JS_TryToExecute(JsToExecute)
|
|
|
|
Status := JS_TryToExecute(JsToExecute)
|
|
|
|
if(Status){
|
|
|
|
if(Status){
|
|
|
|
Message = Post Failed: Check Login Status
|
|
|
|
Message = Post Failed: Check Login Status
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
Return
|
|
|
|
Return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
JsToExecute = return document.getElementsByClassName('emojionearea-editor pastable')[0].textContent;
|
|
|
|
JsToExecute = return document.getElementsByClassName('emojionearea-editor pastable')[0].textContent;
|
|
|
|
try Status := driver.executeScript(JsToExecute)
|
|
|
|
try Status := driver.executeScript(JsToExecute)
|
|
|
|
if(Status = ""){
|
|
|
|
if(Status = ""){
|
|
|
|
Message = Post Failed: Check Login Status
|
|
|
|
Message = Post Failed: Check Login Status
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
SaveDriverURLOFErrorPage()
|
|
|
|
Return
|
|
|
|
Return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
; Message = Post that got input: %Status%
|
|
|
|
; Message = Post that got input: %Status%
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
; DevModeMsgBox(Message)
|
|
|
|
; DevModeMsgBox(Message)
|
|
|
|
; msgbox % "textContent: " . textContent
|
|
|
|
; msgbox % "textContent: " . textContent
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Doesn't work for some reason
|
|
|
|
; Doesn't work for some reason
|
|
|
|
; JsToExecute = return document.querySelector("div.txt div.emojionearea.message div.emojionearea-editor.pastable").innerText
|
|
|
|
; JsToExecute = return document.querySelector("div.txt div.emojionearea.message div.emojionearea-editor.pastable").innerText
|
|
|
|
; Status := JS_TryToExecute(JsToExecute)
|
|
|
|
; Status := JS_TryToExecute(JsToExecute)
|
|
|
|
; if(Status){
|
|
|
|
; if(Status){
|
|
|
|
; Message = Check Login Status: Failed to Input Post
|
|
|
|
; Message = Check Login Status: Failed to Input Post
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
|
|
; Return
|
|
|
|
; Return
|
|
|
|
; }
|
|
|
|
; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sleep, 2000
|
|
|
|
sleep, 2000
|
|
|
|
|
|
|
|
|
|
|
|
if(ImageAttachmentFilepath != ""){
|
|
|
|
if(ImageAttachmentFilepath != ""){
|
|
|
|
; Message = Attaching Image
|
|
|
|
; Message = Attaching Image
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
|
|
|
|
|
|
|
|
|
|
|
; Click the "Image" button
|
|
|
|
; Click the "Image" button
|
|
|
|
SaveOrPostProgress(Message:="Attaching Image",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
SaveOrPostProgress(Message:="Attaching Image",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
/* Xpath = //div[@title='Add Images to Post']
|
|
|
|
/* Xpath = //div[@title='Add Images to Post']
|
|
|
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
|
|
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
|
|
|
if(Status){
|
|
|
|
if(Status){
|
|
|
@ -2904,7 +2911,7 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
PauseBetweenPosts()
|
|
|
|
PauseBetweenPosts()
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -3099,7 +3106,7 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
PauseBetweenPosts()
|
|
|
|
PauseBetweenPosts()
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -3223,6 +3230,9 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Post Publish Successful
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, gettr
|
|
|
|
IniWrite, Successful, %StatusFileFilePath%, Status, gettr
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
AddToTotalPostsPostedCount()
|
|
|
|
|
|
|
|
|
|
|
@ -3363,7 +3373,7 @@ PauseBetweenPosts()
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -3516,7 +3526,7 @@ AddToTotalPostsPostedCount()
|
|
|
|
PauseBetweenPosts()
|
|
|
|
PauseBetweenPosts()
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -3671,7 +3681,7 @@ PauseBetweenPosts()
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -3868,7 +3878,7 @@ PauseBetweenPosts()
|
|
|
|
; try driver.switchToalert().accept()
|
|
|
|
; try driver.switchToalert().accept()
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
DevModeMsgBox("done!")
|
|
|
|
|
|
|
|
|
|
|
|
Message = Submitted Successfully
|
|
|
|
Message = Post Publish Successful
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|