5 Commits
2.92 ... 2.95

10 changed files with 241 additions and 114 deletions

BIN
Assets/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -264,8 +264,11 @@ if(StrLen(ErrorLoggingDirectory) > 5 and !InStr(ErrorLoggingDirectory, ".exe")){
IniRead, RumbleURL, %ErrorLoggingDirectory%,URLs, RumbleURL, %A_Space%
IniRead, BrighteonURL, %ErrorLoggingDirectory%,URLs, BrighteonURL, %A_Space%
IniRead, BitChuteURL, %ErrorLoggingDirectory%,URLs, BitChuteURL, %A_Space%
IniRead, LocalsURL, %ErrorLoggingDirectory%,URLs, LocalsURL, %A_Space%
IniRead, PodcastNumber, %ErrorLoggingDirectory%,Misc, PodcastNumber, %A_Space%
if(BitChuteURL = ""){
if(RumbleURL != "")
VideoURL := RumbleURL
@@ -284,6 +287,10 @@ if(StrLen(ErrorLoggingDirectory) > 5 and !InStr(ErrorLoggingDirectory, ".exe")){
Discord := 0
Telegram := 0
; if videos was uploaded to locals, don't SMP announce
if(LocalsURL)
Locals := 1
}
else, { ; otherwise passed in from a previous run.
@@ -296,7 +303,6 @@ if(StrLen(ErrorLoggingDirectory) > 5 and !InStr(ErrorLoggingDirectory, ".exe")){
ReadWebsiteStatuses() ; Read .ini file of post statuses for each site
}
; Tooltip
}
@@ -342,27 +348,27 @@ TooltipXPosition := Round((A_ScreenWidth / 2) - (A_ScreenWidth / 10)) ; Center T
GuiWidth := 1366
GuiFontSize := 10
TemplatesGroupBoxWidth := 700
MarginSpace = 10
MarginSpaceDoubled := MarginSpace * 2
MarginSize = 10
MarginSizeDoubled := MarginSize * 2
EditBoxWidth := 700
EditBoxHalfWidths := EditBoxWidth / 2 - (MarginSpace * 1.7)
EditBoxThirdsWidth := EditBoxWidth / 3 - (MarginSpace * 1.5)
EditBoxHalfWidths := EditBoxWidth / 2 - (MarginSize * 1.7)
EditBoxThirdsWidth := EditBoxWidth / 3 - (MarginSize * 1.5)
GroupBox_PlatformsWidth := 180
ImageSelectionButtonWidth := 100
ImageFilepathEditBoxWidth := EditBoxWidth - ImageSelectionButtonWidth - MarginSpace
ImageFilepathEditBoxWidth := EditBoxWidth - ImageSelectionButtonWidth - MarginSize
SelectFileButtonWidth := 50
SelectFileButtonXPos := EditBoxWidth - SelectFileButtonWidth - MarginSpace
SelectFileButtonXPos := EditBoxWidth - SelectFileButtonWidth - MarginSize
CharCountXPos := EditBoxWidth - 20
; FilePathEditBoxWidth := EditBoxWidth - SelectFileButtonWidth - MarginSpace
; FilePathEditBoxWidth := EditBoxWidth - SelectFileButtonWidth - MarginSize
PlatformsGroupBoxXLocation := EditBoxWidth + (MarginSpace * 3)
PlatformsGroupBoxXLocation := EditBoxWidth + (MarginSize * 3)
; SettingsGroupBoxXLocation := PlatformsGroupBoxXLocation + ActionButtonWidths
SettingsGroupBoxXLocation := PlatformsGroupBoxXLocation + GroupBox_PlatformsWidth
ActionButtonWidths := 355
ActionButtonHalfWidths := (ActionButtonWidths / 2) - (MarginSpace / 2)
ActionButtonHalfWidths := (ActionButtonWidths / 2) - (MarginSize / 2)
Gui, Margin, %MarginSpace%, %MarginSpace%
Gui, Margin, %MarginSize%, %MarginSize%
GUINormalFontSize := 15
@@ -374,7 +380,7 @@ GUINormalFontSize := 15
Gui, Font, s10
; Gui, Font, s8
if(TestingMode){
Gui, Add, Text,cRed yp+0 x%MarginSpace% ,TESTING MODE
Gui, Add, Text,cRed yp+0 x%MarginSize% ,TESTING MODE
}
if(DevMode){
Gui, Add, Text,cRed yp+0 x+30 ,DEV MODE
@@ -383,32 +389,32 @@ if(DevMode){
Gui, Font, s%GUINormalFontSize%
Gui, Font, Bold
Gui, Add, Text, x%Marginspace% y+5, Post Title
Gui, Add, Text, x%MarginSize% y+5, Post Title
Gui, Font, s8
Gui, Font, Normal
Gui, Font, s8
Gui, Add, Button, x+%MarginSpace% gPasteClipboardToEditBox vPasteClipboardToSMPTitle, Paste Clipboard
Gui, Add, Button, x+%MarginSize% 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, s%GUINormalFontSize%
Gui, Add, Edit, x%MarginSpace% y+%marginspace% w%EditBoxWidth% vPostTitle gUpdateCharCount h50, %PostTitle%
Gui, Add, Edit, x%MarginSize% y+%MarginSize% w%EditBoxWidth% vPostTitle gUpdateCharCount h50, %PostTitle%
Gui, Font, Bold
Gui, Add, Text,, Post Body
Gui, Font, Normal
Gui, Font, s8
Gui, Add, Button, x+%MarginSpace% gPasteClipboardToEditBox vPasteClipboardToSMPBody, Paste Clipboard
Gui, Add, Button, x+%MarginSize% gPasteClipboardToEditBox vPasteClipboardToSMPBody, Paste Clipboard
Gui, Font, s%GUINormalFontSize%
Gui, Add, Edit, x%MarginSpace% y+2 w%EditBoxWidth% h200 vPostBody gUpdateCharCount, %PostBody%
Gui, Add, Edit, x%MarginSize% y+2 w%EditBoxWidth% h200 vPostBody gUpdateCharCount, %PostBody%
; Gui, font, color, cblack
Gui, Font, s%GUINormalFontSize%
Gui, Font, Bold
Gui, Add, Text, x%marginspace% y+%MarginSpace% w%EditBoxWidth% ,Tags
Gui, Add, Text, x%MarginSize% y+%MarginSize% w%EditBoxWidth% ,Tags
Gui, Font, s7
Gui, Font, Normal
Gui, Add, Text, x65 yp+7, (Required by Steemit, Bastyon, )
@@ -419,37 +425,39 @@ Gui, Add, Edit,yp-5 x%CharCountXPos% w30 vCharCount,
Gui, Font, s%GUINormalFontSize%
Gui, Font, Normal
Gui, Add, Edit, x%MarginSpace% y+10 vPostTags gUpdateVars h33 w%EditBoxWidth%, %PostTags%
Gui, Add, Edit, x%MarginSize% y+10 vPostTags gUpdateVars h33 w%EditBoxWidth%, %PostTags%
Gui, Font, s%GUINormalFontSize%
Gui, Font, Bold
Gui, Add, Text,x%marginspace% w%EditBoxWidth%, Image Attachment Filepath
Gui, Add, Text,x%MarginSize% w%EditBoxWidth%, Image Attachment Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSpace% y+2 vImageAttachmentFilepath gUpdateVars h33 w%ImageFilepathEditBoxWidth%, %ImageAttachmentFilepath%
Gui, Add, Edit, x%MarginSize% y+2 vImageAttachmentFilepath gUpdateVars h33 w%ImageFilepathEditBoxWidth%, %ImageAttachmentFilepath%
Gui, Add, Button, gSelectFilepath w%ImageSelectionButtonWidth% x+M yp+0 h33, Select
Gui, Font, Bold
Gui, Add, GroupBox,r2.5 x%MarginSpace% y+20 Center w%TemplatesGroupBoxWidth%, Other
Gui, Add, GroupBox,r2.5 x%MarginSize% y+20 Center w%TemplatesGroupBoxWidth%, Other
Gui, Font, Normal
Gui, Add, Button,xp+%Marginspace% yp+35 w%EditBoxThirdsWidth% h30 gSaveAsTemplate, Save As Template
Gui, Add, Button,x+%MarginSpace% w%EditBoxThirdsWidth% h30 gLoadTemplate, Load Template
Gui, Add, Button, x+%MarginSpace% w%EditBoxThirdsWidth% h30 gLoadLastPost, Load Last Post
Gui, Add, Button,xp+%MarginSize% yp+35 w%EditBoxThirdsWidth% h30 gSaveAsTemplate, Save As Template
Gui, Add, Button,x+%MarginSize% w%EditBoxThirdsWidth% h30 gLoadTemplate, Load Template
Gui, Add, Button, x+%MarginSize% w%EditBoxThirdsWidth% h30 gLoadLastPost, Load Last Post
if(UpdateAvailable)
Gui, Add, Button, x%MarginSpaceDoubled% y+%MarginSpace% w%EditBoxHalfWidths% h30 gUpdateScript vUpdateAvailable, Update Available: %UpdateVersionNumber%
/*if(UpdateAvailable)
Gui, Add, Button, x%MarginSizeDoubled% y+%MarginSize% w%EditBoxHalfWidths% h30 gUpdateScript vUpdateAvailable, Update Available: %UpdateVersionNumber%
else,
Gui, Add, Button, x%MarginSpaceDoubled% y+%MarginSpace% w%EditBoxHalfWidths% h30 gUpdateScript vUpdateAvailable, Poster Up-to-Date
*/
Gui, Add, Button, x%MarginSizeDoubled% y+%MarginSize% w%EditBoxHalfWidths% h30 gUpdateScript vUpdateAvailable, %ScriptAbbreviatedName% Up-to-Date
/*
if(ChromeUpdateAvailable)
Gui, Add, Button,x+%MarginSpace% yp+0 w%EditBoxHalfWidths% h30 vChromeUpdateAvailable gUpdateChrome, Chrome Update Available!
Gui, Add, Button,x+%MarginSize% yp+0 w%EditBoxHalfWidths% h30 vChromeUpdateAvailable gUpdateChrome, Chrome Update Available!
else,
Gui, Add, Button,x+%MarginSpace% yp+0 w%EditBoxHalfWidths% h30 vChromeUpdateAvailable gUpdateChrome , Chrome Up-to-Date
*/
Gui, Add, Button,x+%MarginSize% yp+0 w%EditBoxHalfWidths% h30 vChromeUpdateAvailable gUpdateChrome , Chrome Up-to-Date
if(DevMode){
Gui, Add, Button, x%MarginSpace% y+10 w%EditBoxThirdsWidth% h30 gOpenErrorLog, OpenErrorLog
Gui, Add, Button, x%MarginSize% y+10 w%EditBoxThirdsWidth% h30 gOpenErrorLog, OpenErrorLog
}
@@ -602,31 +610,6 @@ UpdateScript()
Return
UpdateChrome:
if(CheckForChromeUpdates = "")
Status := CheckForChromeUpdates(ChromeFilepath)
if(!status){
OnMessage(0x44, "OnMsgBoxConfirmChromiumOverwrite")
MsgBox 0x41, Already Up-to-Date, Yor current Chromium version is already up to date. `nDo you want to download and overwrite it?
OnMessage(0x44, "")
IfMsgBox OK, {
Return
} Else IfMsgBox Cancel, {
}
}
Status := DownloadLatestChromium()
if(Status)
GuiControl,,ChromeUpdateAvailable, Chrome Up-to-Dat
Return
/*
*/
@@ -636,9 +619,6 @@ GuiClose:
Gui, Submit,
Return
OpenErrorLog:
run, %ErrorLoggingDirectory%
Return
ToggleTestingMode:
ToggleTestingMode()
@@ -655,9 +635,6 @@ ToggleDevMode()
run, "%A_ScriptFullPath%" "LastPost"
Return
OpenGiteaPage:
run, https://freedomain.dev/yuriy/social-media-poster
Return
CompileScript:
; msgbox, compiling
@@ -705,8 +682,8 @@ Gui, Destroy
Gui, Font, Normal
Gui, Font, s20
Gui, Add, Text, Center w350 x%marginspace%,Time to Post At
Gui, Add, DateTime, x%marginspace% vScheduledTime gUpdateVars w350, hh:mm tt
Gui, Add, Text, Center w350 x%MarginSize%,Time to Post At
Gui, Add, DateTime, x%MarginSize% vScheduledTime gUpdateVars w350, hh:mm tt
Gui, Font, s8
Gui, Add, Checkbox, vDisplayCountdownTooltip gUpdateVars checked, Display Tooltip with Countdown
Gui, Font, s20
@@ -753,7 +730,6 @@ if(InStr(ErrorLoggingDirectory, "\Templates\") OR ErrorLoggingDirectory = "" OR
; Save Script Settings to File
; ------------------------------------------------
IniWrite, %XPosition%, %SettingsIniFilepath%, %ScriptSettingsSection%, XPosition
IniWrite, %YPosition%, %SettingsIniFilepath%, %ScriptSettingsSection%, YPosition
@@ -769,7 +745,7 @@ IniWrite, %ErrorLoggingDirectory%, %SettingsIniFilepath%, %ScriptSettingsSection
IniWrite, %ConfirmBeforeSubmit%, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit
; IniWrite, %SaveGUIPosition%, %SettingsIniFilepath%, %ScriptSettingsSection%, SaveGUIPosition
; Used by Post Scheduler, filepath changes between script updates
; Used by Post Scheduler, VU, Livestream Scheduler. Filepath changes between script updates
IniWrite, %A_ScriptFullPath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath
@@ -819,11 +795,8 @@ IniWrite, %ShowTooltipProgress%, %SettingsIniFilepath%, SocialMediaPoster, ShowT
(Locals = 1)?(PostedWebsites .= "Locals|") : ()
(LinkedIn = 1)?(PostedWebsites .= "LinkedIn|") : ()
(Twetch = 1)?(PostedWebsites .= "Twetch|") : ()
; (ThinkSpot = 0)?(PostedWebsites .= "ThinkSpot|") : ()
; (Flote = 1)?(PostedWebsites .= "Flote|") : ()
(PocketNet = 1)?(PostedWebsites .= "PocketNet|") : ()
(Gettr = 1)?(PostedWebsites .= "Gettr|") : ()
; (Parler = 1)?(PostedWebsites .= "Parler|") : ()
(Steemit = 1)?(PostedWebsites .= "Steemit|") : ()
(Pintrest = 1)?(PostedWebsites .= "Pintrest|") : ()
(Tumblr = 1)?(PostedWebsites .= "Tumblr|") : ()
@@ -832,16 +805,11 @@ Message = Starting SMP with: **V%ScriptVersion%** `nTo sites: %PostedWebsites% `
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,DiscordErrorLogging")
if(InStr(PostBody, "www.dlive.tv") AND !InStr(PostBody, "https://www.dlive.tv")){ ; if posting Dlive link, turn it into hyperlink
PostBody := StrReplace(PostBody, "www.dlive.tv", "https://www.dlive.tv")
}
; Msgbox % "PostTitleAndBody: " PostTitleAndBody
; 20211023060415
if(ScheduledPost){
; CheckSeleniumDriver()
; Menu, Tray, Icon, %A_ScriptDir%\Lib\FreedomainShare_Scheduled.ico
@@ -938,9 +906,9 @@ WebsiteButtonWidths = 115
WebsiteStatusEditWidths = 150
StatusTextWidth := (WebsiteButtonWidths + WebsiteStatusEditWidths) * 2
StatusTextSecondRowXPos := WebsiteStatusEditWidths + WebsiteButtonWidths + (MarginSpace * 4)
ErrorSummaryLogXPos := StatusTextSecondRowXPos + WebsiteStatusEditWidths + WebsiteButtonWidths + (MarginSpace * 2)
ErrorSummaryLogSplitLineXPos := ErrorSummaryLogXPos - (MarginSpace)
StatusTextSecondRowXPos := WebsiteStatusEditWidths + WebsiteButtonWidths + (MarginSize * 4)
ErrorSummaryLogXPos := StatusTextSecondRowXPos + WebsiteStatusEditWidths + WebsiteButtonWidths + (MarginSize * 2)
ErrorSummaryLogSplitLineXPos := ErrorSummaryLogXPos - (MarginSize)
ErrorLogSummaryWidth := 385
ErrorLogSummaryHeight := 480
ButtonHeights := 30
@@ -950,40 +918,40 @@ ButtonHeights := 30
Gui, Font, s%GUINormalFontSize%
Gui, Font, Bold
Gui, Add, Text,w%StatusTextWidth% y%MarginSpace% Center, Status
Gui, Add, Text,w%StatusTextWidth% y%MarginSize% Center, Status
Gui, Add, Button,x%MarginSpace% y40 w%WebsiteButtonWidths% Center h%ButtonHeights%, Discord
Gui, Add, Button,x%MarginSize% y40 w%WebsiteButtonWidths% Center h%ButtonHeights%, Discord
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Discord%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% Center h%ButtonHeights%, Telegram
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% Center h%ButtonHeights%, Telegram
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Telegram%
gui, font, s8
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% Center h%ButtonHeights%, SubScribeStar
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% Center h%ButtonHeights%, SubScribeStar
Gui, Font, s%GUINormalFontSize%
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %SubscribeStar%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, Minds
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, Minds
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Minds%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, Gab
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, Gab
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Gab%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, Locals
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, Locals
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Locals%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, Gettr
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, Gettr
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Gettr%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths%Center h%ButtonHeights%, Twetch
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths%Center h%ButtonHeights%, Twetch
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Twetch%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, LinkedIn
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, LinkedIn
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %LinkedIn%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, MeWe
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, MeWe
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %MeWe%
@@ -996,51 +964,53 @@ Gui, Font, s%GUINormalFontSize%
; Gui, Font, s%GUINormalFontSize%
; Gui, Add, Button,x%StatusTextSecondRowXPos% y+%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, Flote
; Gui, Add, Button,x%StatusTextSecondRowXPos% y+%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, Flote
; Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Flote%
; Gui, Add, Button,x%StatusTextSecondRowXPos% y+%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% gActivateParlerTab Center, Parler
; Gui, Add, Button,x%StatusTextSecondRowXPos% y+%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% gActivateParlerTab Center, Parler
; Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Parler%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, Steemit
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, Steemit
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Steemit%
; Gui, Add, Button,x%StatusTextSecondRowXPos% y+%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, Pintrest
; Gui, Add, Button,x%StatusTextSecondRowXPos% y+%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, Pintrest
; Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Pintrest%
Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, Bastyon
Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, Bastyon
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %PocketNet%
; Gui, Add, Button,x%StatusTextSecondRowXPos% y+%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, Tumblr
; Gui, Add, Button,x%StatusTextSecondRowXPos% y+%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, Tumblr
; Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %Tumblr%
; Gui, Font, s9
/*
Gui, Add, Button, x%MarginSpace% y+20 w165 h50 gCancelPost, Close
Gui, Add, Button, x+%Marginspace% w215 h50 gSendErrorLoggingThroughTelegram, Telegram Detailed Errorlog
Gui, Add, Button, x%MarginSize% y+20 w165 h50 gCancelPost, Close
Gui, Add, Button, x+%MarginSize% w215 h50 gSendErrorLoggingThroughTelegram, Telegram Detailed Errorlog
*/
Gui, Font, s8
Gui, Add, Button, x%StatusTextSecondRowXPos% y40 w270 h40 Center gCopyPostToClipboard, Copy Post To Clipboard `nFor Easy Pasting to Other Sites
Gui, Add, Button, x%StatusTextSecondRowXPos% y+%marginspace% w270 h40 Center gCopyImageFilepathToClipboard, Copy Image Filepath To Clipboard
Gui, Add, Button, x%StatusTextSecondRowXPos% y+%marginspace% h50 w270 h80 gTryFailedAgain, Try Failed Again
Gui, Font, s10
Gui, Add, Button, x%StatusTextSecondRowXPos% y40 w270 h40 Center gCopyPostToClipboard, Copy Post To Clipboard
Gui, Add, Button, x%StatusTextSecondRowXPos% y+%MarginSize% w270 h40 Center gCopyImageFilepathToClipboard, Copy Image Filepath To Clipboard
Gui, Font, s%GUINormalFontSize%
Gui, Add, Button, x%StatusTextSecondRowXPos% y+%MarginSize% w270 h40 gOpenGiteaPage, Report Bug
Gui, Add, Button, x%StatusTextSecondRowXPos% y+%MarginSize% w270 h80 gTryFailedAgain, Try Failed Again
/*Gui, Add, Button,x%MarginSpace% w%WebsiteButtonWidths% h%ButtonHeights% Center, PocketNet
/*Gui, Add, Button,x%MarginSize% w%WebsiteButtonWidths% h%ButtonHeights% Center, PocketNet
Gui, Add, Edit, x+5 w%WebsiteStatusEditWidths% h%ButtonHeights%, %PocketNet%
*/
Gui, Font, s%GUINormalFontSize%
Gui, Font, Bold
; gui, add, text, x%ErrorSummaryLogSplitLineXPos% y20 h200 0x11 ; 0x11 is a "line" ; refer to here: https://autohotkey.com/board/topic/50910-draw-line-gui/
Gui, Add, Text, x%ErrorSummaryLogXPos% y%MarginSpace% w%ErrorLogSummaryWidth% Center, Error Log Summary
Gui, Add, Text, x%ErrorSummaryLogXPos% y%MarginSize% w%ErrorLogSummaryWidth% Center, Error Log Summary
Gui, Font, Normal
Gui, Font, s10
Gui, Add, Edit, x%ErrorSummaryLogXPos% y+%MarginSpace% w%ErrorLogSummaryWidth% h%ErrorLogSummaryHeight%, %ErrorLogVar%
Gui, Add, Edit, x%ErrorSummaryLogXPos% y+%MarginSize% w%ErrorLogSummaryWidth% h%ErrorLogSummaryHeight%, %ErrorLogVar%
Gui, Font, s%GUINormalFontSize%
gui, font, s6

View File

@@ -27,7 +27,7 @@ ReadWebsiteStatuses(){
; IniRead, Flote, %StatusFileFilePath%, Status, Flote, %A_Space%
IniRead, PocketNet, %StatusFileFilePath%, Status, PocketNet, %A_Space%
; IniRead, Pintrest, %StatusFileFilePath%, Status, Pintrest, %A_Space%
; IniRead, Tumblr, %StatusFileFilePath%, Status, Tumblr, %A_Space%
IniRead, Tumblr, %StatusFileFilePath%, Status, Tumblr, %A_Space%
}
AddToTotalPostsPostedCount(){

View File

@@ -83,9 +83,12 @@ if(ImageAttachmentFilepath != ""){
if(!InStr(Status, "id")){
parsed := JSON.Load(Status)
Error := parsed.content[1]
; Msgbox % "error: " error
Message = Discord Post Failed due to API Issue. Error was saved to errorlog; please forward to Yuriy
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Message = Discord Post Failed due to API Issue. Please See ErrorLog for details
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Message = Discord API Returned Data:`n %Error%
SaveOrPostProgress(Message,PostType:=",ErrorLoggingTextFile")
Return
}
}

View File

@@ -43,7 +43,7 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
loop, 3 {
Xpath = (//span[normalize-space()='Start a post'])[1] ; start a post button
Xpath = (//span[normalize-space()='Start a post, try writing with AI'])[1] ; start a post button
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(!Status)
Break

View File

@@ -65,7 +65,12 @@ if(Status){
Return
}
; click the "Hide Links Preview" checkbox to hide previews of hyperlinks
if(InStr(PostBody, "https")){
Xpath = (//div[@class='hide-switcher-container'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=100)
}
if(ImageAttachmentFilepath != ""){

View File

@@ -88,9 +88,12 @@ TelegramBody := ASCIISTRReplace(PostBody)
Status := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := Message )
}
if(Status){
Message = Upload Failed due to API issue. Telegram API Returned Value:`n %Status%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
if(instr(Status, "error_code")){
Message = Upload Failed Due To API Issue. Please See Error Log For Details
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Message = Telegram API Returned Data:`n %Status%
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")
Return
}

146
Modules/Post-To-Tumblr.ahk Normal file
View File

@@ -0,0 +1,146 @@
; -------------------------------Minds-------------------------------
PostToTumblr:
CurrentSite := "Tumblr"
Message = Navigating to Post Creationg Page
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
URLAttempt := NavigateFromBaseURLTo("https://www.tumblr.com/")
if(URLAttempt = "Failed")
Return
Status := CheckCurrentTabForCurrentSite()
if(Status){
Return
}
; Check Login Status
; ------------------------------------------------
Message = Checking Login Status
SaveOrPostProgress(Message,PostType:="Tooltip")
Xpath = (//button[normalize-space()='Photo'])[1]
try ElementInnerText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
if(ElementInnerText != "Photo"){
Message = Site is Logged out. Please log back in.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; Start Text Post
; ------------------------------------------------
Message = Creating New Post
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Xpath = (//button[normalize-space()='Text'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(status){
Message = Failed to Start Post. Check Login Status
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Xpath = (//span[@data-rich-text-placeholder='Title'])[1]
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=PostTitle, ClearElement:=0)
if(status){
Message = Failed to Input Post Title
SaveOrPostProgress(Message,PostType:=",ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Xpath = (//span[@data-rich-text-placeholder='Go ahead, put anything.'])[1]
; newline is needed so the "attach image" to post option appears in the next line down
PostBodyWithNewLine = %PostBody%`n
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=1000,StringTextContent:=PostBodyWithNewLine, ClearElement:=0)
if(status){
Message = Failed To Input Post Body
SaveOrPostProgress(Message,PostType:=",ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
if(ImageAttachmentFilepath){
; Click the Photo Icon on the next line down to attach an image
Xpath = (//button[@title='Add photo'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(status){
Message = Failed to Click Attach Image Button
SaveOrPostProgress(Message,PostType:=",ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; send image filepath to element to attach picture
Xpath = (//input[@role='button'])[1]
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=ImageAttachmentFilepath, ClearElement:=0)
if(status){
Message = Failed to Attach Image to Post
SaveOrPostProgress(Message,PostType:=",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
}
Xpath = (//span[normalize-space()='Post now'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(status){
Message = Failed to Click Post Now Button
SaveOrPostProgress(Message,PostType:=",ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
/*; start photo post button
Xpath = (//button[normalize-space()='Photo'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(status){
Message = Failed to Start Post
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
if(ImageAttachmentFilepath){
; Attach Image
Xpath = (//input[@role='button'])[1]
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=ImageAttachmentFilepath, ClearElement:=0)
if(status){
Message = Failed to Attach Image
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
}
; input Text Post
Xpath = (//span[@data-rich-text-placeholder='Go ahead, put anything.'])[1]
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=)
*/
IniWrite, Successful, %StatusFileFilePath%, Status, %CurrentSite%
AddToTotalPostsPostedCount()
PauseBetweenPosts()
DevModeMsgBox("done!")
Message = Post Publish Successful
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Return
; -------------------------------/Minds-------------------------------

View File

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