You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
3.1 KiB
Plaintext
77 lines
3.1 KiB
Plaintext
1 year ago
|
|
||
|
PauseBetweenPosts(){
|
||
|
; TimeBetweenpostsInMiliseconds := PauseTimeBetweenPosts*1000
|
||
|
Message = Waiting %PauseTimeBetweenPosts% seconds before Moving on To Next Site
|
||
|
TooltipThis(Message)
|
||
|
; Msgbox % "Message: " Message
|
||
|
; Msgbox % "PauseTimeBetweenPosts: " PauseTimeBetweenPosts
|
||
|
sleep, %TimeBetweenpostsInMiliseconds%
|
||
|
}
|
||
|
|
||
|
|
||
|
ReadWebsiteStatuses(){
|
||
|
; Read status of each website and save them to variables to be used in GUI
|
||
|
IniRead, Gettr, %StatusFileFilePath%, Status, Gettr, %A_Space%
|
||
|
; IniRead, Parler, %StatusFileFilePath%, Status, Parler, %A_Space%
|
||
|
IniRead, Steemit, %StatusFileFilePath%, Status, Steemit, %A_Space%
|
||
|
IniRead, Discord, %StatusFileFilePath%, Status, Discord, %A_Space%
|
||
|
IniRead, SubScribeStar, %StatusFileFilePath%, Status, SubScribeStar, %A_Space%
|
||
|
IniRead, Telegram, %StatusFileFilePath%, Status, Telegram, %A_Space%
|
||
|
IniRead, Minds, %StatusFileFilePath%, Status, Minds, %A_Space%
|
||
|
IniRead, Gab, %StatusFileFilePath%, Status, Gab, %A_Space%
|
||
|
IniRead, Locals, %StatusFileFilePath%, Status, Locals, %A_Space%
|
||
|
IniRead, LinkedIn, %StatusFileFilePath%, Status, LinkedIn, %A_Space%
|
||
|
IniRead, MeWe, %StatusFileFilePath%, Status, MeWe, %A_Space%
|
||
|
IniRead, Twetch, %StatusFileFilePath%, Status, Twetch, %A_Space%
|
||
|
IniRead, ThinkSpot, %StatusFileFilePath%, Status, ThinkSpot, %A_Space%
|
||
|
; 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%
|
||
|
}
|
||
|
|
||
|
; -------------------------------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(){
|
||
|
IniRead, TotalPostsPosted, %SettingsIniFilepath%, SocialMediaPoster, TotalPostsPosted, 0
|
||
|
TotalPostsPosted += 1
|
||
|
IniWrite, %TotalPostsPosted%, %SettingsIniFilepath%, SocialMediaPoster, TotalPostsPosted
|
||
|
}
|
||
|
|
||
|
AddToTotalRunTime(){
|
||
|
IniRead, TotalRunTime, %SettingsIniFilepath%, SocialMediaPoster, TotalRunTime, 0
|
||
|
TotalRunTime := Round(TotalRunTime + ScriptRunTime),2
|
||
|
; TotalRunTime += ScriptRunTime
|
||
|
IniWrite, %TotalRunTime%, %SettingsIniFilepath%, SocialMediaPoster, TotalRunTime
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|