16 Commits
2.88 ... 2.92

Author SHA1 Message Date
5b2e8970bf code cleanup, save gui positions between runs 2024-05-17 19:56:24 -04:00
3a439e7300 added workaround to paste formatting bug, added confirmation setting and implemented check on all selenium sites 2024-05-17 19:37:41 -04:00
64c03c9f65 Added Window position saving between runs 2024-05-17 01:00:21 -04:00
Yuriy
845af386c0 fixed locals.com posting, added ability to use custom chrome.exe filepath 2024-01-16 18:59:30 -05:00
d5edbc058c Update 'Modules/Post-To-Bastyon.ahk'
Added error handling to failed tag input
2024-01-15 00:19:08 +00:00
f70498afce add newline after fdrpodcasts URL for post body 2024-01-15 00:18:13 +00:00
Yuriy
a3f16aa6f2 changed back mewe always being unchecked by default 2024-01-12 22:25:59 -05:00
982f857640 add newline after fdrpodcasts URL for post body 2024-01-02 12:33:04 -07:00
Yuriy
0597c90144 Added error handling if freedomain.dev or chrome-for-testing API is not reachable 2023-12-18 23:33:35 -05:00
Yuriy
5703a896ff added automatic version bump when script is compiled, moved version number outside of main script 2023-12-18 23:04:46 -05:00
9b506a8f73 Update 'Modules/Post-To-Bastyon.ahk'
Added error handling to failed tag input
2023-12-19 03:37:20 +00:00
Yuriy
1880170b07 added settings.ini 2023-12-17 22:19:38 -05:00
Yuriy
09c9dbd485 fixed settings.ini 2023-12-17 22:19:17 -05:00
Yuriy
5492130564 removed empty lines from settings.ini 2023-12-17 21:25:28 -05:00
Yuriy
5ba8412f18 added template settings file 2023-12-17 21:24:20 -05:00
Yuriy
7fd46a9913 added template settings.ini 2023-12-17 15:34:42 -05:00
18 changed files with 343 additions and 14725 deletions

1
.gitignore vendored
View File

@@ -27,3 +27,4 @@ Compile Scripts to EXE.ahk
Freedomain Video Uploader.exe Freedomain Video Uploader.exe
Lib/LBRY Process Killer.exe Lib/LBRY Process Killer.exe
Lib/chrome-win64 Lib/chrome-win64
Lib/Version.ini

View File

@@ -14,29 +14,24 @@ CoordMode, Mouse, Screen
;---Notes/Extra Info/#Includes------------------------------------------------------ ;---Notes/Extra Info/#Includes------------------------------------------------------
; msgbox
;---VARIABLES----------------------------------------------------------------------- ;---VARIABLES-----------------------------------------------------------------------
/*ScriptToCompile = %1%
CompileType = %2% ; Testing OR Production
if(CompileType = "")
CompileType = Testing
; Msgbox % "CompileType: " CompileType
if(ScriptToCompile = "")
ExitApp
*/
; Msgbox % "ScriptToCompile: " ScriptToCompile
ScriptToCompile = SocialMediaPoster
; ScriptToCompile = ScriptUpdater
;---MAIN SCRIPT--------------------------------------------------------------------- ;---MAIN SCRIPT---------------------------------------------------------------------
AHKFilepath = %A_ScriptDir%\Freedomain Social Media Poster.ahk AHKFilepath = %A_ScriptDir%\Freedomain Social Media Poster.ahk
Exefilepath = %A_ScriptDir%\Freedomain Social Media Poster.exe Exefilepath = %A_ScriptDir%\Freedomain Social Media Poster.exe
icopath = %A_ScriptDir%\Assets\FreedomainSMP.ico icopath = %A_ScriptDir%\Assets\FreedomainSMP.ico
VersionIniFP = %A_ScriptDir%\Version.ini
; Bump the version number in the version.ini file
IniRead, VersionNumber, %VersionIniFP%, Social-Media-Poster, Version, 0.0 ; , Filename, Section, Key [, Default]
VersionNumber += .01
VersionNumber := SubStr(VersionNumber, 1, 4)
; Msgbox % "VersionNumber: " VersionNumber
IniWrite, %VersionNumber%, %VersionIniFP%,Social-Media-Poster, Version
; Kill any active intances of the uploaders so the .exe file can be overwriten by the compilation ; Kill any active intances of the uploaders so the .exe file can be overwriten by the compilation
process, close, Freedomain Social Media Poster.exe process, close, Freedomain Social Media Poster.exe
@@ -68,8 +63,6 @@ if(!FileExist(icopath)){
run, %comspec% /c ""C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%"" run, %comspec% /c ""C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%""
; OldNotify(ScriptToCompile,"Compiled Successfully",5)
; sleep, 5000
ExitApp ExitApp

View File

@@ -11,6 +11,7 @@ if(InStr(A_ScriptName, ".ahk")){
} }
ErrorLoggingDirectory = %1% ErrorLoggingDirectory = %1%
PassedInArgument = %1%
; Add menus to the toolbar icon ; Add menus to the toolbar icon
Menu, tray, NoStandard ; remove standard tray Menu, tray, NoStandard ; remove standard tray
@@ -39,11 +40,9 @@ global UpdateVersionNumber
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\JSON.ahk #Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\JSON.ahk
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\RunCMD.ahk #Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\RunCMD.ahk
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Zip.ahk #Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Zip.ahk
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\URLDownloadToVar.ahk
ScriptName = Freedomain Social Media Poster
ScriptVersion = 2.88
FullScriptName := ScriptName . " " . ScriptVersion
;---ToDo--- ;---ToDo---
;------------------------------------------------ ;------------------------------------------------
@@ -122,6 +121,15 @@ ChangelogIniFilepath := A_ScriptDir . "\Lib\FreedomScriptsChangelogINI"
global ScriptSettingsSection global ScriptSettingsSection
ScriptSettingsSection := "SocialMediaPoster" ScriptSettingsSection := "SocialMediaPoster"
FileInstall, Version.ini, %A_ScriptDir%\Lib\Version.ini, 1
IniRead, ScriptVersion, %A_ScriptDir%\Lib\Version.ini,Social-Media-Poster, Version, 0.0
ScriptName = Freedomain Social Media Poster
ScriptAbbreviatedName := "FSMP"
FullScriptName := ScriptName . " " . ScriptVersion
;---General Info--- ;---General Info---
;------------------------------------------------ ;------------------------------------------------
IniRead, TestingMode, %SettingsIniFilepath%, General, TestingMode, 0 IniRead, TestingMode, %SettingsIniFilepath%, General, TestingMode, 0
@@ -130,7 +138,9 @@ IniRead, TelegramBotToken, %SettingsIniFilepath%, SocialMediaPoster, TelegramBot
IniRead, TelegramBotChatID, %SettingsIniFilepath%, SocialMediaPoster, TelegramBotChatID, %A_Space% IniRead, TelegramBotChatID, %SettingsIniFilepath%, SocialMediaPoster, TelegramBotChatID, %A_Space%
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
; IniRead, SaveGUIPosition, %SettingsIniFilepath%, %ScriptSettingsSection%, SaveGUIPosition, 1
@@ -266,16 +276,12 @@ if(StrLen(ErrorLoggingDirectory) > 5 and !InStr(ErrorLoggingDirectory, ".exe")){
VideoURL := BitChuteURL VideoURL := BitChuteURL
if(PodcastNumber != ""){ if(PodcastNumber != ""){
PodcastURL := "https://fdrpodcasts.com/" . PodcastNumber . "`n" PodcastURL := "https://fdrpodcasts.com/" . PodcastNumber . "`n`n"
} }
; 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
} }
@@ -300,18 +306,13 @@ if(StrLen(ErrorLoggingDirectory) > 5 and !InStr(ErrorLoggingDirectory, ".exe")){
(Telegram != "")?(TelegramCheckStatus := 0) : (TelegramCheckStatus := 1) (Telegram != "")?(TelegramCheckStatus := 0) : (TelegramCheckStatus := 1)
(Minds != "")?(MindsCheckStatus := 0) : (MindsCheckStatus := 1) (Minds != "")?(MindsCheckStatus := 0) : (MindsCheckStatus := 1)
(Gab != "")?(GabCheckStatus := 0) : (GabCheckStatus := 1) (Gab != "")?(GabCheckStatus := 0) : (GabCheckStatus := 1)
(MeWe != "")?(MeWeCheckStatus := 0) : (MeWeCheckStatus := 0) ; UNCHECKED ALWAYS as of 2022/04/08 (MeWe != "")?(MeWeCheckStatus := 0) : (MeWeCheckStatus := 1)
(Gettr != "")?(GettrCheckStatus := 0) : (GettrCheckStatus := 0) (Gettr != "")?(GettrCheckStatus := 0) : (GettrCheckStatus := 0)
(Steemit != "")?(SteemitCheckStatus := 0) : (SteemitCheckStatus := 1) (Steemit != "")?(SteemitCheckStatus := 0) : (SteemitCheckStatus := 1)
(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)
@@ -327,13 +328,15 @@ if(TestingMode){ ; Easy testing for Yuriy
LinkedINCheckStatus := 0 LinkedINCheckStatus := 0
MeWeCheckStatus := 0 MeWeCheckStatus := 0
TwetchCheckStatus := 0 TwetchCheckStatus := 0
; ThinkSpotCheckStatus := 0
PocketNetCheckStatus := 0 PocketNetCheckStatus := 0
} }
;---GUI Variables--- ;---GUI Variables---
;------------------------------------------------ ;------------------------------------------------
IniRead, XPosition, %SettingsIniFilepath%, %ScriptSettingsSection%, XPosition, 0
IniRead, YPosition, %SettingsIniFilepath%, %ScriptSettingsSection%, YPosition, 0
TooltipXPosition := Round((A_ScreenWidth / 2) - (A_ScreenWidth / 10)) ; Center Tooltip on the screen and a bit to the left TooltipXPosition := Round((A_ScreenWidth / 2) - (A_ScreenWidth / 10)) ; Center Tooltip on the screen and a bit to the left
GuiWidth := 1366 GuiWidth := 1366
@@ -363,6 +366,11 @@ Gui, Margin, %MarginSpace%, %MarginSpace%
GUINormalFontSize := 15 GUINormalFontSize := 15
; Create GUI Elements
; ------------------------------------------------
Gui, Font, s10 Gui, Font, s10
; Gui, Font, s8 ; Gui, Font, s8
if(TestingMode){ if(TestingMode){
@@ -375,21 +383,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
@@ -459,19 +471,16 @@ 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, vSaveGUIPosition checked%SaveGUIPosition%, Save GUI Position
; 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
@@ -483,26 +492,16 @@ Gui, Add, Checkbox, y+7 vGab Checked%GabCheckStatus% gUpdateVars, Gab
Gui, Add, Checkbox, y+7 vLocals Checked%LocalsCheckStatus% gUpdateVars, Locals Gui, Add, Checkbox, y+7 vLocals Checked%LocalsCheckStatus% gUpdateVars, Locals
Gui, Add, Checkbox, y+7 vTwetch Checked%TwetchCheckStatus% gUpdateVars, Twetch Gui, Add, Checkbox, y+7 vTwetch Checked%TwetchCheckStatus% gUpdateVars, Twetch
; Second Row ; Second Row
; Gui, Add, Checkbox, vLinkedIn Checked%LinkedINCheckStatus% gUpdateVars, LinkedIn
Gui, Add, Checkbox, x+75 yp-190 vLinkedIn Checked%LinkedINCheckStatus% gUpdateVars, LinkedIn Gui, Add, Checkbox, x+75 yp-190 vLinkedIn Checked%LinkedINCheckStatus% gUpdateVars, LinkedIn
; Gui, Add, Checkbox, y+7 vLinkedIn Checked%LinkedINCheckStatus% gUpdateVars, LinkedIn
; Gui, Add, Checkbox, y+7 vThinkspot Checked%ThinkSpotCheckStatus% gUpdateVars, Thinkspot
; Gui, Add, Checkbox, y+7 vFlote Checked%FloteCheckStatus% gUpdateVars, Flote
; Gui, Add, Checkbox, y+7 vParler Checked%ParlerCheckStatus% gUpdateVars, Parler
Gui, Add, Checkbox, y+7 vSteemit Checked%SteemitCheckStatus% gUpdateVars, Steemit Gui, Add, Checkbox, y+7 vSteemit Checked%SteemitCheckStatus% gUpdateVars, Steemit
; Gui, Add, Checkbox, y+7 vPintrest Checked%PintrestCheckStatus% gUpdateVars, Pintrest
Gui, Add, Checkbox, y+7 vPocketNet Checked%PocketNetCheckStatus% , Bastyon Gui, Add, Checkbox, y+7 vPocketNet Checked%PocketNetCheckStatus% , Bastyon
; Gui, Add, Checkbox, y+7 vTumblr Checked%TumblrCheckStatus% , Tumblr
Gui, Add, Checkbox, y+7 vGettr Checked%GettrCheckStatus% gUpdateVars, Gettr Gui, Add, Checkbox, y+7 vGettr Checked%GettrCheckStatus% gUpdateVars, Gettr
Gui, Add, Checkbox, y+7 vMeWe Checked%MeWeCheckStatus% gUpdateVars, MeWe Gui, Add, Checkbox, y+7 vMeWe Checked%MeWeCheckStatus% gUpdateVars, MeWe
Gui, Font, Bold Gui, Font, Bold
gui, Font, s15 gui, Font, s15
; : Gui, Add, Text, , My Text.
; Gui, Font, Color, Red
Gui, Add, Button, x%PlatformsGroupBoxXLocation% y485 w300 h113 gPostPost, Publish Gui, Add, Button, x%PlatformsGroupBoxXLocation% y485 w300 h113 gPostPost, Publish
; Gui, Add, Button, x%PlatformsGroupBoxXLocation% y+20 w300 h30 gSchedulePost, Schedule Post ; Gui, Add, Button, x%PlatformsGroupBoxXLocation% y+20 w300 h30 gSchedulePost, Schedule Post
@@ -514,32 +513,19 @@ 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,,%FullScriptName% ; , w%GuiWidth%, %ScriptName% ; if(SaveGUIPosition)
Gui, Show, x%XPosition% y%YPosition% ,%FullScriptName% ; , w%GuiWidth%, %ScriptName%
; else,
; Gui, Show,,%FullScriptName% ; , w%GuiWidth%, %ScriptName%
; Activate the Post Title input box so user can start instantly typing in their new message
ControlFocus, Edit1, %FullScriptName% ControlFocus, Edit1, %FullScriptName%
; check for updates if the setting is enabled ; check for updates if the setting is enabled
if(AutoUpdateCheck AND !UpdateAvailable){ if(AutoUpdateCheck AND !UpdateAvailable){
Message = Checking for Updates SetTimer, CheckForUpdates, -1000
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; DevModeMsgBox("checking for updates")
; msgbox, checkin for update
; DevModeMsgBox(GitReleasesAPIURL)
; UpdateAvailable :=
if(CheckForUpdates(GitReleasesAPIURL))
GuiControl,,UpdateAvailable, Uploader Update Available!
if(CheckForChromeUpdates(ChromeFilepath)){
GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
ChromeUpdateAvailable := 1
} }
}
;---Check for Update---
;------------------------------------------------
Return Return
@@ -548,6 +534,9 @@ Return
;---Misc GoSubs--- ;---Misc GoSubs---
;------------------------------------------------ ;------------------------------------------------
SaveAsTemplate: SaveAsTemplate:
TemplateDirectory = %A_ScriptDir%\Lib\Templates TemplateDirectory = %A_ScriptDir%\Lib\Templates
if(!FileExist(TemplateDirectory)){ if(!FileExist(TemplateDirectory)){
@@ -697,19 +686,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
@@ -721,7 +703,6 @@ Gui, Submit
Gui, Destroy Gui, Destroy
Gui, Font, Normal Gui, Font, Normal
Gui, Font, s20 Gui, Font, s20
Gui, Add, Text, Center w350 x%marginspace%,Time to Post At Gui, Add, Text, Center w350 x%marginspace%,Time to Post At
@@ -736,9 +717,10 @@ Return
PostPost: PostPost:
Gui, Submit Gui, Submit, NoHide
; Msgbox % "PostTags: " PostTags ; Get GUI window position for saving to settings file
WinGetPos, XPosition, YPosition, , , A
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.
@@ -750,7 +732,6 @@ if(InStr(PostTags, "http")){
Gui, Destroy Gui, Destroy
; 20211023061711
ScheduledTime := SubStr(ScheduledTime, 1, 12) ; pull out time date up to the minute and exclude seconds ScheduledTime := SubStr(ScheduledTime, 1, 12) ; pull out time date up to the minute and exclude seconds
; Msgbox % "ScheduledTime: " ScheduledTime ; Msgbox % "ScheduledTime: " ScheduledTime
; clipboard := ScheduledTime ; clipboard := ScheduledTime
@@ -763,7 +744,6 @@ ScheduledTime := SubStr(ScheduledTime, 1, 12) ; pull out time date up to the min
; if the argument is an error logging post, we want to continue where it left off and log to the same place ; if the argument is an error logging post, we want to continue where it left off and log to the same place
; Msgbox % "ErrorLoggingDirectory: " ErrorLoggingDirectory
if(InStr(ErrorLoggingDirectory, "\Templates\") OR ErrorLoggingDirectory = "" OR InStr(ErrorLoggingDirectory, "VideoLinks.ini")){ if(InStr(ErrorLoggingDirectory, "\Templates\") OR ErrorLoggingDirectory = "" OR InStr(ErrorLoggingDirectory, "VideoLinks.ini")){
; msgbox, creating new error logging files ; msgbox, creating new error logging files
CreateErrorLoggingFiles() CreateErrorLoggingFiles()
@@ -771,6 +751,11 @@ if(InStr(ErrorLoggingDirectory, "\Templates\") OR ErrorLoggingDirectory = "" OR
} ; } ;
; Save Script Settings to File
; ------------------------------------------------
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
@@ -781,6 +766,14 @@ 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
; IniWrite, %SaveGUIPosition%, %SettingsIniFilepath%, %ScriptSettingsSection%, SaveGUIPosition
; Used by Post Scheduler, filepath changes between script updates
IniWrite, %A_ScriptFullPath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath
; Combines two variables together so they can be used as needed later ; Combines two variables together so they can be used as needed later
@@ -1053,7 +1046,10 @@ Gui, Font, s%GUINormalFontSize%
gui, font, s6 gui, font, s6
Gui, Add, StatusBar,, Total Posts Posted: %TotalPostsPosted% | Run Time: %ScriptRunTime% Seconds Gui, Add, StatusBar,, Total Posts Posted: %TotalPostsPosted% | Run Time: %ScriptRunTime% Seconds
Gui, Show,, %FullScriptName% - Post Results ; if(SaveGUIPosition)
Gui, Show, x%XPosition% y%YPosition%, %FullScriptName% - Post Results
; else,
; Gui, Show,, %FullScriptName% - Post Results
SaveCurrentChromeVersionToIniFile() SaveCurrentChromeVersionToIniFile()
@@ -1196,3 +1192,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

File diff suppressed because one or more lines are too long

View File

@@ -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

View File

@@ -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
@@ -148,50 +135,26 @@ if(Status = ""){
DevModeMsgBox(Tag) DevModeMsgBox(Tag)
; Tag = %Tag% ; Tag = %Tag%
Xpath = //input[@placeholder='Categories and tags'] Xpath = //input[@placeholder='Categories and tags']
driver.FindElementByXPath(Xpath).SendKeys(Tag) try driver.FindElementByXPath(Xpath).SendKeys(Tag)
driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.ENTER) catch e {
Message = Failed to input tag: %tag%
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
}
; driver.findElementsByClass("sminput").item[2].click() try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.ENTER)
; 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)
if(A_index = 5) if(A_index = 5)
Break 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") 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 {

View File

@@ -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){

View File

@@ -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)

View File

@@ -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

View File

@@ -2,18 +2,21 @@
; -------------------------------Locals------------------------------- ; -------------------------------Locals-------------------------------
PostToLocals: PostToLocals:
CurrentSite := "Locals" CurrentSite := "Locals"
; DevModeMsgBox("clik ok to continue")
; @todo: Add auto-login to locals ; @todo: Add auto-login to locals
SaveOrPostProgress(Message:="Navigating to Post Creation Page",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") SaveOrPostProgress(Message:="Navigating to Post Creation Page",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
IniRead, LocalsURL, %SettingsIniFilepath%, %ScriptSettingsSection%, LocalsURL, %A_Space% IniRead, LocalsURL, %SettingsIniFilepath%, %ScriptSettingsSection%, LocalsURL, %A_Space%
if(LocalsURL = "" OR !InStr(LocalsURL, "/share/post")){
Message = Please add your Locals Profile URL to the settings.ini file under`n`n[General]`nLocalsURL=`n`nURL Needs to end in: /share/post 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") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return Return
} }
; /share/post is the legacy new post page.
; Starting in 2024 all posts are published through the home page now.
LocalsURL := StrReplace(LocalsURL, "/share/post")
Status := NavigateFromBaseURLTo(LocalsURL) Status := NavigateFromBaseURLTo(LocalsURL)
if(Status = "Failed") if(Status = "Failed")
@@ -88,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)
@@ -108,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()

View File

@@ -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")

View File

@@ -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 {

View File

@@ -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")

View File

@@ -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)

View File

@@ -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

BIN
Settings.ini Normal file

Binary file not shown.

2
Version.ini Normal file
View File

@@ -0,0 +1,2 @@
[Social-Media-Poster]
Version=2.90