added workaround to paste formatting bug, added confirmation setting and implemented check on all selenium sites
This commit is contained in:
@@ -139,6 +139,7 @@ IniRead, TelegramBotChatID, %SettingsIniFilepath%, SocialMediaPoster, TelegramBo
|
|||||||
IniRead, DiscordErrorLoggingWebhookBotURL, %SettingsIniFilepath%, SocialMediaPoster, DiscordErrorLoggingWebhookBotURL, %A_Space%
|
IniRead, DiscordErrorLoggingWebhookBotURL, %SettingsIniFilepath%, SocialMediaPoster, DiscordErrorLoggingWebhookBotURL, %A_Space%
|
||||||
IniRead, DiscordParlerWebhookURL, %SettingsIniFilepath%, SocialMediaPoster, DiscordParlerWebhookURL, %A_Space%
|
IniRead, DiscordParlerWebhookURL, %SettingsIniFilepath%, SocialMediaPoster, DiscordParlerWebhookURL, %A_Space%
|
||||||
IniRead, ChromeFilepath, %SettingsIniFilepath%, SocialMediaPoster, ChromeFilepath, %A_Space%
|
IniRead, ChromeFilepath, %SettingsIniFilepath%, SocialMediaPoster, ChromeFilepath, %A_Space%
|
||||||
|
IniRead, ConfirmBeforeSubmit, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit, 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -280,10 +281,6 @@ if(StrLen(ErrorLoggingDirectory) > 5 and !InStr(ErrorLoggingDirectory, ".exe")){
|
|||||||
; Append bitchute url to bottom of description
|
; Append bitchute url to bottom of description
|
||||||
PostBody := PostBody . "`n`n" . PodcastURL . VideoURL
|
PostBody := PostBody . "`n`n" . PodcastURL . VideoURL
|
||||||
|
|
||||||
; Msgbox % "PostTitle: " PostTitle
|
|
||||||
; Msgbox % "PostBody: " PostBody
|
|
||||||
|
|
||||||
|
|
||||||
Discord := 0
|
Discord := 0
|
||||||
Telegram := 0
|
Telegram := 0
|
||||||
}
|
}
|
||||||
@@ -314,12 +311,7 @@ if(StrLen(ErrorLoggingDirectory) > 5 and !InStr(ErrorLoggingDirectory, ".exe")){
|
|||||||
(Locals != "")?(LocalsCheckStatus := 0) : (LocalsCheckStatus := 1)
|
(Locals != "")?(LocalsCheckStatus := 0) : (LocalsCheckStatus := 1)
|
||||||
(LinkedIN != "")?(LinkedINCheckStatus := 0) : (LinkedINCheckStatus := 1)
|
(LinkedIN != "")?(LinkedINCheckStatus := 0) : (LinkedINCheckStatus := 1)
|
||||||
(Twetch != "")?(TwetchCheckStatus := 0) : (TwetchCheckStatus := 0)
|
(Twetch != "")?(TwetchCheckStatus := 0) : (TwetchCheckStatus := 0)
|
||||||
; (ThinkSpot != "")?(ThinkSpotCheckStatus := 0) : (ThinkSpotCheckStatus := 0)
|
|
||||||
; (Flote != "")?(FloteCheckStatus := 0) : (FloteCheckStatus := 0)
|
|
||||||
; (Pintrest != "")?(PintrestCheckStatus := 0) : (PintrestCheckStatus := 1)
|
|
||||||
; (Parler != "")?(ParlerCheckStatus := 0) : (ParlerCheckStatus := 0)
|
|
||||||
(PocketNet != "")?(PocketNetCheckStatus := 0) : (PocketNetCheckStatus := 1)
|
(PocketNet != "")?(PocketNetCheckStatus := 0) : (PocketNetCheckStatus := 1)
|
||||||
; (Tumblr != "")?(TumblrCheckStatus := 0) : (TumblrCheckStatus := 1)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -335,7 +327,6 @@ if(TestingMode){ ; Easy testing for Yuriy
|
|||||||
LinkedINCheckStatus := 0
|
LinkedINCheckStatus := 0
|
||||||
MeWeCheckStatus := 0
|
MeWeCheckStatus := 0
|
||||||
TwetchCheckStatus := 0
|
TwetchCheckStatus := 0
|
||||||
; ThinkSpotCheckStatus := 0
|
|
||||||
PocketNetCheckStatus := 0
|
PocketNetCheckStatus := 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,21 +382,25 @@ if(DevMode){
|
|||||||
|
|
||||||
Gui, Font, s%GUINormalFontSize%
|
Gui, Font, s%GUINormalFontSize%
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Text, x%Marginspace% y+5 w%EditBoxWidth%, Post Title
|
Gui, Add, Text, x%Marginspace% y+5, Post Title
|
||||||
Gui, Font, s8
|
Gui, Font, s8
|
||||||
Gui, Add, Checkbox, xp+120 yp+10 vBoldTitleWAPI Checked%BoldTitleCheckStatus% gUpdateVars,Bold Title on Discord/Telegram
|
Gui, Font, Normal
|
||||||
Gui, Add, Checkbox, xp+220 yp+0 vNewLineBetweenTitle Checked%SpaceBetweenTitleBodyCheckStatus% gUpdateVars,Blank Line Between Title+Body
|
Gui, Font, s8
|
||||||
|
Gui, Add, Button, x+%MarginSpace% gPasteClipboardToEditBox vPasteClipboardToSMPTitle, Paste Clipboard
|
||||||
|
Gui, Add, Checkbox, xp+120 vBoldTitleWAPI Checked%BoldTitleCheckStatus% gUpdateVars,Bold Title on Discord/Telegram
|
||||||
|
Gui, Add, Checkbox, xp+220 vNewLineBetweenTitle Checked%SpaceBetweenTitleBodyCheckStatus% gUpdateVars,Blank Line Between Title+Body
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Font, s%GUINormalFontSize%
|
Gui, Font, s%GUINormalFontSize%
|
||||||
Gui, Add, Edit, x%MarginSpace% y+3 w%EditBoxWidth% vPostTitle gUpdateCharCount h75, %PostTitle%
|
Gui, Add, Edit, x%MarginSpace% y+%marginspace% w%EditBoxWidth% vPostTitle gUpdateCharCount h50, %PostTitle%
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Text,w%EditBoxWidth%, Post Body
|
Gui, Add, Text,, Post Body
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
|
Gui, Font, s8
|
||||||
|
Gui, Add, Button, x+%MarginSpace% gPasteClipboardToEditBox vPasteClipboardToSMPBody, Paste Clipboard
|
||||||
|
|
||||||
Gui, Font, s%GUINormalFontSize%
|
Gui, Font, s%GUINormalFontSize%
|
||||||
Gui, Add, Edit, x%MarginSpace% y+2 w%EditBoxWidth% h150 vPostBody gUpdateCharCount, %PostBody%
|
Gui, Add, Edit, x%MarginSpace% y+2 w%EditBoxWidth% h200 vPostBody gUpdateCharCount, %PostBody%
|
||||||
|
|
||||||
; Gui, font, color, cblack
|
; Gui, font, color, cblack
|
||||||
|
|
||||||
@@ -475,19 +470,15 @@ Gui, Add, GroupBox,r4 x%PlatformsGroupBoxXLocation% y20 w300, Settings
|
|||||||
Gui, Font, s11
|
Gui, Font, s11
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Checkbox, xp+10 yp+25 vAutoUpdateCheck Checked%AutoUpdateCheckCheckStatus% gUpdateVars, Auto Update Check
|
Gui, Add, Checkbox, xp+10 yp+25 vAutoUpdateCheck Checked%AutoUpdateCheckCheckStatus% gUpdateVars, Auto Update Check
|
||||||
Gui, Add, Checkbox, vReuseTabs Checked%ReuseTabsCheckStatus% gUpdateVars, Try to Re-Use Tabs
|
; Gui, Add, Checkbox, vReuseTabs Checked%ReuseTabsCheckStatus% gUpdateVars, Try to Re-Use Tabs
|
||||||
; Gui, Add, Checkbox, vNewChromeWindow Checked%AutoUpdateCheckCheckStatus% gUpdateVars, Create New Chrome Window (WIP)
|
|
||||||
Gui, Add, Checkbox,vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars, Show Tooltip of Progress
|
Gui, Add, Checkbox,vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars, Show Tooltip of Progress
|
||||||
; Gui, Add, Checkbox, vAutoUpdateCheck Checked%AutoUpdateCheckCheckStatus% gUpdateVars, Auto Update Check
|
|
||||||
Gui, Add, Checkbox, vSaveTagsBetweenPosts Checked%SaveTagsBetweenPostsCheckStatus% gUpdateVars, Save Tags Between Posts
|
Gui, Add, Checkbox, vSaveTagsBetweenPosts Checked%SaveTagsBetweenPostsCheckStatus% gUpdateVars, Save Tags Between Posts
|
||||||
Gui, Add, Checkbox, vPauseBetweenPosts Checked%PauseBetweenPostsCheckCheckStatus% gUpdateVars, Pause Briefly Between Posts
|
Gui, Add, Checkbox, vConfirmBeforeSubmit checked%ConfirmBeforeSubmit%, Confirm Before Submit
|
||||||
|
|
||||||
|
; Gui, Add, Checkbox, vPauseBetweenPosts Checked%PauseBetweenPostsCheckCheckStatus% gUpdateVars, Pause Briefly Between Posts
|
||||||
; Gui, Add, Checkbox, vAutoRestartChromeDebug Checked%PauseBetweenPostsCheckCheckStatus% gUpdateVars, Auto Restart Chrome in Debug Mode
|
; Gui, Add, Checkbox, vAutoRestartChromeDebug Checked%PauseBetweenPostsCheckCheckStatus% gUpdateVars, Auto Restart Chrome in Debug Mode
|
||||||
Gui, Font, s%GUINormalFontSize%
|
Gui, Font, s%GUINormalFontSize%
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, GroupBox,r6.4 x%PlatformsGroupBoxXLocation% y210 w300, Platforms
|
Gui, Add, GroupBox,r6.4 x%PlatformsGroupBoxXLocation% y210 w300, Platforms
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
@@ -530,7 +521,8 @@ gui, font, normal
|
|||||||
Gui, Add, StatusBar,, Total Posts Posted: %TotalPostsPosted% | Total Run Time: %TotalRunTime% Seconds |
|
Gui, Add, StatusBar,, Total Posts Posted: %TotalPostsPosted% | Total Run Time: %TotalRunTime% Seconds |
|
||||||
|
|
||||||
; easier to just let the gui size be as needed instead of trying to recalculate the size each time an element is added
|
; easier to just let the gui size be as needed instead of trying to recalculate the size each time an element is added
|
||||||
Gui, Show, x%XPosition% y%YPosition% ,%FullScriptName% ; , w%GuiWidth%, %ScriptName%
|
; Gui, Show, x%XPosition% y%YPosition% ,%FullScriptName% ; , w%GuiWidth%, %ScriptName%
|
||||||
|
Gui, Show, ,%FullScriptName% ; , w%GuiWidth%, %ScriptName%
|
||||||
ControlFocus, Edit1, %FullScriptName%
|
ControlFocus, Edit1, %FullScriptName%
|
||||||
|
|
||||||
|
|
||||||
@@ -564,6 +556,9 @@ Return
|
|||||||
|
|
||||||
;---Misc GoSubs---
|
;---Misc GoSubs---
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SaveAsTemplate:
|
SaveAsTemplate:
|
||||||
TemplateDirectory = %A_ScriptDir%\Lib\Templates
|
TemplateDirectory = %A_ScriptDir%\Lib\Templates
|
||||||
if(!FileExist(TemplateDirectory)){
|
if(!FileExist(TemplateDirectory)){
|
||||||
@@ -713,19 +708,12 @@ UpdateCharCount:
|
|||||||
Gui, Submit, NoHide
|
Gui, Submit, NoHide
|
||||||
Count := StrLen(PostBody)
|
Count := StrLen(PostBody)
|
||||||
|
|
||||||
/*if(Count > 256){
|
|
||||||
GuiControl,, Twetch, 0
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
GuiControl,, CharCount, %Count%
|
GuiControl,, CharCount, %Count%
|
||||||
Return
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TryFailedAgain:
|
TryFailedAgain:
|
||||||
; msgbox %ErrorLoggingDirectory%
|
|
||||||
run, %A_ScriptFullPath% "LastPost"
|
run, %A_ScriptFullPath% "LastPost"
|
||||||
ExitApp
|
ExitApp
|
||||||
; Return
|
; Return
|
||||||
@@ -751,16 +739,8 @@ Return
|
|||||||
|
|
||||||
|
|
||||||
PostPost:
|
PostPost:
|
||||||
|
|
||||||
WinGetPos, XPosition, YPosition, , , A
|
|
||||||
IniWrite, %XPosition%, %SettingsIniFilepath%, %ScriptSettingsSection%, XPosition
|
|
||||||
IniWrite, %YPosition%, %SettingsIniFilepath%, %ScriptSettingsSection%, YPosition
|
|
||||||
|
|
||||||
|
|
||||||
Gui, Submit
|
Gui, Submit
|
||||||
|
|
||||||
; Msgbox % "PostTags: " PostTags
|
|
||||||
|
|
||||||
if(InStr(PostTags, "http")){
|
if(InStr(PostTags, "http")){
|
||||||
Message = Post Tags contain "http". Please edit and remove the url and try again.
|
Message = Post Tags contain "http". Please edit and remove the url and try again.
|
||||||
Msgbox, 4096, Error, %Message%
|
Msgbox, 4096, Error, %Message%
|
||||||
@@ -792,6 +772,11 @@ if(InStr(ErrorLoggingDirectory, "\Templates\") OR ErrorLoggingDirectory = "" OR
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
; Save Script Settings to File
|
||||||
|
; ------------------------------------------------
|
||||||
|
WinGetPos, XPosition, YPosition, , , A
|
||||||
|
IniWrite, %XPosition%, %SettingsIniFilepath%, %ScriptSettingsSection%, XPosition
|
||||||
|
IniWrite, %YPosition%, %SettingsIniFilepath%, %ScriptSettingsSection%, YPosition
|
||||||
|
|
||||||
IniWrite, %BoldTitleWAPI%, %SettingsIniFilepath%, SocialMediaPoster, BoldTitleWAPI
|
IniWrite, %BoldTitleWAPI%, %SettingsIniFilepath%, SocialMediaPoster, BoldTitleWAPI
|
||||||
IniWrite, %NewLineBetweenTitle%, %SettingsIniFilepath%, SocialMediaPoster, NewLineBetweenTitle
|
IniWrite, %NewLineBetweenTitle%, %SettingsIniFilepath%, SocialMediaPoster, NewLineBetweenTitle
|
||||||
@@ -802,6 +787,9 @@ IniWrite, %SaveTagsBetweenPosts%, %SettingsIniFilepath%, SocialMediaPoster, Save
|
|||||||
IniWrite, %PauseBetweenPosts%, %SettingsIniFilepath%, SocialMediaPoster, PauseBetweenPosts
|
IniWrite, %PauseBetweenPosts%, %SettingsIniFilepath%, SocialMediaPoster, PauseBetweenPosts
|
||||||
IniWrite, %ErrorLoggingDirectory%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
IniWrite, %ErrorLoggingDirectory%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
||||||
|
|
||||||
|
IniWrite, %ConfirmBeforeSubmit%, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit
|
||||||
|
|
||||||
|
; Used by Post Scheduler, filepath changes between script updates
|
||||||
IniWrite, %A_ScriptFullPath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath
|
IniWrite, %A_ScriptFullPath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath
|
||||||
|
|
||||||
|
|
||||||
@@ -1221,3 +1209,6 @@ Return
|
|||||||
; Misc Functions
|
; Misc Functions
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
#include %A_ScriptDir%\Modules\Miscellaneous-Functions.ahk
|
#include %A_ScriptDir%\Modules\Miscellaneous-Functions.ahk
|
||||||
|
|
||||||
|
; used by update checker and paste from clipboard
|
||||||
|
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Shared-GoTos.ahk
|
||||||
|
|||||||
Submodule Lib/Freedomain-Posters-Shared-Functions updated: b8ffb10db1...b378de8106
@@ -30,34 +30,6 @@ ReadWebsiteStatuses(){
|
|||||||
; IniRead, Tumblr, %StatusFileFilePath%, Status, Tumblr, %A_Space%
|
; IniRead, Tumblr, %StatusFileFilePath%, Status, Tumblr, %A_Space%
|
||||||
}
|
}
|
||||||
|
|
||||||
; -------------------------------CreateErrorLoggingFiles-------------------------------
|
|
||||||
CreateErrorLoggingFiles(Path := ""){
|
|
||||||
FormatTime, TodayDate, YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
|
|
||||||
|
|
||||||
ErrorLoggingDirectory := Path
|
|
||||||
|
|
||||||
if(Path = ""){
|
|
||||||
ErrorLoggingDirectory := A_ScriptDir . "\Lib\ErrorLogging"
|
|
||||||
; If directory for error logging doesn't exist, create it
|
|
||||||
if(!FileExist(ErrorLoggingDirectory))
|
|
||||||
FileCreateDir, %ErrorLoggingDirectory%
|
|
||||||
|
|
||||||
ErrorLoggingDirectory := ErrorLoggingDirectory . "\" . TodayDate . "_FSMP"
|
|
||||||
}
|
|
||||||
; Msgbox % "ErrorLoggingDirectory: " ErrorLoggingDirectory
|
|
||||||
FileCreateDir, %ErrorLoggingDirectory%
|
|
||||||
|
|
||||||
; Create variables with filepaths that content will be saved to.
|
|
||||||
ErrorLoggingFilePath := ErrorLoggingDirectory . "\" . "ErrorLogging.txt"
|
|
||||||
StatusFileFilePath := ErrorLoggingDirectory . "\" . "PostStatus.ini"
|
|
||||||
PostTitleFilePath := ErrorLoggingDirectory . "\" . "PostTitle.txt"
|
|
||||||
PostBodyFilePath := ErrorLoggingDirectory . "\" . "PostBody.txt"
|
|
||||||
|
|
||||||
; Msgbox % "ErrorLoggingDirectory: " ErrorLoggingDirectory
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
; -------------------------------/CreateErrorLoggingFiles-------------------------------
|
|
||||||
|
|
||||||
AddToTotalPostsPostedCount(){
|
AddToTotalPostsPostedCount(){
|
||||||
IniRead, TotalPostsPosted, %SettingsIniFilepath%, SocialMediaPoster, TotalPostsPosted, 0
|
IniRead, TotalPostsPosted, %SettingsIniFilepath%, SocialMediaPoster, TotalPostsPosted, 0
|
||||||
TotalPostsPosted += 1
|
TotalPostsPosted += 1
|
||||||
|
|||||||
@@ -100,26 +100,14 @@ if(Status = ""){
|
|||||||
|
|
||||||
|
|
||||||
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']
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
|
||||||
if(Status){
|
|
||||||
Message = Failed to Click "Attach Image" Button
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; sleep, 5000
|
|
||||||
|
|
||||||
Xpath = //input[@type='file']
|
Xpath = //input[@type='file']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=3,SleepLength:=5000,StringTextContent:=ImageAttachmentFilepath)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=3,SleepLength:=5000,StringTextContent:=ImageAttachmentFilepath)
|
||||||
@@ -135,7 +123,6 @@ if(Status = ""){
|
|||||||
|
|
||||||
sleep, 10000
|
sleep, 10000
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
; Input Tags
|
; Input Tags
|
||||||
@@ -162,6 +149,12 @@ if(Status = ""){
|
|||||||
|
|
||||||
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
; CLick the post button
|
; CLick the post button
|
||||||
Xpath = //button[normalize-space()='Post']
|
Xpath = //button[normalize-space()='Post']
|
||||||
loop, 3 {
|
loop, 3 {
|
||||||
|
|||||||
@@ -88,6 +88,13 @@ if(Status){
|
|||||||
; Click the final "post" button
|
; Click the final "post" button
|
||||||
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Xpath = //*[@id="gabsocial"]/div/div[2]/div[2]/main/div/div[3]/div/div
|
Xpath = //*[@id="gabsocial"]/div/div[2]/div[2]/main/div/div[3]/div/div
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=2000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=2000)
|
||||||
if(Status){
|
if(Status){
|
||||||
|
|||||||
@@ -106,6 +106,13 @@ sleep, 500
|
|||||||
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
sleep, 2000
|
sleep, 2000
|
||||||
|
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
; Click post button
|
; Click post button
|
||||||
Xpath = //span[normalize-space()='Post']
|
Xpath = //span[normalize-space()='Post']
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=10,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=10,SleepLength:=1000)
|
||||||
|
|||||||
@@ -200,15 +200,6 @@ loop, 3 {
|
|||||||
; Continue
|
; Continue
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if(!Status){ ; if BLANK
|
|
||||||
Message = Post Failed: Failed to input Post for some reason
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
; sleep, 2000
|
|
||||||
|
|
||||||
if(InStr(PostTitleAndBody, "http") OR InStr(PostTitleAndBody, "www")){
|
if(InStr(PostTitleAndBody, "http") OR InStr(PostTitleAndBody, "www")){
|
||||||
Message = Waiting 10 seconds for Preview to Get Fetched
|
Message = Waiting 10 seconds for Preview to Get Fetched
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
@@ -220,6 +211,11 @@ loop, 3 {
|
|||||||
|
|
||||||
|
|
||||||
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Xpath = //span[normalize-space()='Post'] ; Click the final "post" button
|
Xpath = //span[normalize-space()='Post'] ; Click the final "post" button
|
||||||
|
|||||||
@@ -91,6 +91,11 @@ if(ImageAttachmentFilepath != ""){
|
|||||||
}
|
}
|
||||||
Message = Submitting Post
|
Message = Submitting Post
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
; Click Publish post
|
; Click Publish post
|
||||||
js = document.getElementsByName('submitPost')[0].click(); ; Send content through javascript (Great for getting around emoji chrome limitaitons)
|
js = document.getElementsByName('submitPost')[0].click(); ; Send content through javascript (Great for getting around emoji chrome limitaitons)
|
||||||
@@ -111,17 +116,6 @@ Return
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ; Double check that post got submitted
|
|
||||||
js = return document.querySelector("#body").value
|
|
||||||
Status := driver.executeScript(js)
|
|
||||||
if(Status != ""){
|
|
||||||
Message = Error: Post Failed to Submit for some reason
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
IniWrite, Successful, %StatusFileFilePath%, Status, Locals
|
IniWrite, Successful, %StatusFileFilePath%, Status, Locals
|
||||||
AddToTotalPostsPostedCount()
|
AddToTotalPostsPostedCount()
|
||||||
|
|||||||
@@ -35,15 +35,6 @@ if(Status){
|
|||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
; DevModeMsgBox("popup activated?")
|
|
||||||
|
|
||||||
|
|
||||||
; click into popup box to make sure it's activated
|
|
||||||
/*xpath = //div[@class='ql-editor ql-blank']//div
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
|
||||||
DevModeMsgBox(Status)
|
|
||||||
*/
|
|
||||||
; DevModeMsgBox("inputting post now after clickng")
|
|
||||||
|
|
||||||
; input post title and body with javascript
|
; input post title and body with javascript
|
||||||
JsToExecute = document.querySelector(".ql-editor").innerText = '%JSPostTitleAndBody%';
|
JsToExecute = document.querySelector(".ql-editor").innerText = '%JSPostTitleAndBody%';
|
||||||
@@ -103,6 +94,11 @@ if(ImageAttachmentFilepath != ""){
|
|||||||
sleep, 10000
|
sleep, 10000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
; Click the "Post" button
|
; Click the "Post" button
|
||||||
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
@@ -119,11 +115,6 @@ IniWrite, Successful, %StatusFileFilePath%, Status, MeWe
|
|||||||
AddToTotalPostsPostedCount()
|
AddToTotalPostsPostedCount()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PauseBetweenPosts()
|
|
||||||
DevModeMsgBox("done!")
|
|
||||||
|
|
||||||
|
|
||||||
Message = Post Publish Successful
|
Message = Post Publish Successful
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|||||||
@@ -173,6 +173,11 @@ else, { ; otherwise, input just text
|
|||||||
|
|
||||||
; sleep, 2000
|
; sleep, 2000
|
||||||
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
loop, 3 {
|
loop, 3 {
|
||||||
|
|||||||
@@ -65,21 +65,9 @@ else, {
|
|||||||
try, driver.switchToalert().accept() ; if text exists Steemit will pop up menu asking for confirmation for clearing
|
try, driver.switchToalert().accept() ; if text exists Steemit will pop up menu asking for confirmation for clearing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
|
||||||
/* if(Status){
|
|
||||||
Message = Post Failed, Please check login status
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
; Click "Accept" popup that asks if you're sure you want to clear post
|
|
||||||
try, driver.switchToalert().accept()
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Message = Inputting Post Content
|
Message = Inputting Post Content
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
@@ -161,6 +149,13 @@ else, {
|
|||||||
if(A_index = 8) ; Steemit only allows 8 tags
|
if(A_index = 8) ; Steemit only allows 8 tags
|
||||||
Break
|
Break
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Message = Submitting Post
|
Message = Submitting Post
|
||||||
@@ -180,11 +175,6 @@ else, {
|
|||||||
IniWrite, Successful, %StatusFileFilePath%, Status, Steemit
|
IniWrite, Successful, %StatusFileFilePath%, Status, Steemit
|
||||||
AddToTotalPostsPostedCount()
|
AddToTotalPostsPostedCount()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PauseBetweenPosts()
|
|
||||||
DevModeMsgBox("done!")
|
|
||||||
|
|
||||||
Message = Post Publish Successful
|
Message = Post Publish Successful
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|||||||
@@ -178,23 +178,6 @@ if(ImageAttachmentFilepath != ""){
|
|||||||
Xpath = //input[@multiple='multiple']
|
Xpath = //input[@multiple='multiple']
|
||||||
driver.FindElementByXPath(Xpath).SendKeys(ImageAttachmentFilepath)
|
driver.FindElementByXPath(Xpath).SendKeys(ImageAttachmentFilepath)
|
||||||
|
|
||||||
|
|
||||||
/* Xpath = //span[@class='trix-button-group trix-upload-buttons']//button[2]
|
|
||||||
Status := Selenium_LoopToClickXpathAndWaitForOpenWindow(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
|
||||||
if(Status){
|
|
||||||
Message = Failed to click on Picture Upload button
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
}
|
|
||||||
|
|
||||||
InputStatus := InputFilePathIntoOpenWindow(ImageAttachmentFilepath)
|
|
||||||
if(InputStatus = "Failed")
|
|
||||||
{
|
|
||||||
Message = Upload Failed:`nUnable to Find "Open File" window to input filepath into
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
SaveOrPostProgress(Message:="Waiting 5 seconds for Image to finish uploading",PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:="Waiting 5 seconds for Image to finish uploading",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
sleep, 5000
|
sleep, 5000
|
||||||
}
|
}
|
||||||
@@ -221,6 +204,14 @@ if(ImageAttachmentFilepath != ""){
|
|||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SaveOrPostProgress(Message:="Submitting Post",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
; click submit button
|
; click submit button
|
||||||
js = document.querySelector(%Selector%).click()
|
js = document.querySelector(%Selector%).click()
|
||||||
try, Status := driver.executeScript(js)
|
try, Status := driver.executeScript(js)
|
||||||
|
|||||||
@@ -108,7 +108,22 @@ if(ImageAttachmentFilepath != ""){
|
|||||||
sleep, 5000
|
sleep, 5000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*; Get User confirmation if they have the setting checked
|
||||||
|
if(ConfirmBeforeSubmit){
|
||||||
|
Status := ConfirmBeforeSubmitMsgboxFunc()
|
||||||
|
if(Status){
|
||||||
|
Message := Status
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
; Click on "Post" button
|
; Click on "Post" button
|
||||||
sleep, 2000
|
sleep, 2000
|
||||||
|
|||||||
Reference in New Issue
Block a user