For those who are more interested, here is a more dev'd version for XP in AHK. I noticed that I haven't uploaded it, so I'll just leave the old compiled one and post the newer one as script. Here it is:
Code: Select all
; SynDOSCFG_v1.4.4r146_AHKfXP
; SynDOSCFGfXPv1.0.1r1
;The following must prevent running this script on an OS else than Windows XP
if A_OSVersion not in WIN_XP
{
MsgBox Windows XP is required to run this script.`nOther OS's aren't supported.
ExitApp
}
; To prevent dealing problems with Main/Menu, Menu will direct automatically to Main.
Menu:
Goto, Main
; Mainmenu
Main:
Gui, Add, Picture, x556 y47 w120 h120 , C:\Users\SLC\Desktop\UsefulUtilities2\SynDOSCFG\synicogif3.ico
Gui, Add, Text, x226 y7 w220 h20 +Multi, SynDOSCFG v1.0.1r1_Windows XP version
Gui, Add, Text, x186 y47 w190 h20 , Synthesia configurationfiles to desktop
Gui, Add, Text, x246 y87 w270 h20 , Synthesia is made and copyrighted by Nicholas.
Gui, Add, Text, x246 y107 w270 h20 , SynDOSCFG is an open-source AutoHotkeyscript, see
Gui, Add, Text, x246 y127 w270 h20 , SynDOSCFG's website for source and latest version.
Gui, Add, Text, x556 y167 w120 h30 +Center, For Keyboard-only navigation press [Alt]
Gui, Add, GroupBox, x6 y17 w540 h60 , Main options
Gui, Add, GroupBox, x6 y77 w230 h120 , Other options
Gui, Add, Button, x16 y37 w140 h30 +Center gBackup, &Backup
Gui, Add, Button, x396 y37 w140 h30 gRestore, &Restore
Gui, Add, Button, x26 y97 w190 h30 gAppDataOpen, Open Synthesia's &AppData Location
Gui, Add, Button, x26 y127 w190 h30 gSecConfigMgr, Open Synthesia's &Config Manager
Gui, Add, Button, x26 y157 w190 h30 gSynLaunch, &Launch Synthesia if present
Gui, Add, Button, x246 y157 w120 h30 gSynLaunchWeb, Synthesia's mainpage
Gui, Add, Button, x396 y157 w120 h30 gSynDOSCFGWeb, &SynDOSCFG's website
; Generated using SmartGUI Creator 4.0
Gui, Show, x8 y291 h208 w685, New GUI Window
Return
; Backup, Checks if configurationfiles to copy exist
Backup:
IfExist, "%A_AppData%\Synthesia"
Goto, Backup2
IfNotExist, "%A_AppData%\Synthesia"
Goto, Error05
Return
; Configurationfiles found, user must input confirmation to copy
Backup2:
MsgBox, 4, Configurationfiles found. Copy configurationfiles to Desktop\SynCFG?`nExisting files won't be overridden.
IfMsgBox Yes
Goto, Backup3
IfMsgBox No
Goto, Main
Return
; User confirmed to copy and files will be copied
Backup3:
FileCopy, "%A_AppData%\Synthesia\*.*", "%A_Desktop%\SynCFG"
MsgBox, 0, Backup Succesful, Backup done.
IfMsgBox OK
Goto, Main
Return
; Restore, Checks if Desktop\SynCFG exist
Restore:
IfExist, "%A_Desktop%\SynCFG"
Goto, Restore2
IfNotExist, "%A_Desktop%\SynCFG"
Goto, Error06
Return
; Desktop\SynCFG found, user must input confirmation to restore
Restore2:
MsgBox, 4, Configurationfiles found. Restore configurationfiles to Desktop\SynCFG?`nExisting files won't be overridden.
IfMsgBox Yes
Goto, Restore3
IfMsgBox No
Goto, Main
Return
; User confirmed to restore and files will be restored
Restore3:
FileCopy, "%A_Desktop%\SynCFG", "%A_AppData%\Synthesia\*.*"
MsgBox, 0, Configurationfiles restored succesfully., The configurationfiles are restored.
IfMsgBox OK
Goto, Main
Return
; Opens the %AppData%\Synthesia if exists
AppDataOpen:
IfExist, "%A_AppData%\Synthesia"
Run, "%A_AppData%\Synthesia"
IfNotExist, "%A_AppData%\Synthesia"
Goto, Error07
Return
; Opens Synthesia's own Config Manager if exists
SecConfigMgr:
IfExist, "%SYSTEMDRIVE%\Program Files\Synthesia\SynthesiaConfig.exe"
Run, "%SYSTEMDRIVE%\Program Files\Synthesia\SynthesiaConfig.exe"
IfNotExist, "%SYSTEMDRIVE%\Program Files\Synthesia\SynthesiaConfig.exe"
Goto, Error07
Return
; Executes Synthesia from Program Files if exists
SynLaunch:
IfExist, "%SYSTEMDRIVE%\Program Files\Synthesia\Synthesia.exe"
Run, "%SYSTEMDRIVE%\Program Files\Synthesia\Synthesia.exe"
IfNotExist, "%SYSTEMDRIVE%\Program Files\Synthesia\Synthesia.exe"
Goto, Error07
Return
; Opens the webpage of Synthesia in Internet Explorer
SynLaunchWeb:
IfExist, "%SYSTEMDRIVE%\Program Files\Internet Explorer\iexplore.exe"
Run, "%SYSTEMDRIVE%\Program Files\Internet Explorer\iexplore.exe http://www.synthesiagame.com/"
IfNotExist, "%SYSTEMDRIVE%\Program Files\Internet Explorer\iexplore.exe"
Goto, Error08
Return
; Opens the topic of SynDOSCFG on Synthesia's Forum in Internet Explorer
SynDOSCFGWeb:
IfExist, "%SYSTEMDRIVE%\Program Files\Internet Explorer\iexplore.exe"
Run, "%SYSTEMDRIVE%\Program Files\Internet Explorer\iexplore.exe https://www.synthesiagame.com/forum/viewtopic.php?f=3&t=2972#p18788"
IfNotExist, "%SYSTEMDRIVE%\Program Files\Internet Explorer\iexplore.exe"
Goto, Error08
Return
; If any error will occur, this series of messageboxes will warn what went wrong, else AutoHotkey does (thus, a scriptfault)
Error05:
MsgBox, 0, SynDOSCFG, Error 5`nSynDOSCFG could not find %AppData%\Synthesia.`nSynthesia may not be installed.
Goto, Main
Return
Error06:
MsgBox, 0, SynDOSCFG, Error 6`nSynDOSCFG could not find Desktop\SynCFG.
Goto, Main
Return
Error07:
MsgBox, 0, SynDOSCFG, Error 7`nSynDOSCFG could not find the location %AppData%\Synthesia.`nSynthesia may not be installed.
Goto, Main
Return
Error08:
MsgBox, 0, SynDOSCFG, Error 7`nSynDOSCFG could not find Internet Explorer.`nInternet Explorer may be uninstalled.
Goto, Main
Return
;Where the application quits at all time
GuiClose:
ExitApp