|
|
|
@ -12,7 +12,6 @@ if(InStr(A_ScriptName, ".ahk")){
|
|
|
|
|
|
|
|
|
|
ErrorLoggingDirectory = %1%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Add menus to the toolbar icon
|
|
|
|
|
Menu, tray, NoStandard ; remove standard tray
|
|
|
|
|
|
|
|
|
@ -32,7 +31,7 @@ global UpdateVersionNumber
|
|
|
|
|
|
|
|
|
|
;---Notes/Extra Info/#Includes------------------------------------------------------
|
|
|
|
|
ScriptName = Freedomain Social Media Poster
|
|
|
|
|
ScriptVersion = 2.72
|
|
|
|
|
ScriptVersion = 2.71
|
|
|
|
|
FullScriptName := ScriptName . " " . ScriptVersion
|
|
|
|
|
|
|
|
|
|
;---ToDo---
|
|
|
|
@ -191,10 +190,12 @@ if(ErrorLoggingDirectory = "LastPost"){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; if passed argument is .exe file, then script has just been udpated and we need to move the old version
|
|
|
|
|
if(InStr(ErrorLoggingDirectory,ScriptName, and InStr(ErrorLoggingDirectory,".exe"))){
|
|
|
|
|
|
|
|
|
|
if(InStr(ErrorLoggingDirectory,ScriptName) and InStr(ErrorLoggingDirectory,".exe")){
|
|
|
|
|
SaveOrPostProgress(Message:="Starting Up: Moving Old Version",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar")
|
|
|
|
|
|
|
|
|
|
; create backups folder if it doesn't exist
|
|
|
|
|
BackupsFolder = %LibFolder%\Backups\%ErrorLoggingDirectory%
|
|
|
|
|
BackupsFolder = %LibFolder%\Backups\
|
|
|
|
|
; Msgbox % "BackupsFolder: " BackupsFolder
|
|
|
|
|
|
|
|
|
|
if(!FileExist(BackupsFolder)){
|
|
|
|
|
FileCreateDir, %BackupsFolder%
|
|
|
|
@ -202,13 +203,22 @@ if(InStr(ErrorLoggingDirectory,ScriptName, and InStr(ErrorLoggingDirectory,".exe
|
|
|
|
|
|
|
|
|
|
; move old version to backups folder, overwrite if name conflict
|
|
|
|
|
FileMove, %ErrorLoggingDirectory%, %BackupsFolder%\*, 1
|
|
|
|
|
|
|
|
|
|
MsgBox,,Update Successful, Previous version was backed up to: %BackupsFolder%
|
|
|
|
|
if(ErrorLevel){ ; most likely because the old version hasn't finished exiting yet
|
|
|
|
|
sleep, 2000
|
|
|
|
|
FileMove, %ErrorLoggingDirectory%, %BackupsFolder%\*, 1
|
|
|
|
|
if(ErrorLevel){
|
|
|
|
|
MsgBox,,Update Successful, Update was successful`, but unable to move old version to the Backups folder.`nPlease move it or delete it manually.
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ToolTip
|
|
|
|
|
; MsgBox,,Update Successful, Previous version was backed up to: %BackupsFolder%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StrLen(ErrorLoggingDirectory) > 5){ ; if argument was passed in, read contents from that directory
|
|
|
|
|
if(StrLen(ErrorLoggingDirectory) > 5 and !InStr(ErrorLoggingDirectory, ".exe")){ ; if argument was passed in, read contents from that directory
|
|
|
|
|
SaveOrPostProgress(Message:="Starting Up: Reading Information from Files",PostType:="Tooltip")
|
|
|
|
|
|
|
|
|
|
SkipUpdateCheckThisRun := 1
|
|
|
|
|
|
|
|
|
|
if(InStr(ErrorLoggingDirectory, "VideoLinks.ini")){ ;PASSED IN FROM VIDEO UPLOADER
|
|
|
|
@ -273,6 +283,7 @@ if(StrLen(ErrorLoggingDirectory) > 5){ ; if argument was passed in, read content
|
|
|
|
|
|
|
|
|
|
ReadWebsiteStatuses() ; Read .ini file of post statuses for each site
|
|
|
|
|
}
|
|
|
|
|
; Tooltip
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|