corgano Posted January 16, 2010 Posted January 16, 2010 I made this portable launcher for creeper world (the full version, http://knucklecracker.com/) and I thought I would share it with you! If anyone would care to look through it, and make sure I didn't miss anything important that would be appreciated expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: corgano Script Function: portible launcher for creeper world #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <WindowsConstants.au3> $sublocal = False If FileExists(@scriptdir & "\creeper world.exe") = 0 Then MsgBox(0,"Error","Creeper World not found. Place this in the Creeper world folder and run it again. Loader will now exit") Exit EndIf DirGetSize(@scriptdir & "\loaderdata") If @error = 1 Then If MsgBox(4,"Error","No savedata was found. Load savedata from local mechine?") = 6 Then DirMove("C:\Users\"&@UserName&"\AppData\Roaming\CreeperWorld",@ScriptDir&"\loaderdata") EndIf EndIf DirGetSize("C:\Users\"&@UserName&"\AppData\Roaming\CreeperWorld") $yn = @error If $yn = 0 Then TrayTip("","suppress local savadata",3,1) DirMove("C:\Users\"&@UserName&"\AppData\Roaming\CreeperWorld","C:\Users\"&@UserName&"\AppData\Roaming\loaderdata\CreeperWorld",1) EndIf TrayTip("","move savedata to pc",3,1) DirRemove("C:\Users\"&@UserName&"\AppData\Roaming\CreeperWorld") DirCopy(@ScriptDir&"\loaderdata","C:\Users\"&@UserName&"\AppData\Roaming\CreeperWorld",1) TrayTip("","gamestart",3,1) ShellExecute(@scriptdir&"\creeper world.exe") WinWait("Creeper World") $pid=WinGetProcess("Creeper World") $running = $pid While $running = $pid $running = ProcessExists($pid) Sleep(100) WEnd TrayTip("","move savedata to memorystick",3,1) DirMove("C:\Users\"&@UserName&"\AppData\Roaming\CreeperWorld",@ScriptDir&"\loaderdata",1) DirRemove("C:\Users\"&@UserName&"\AppData\Roaming\CreeperWorld") If $yn = 0 Then TrayTip("","reinstate local data",3,1) DirMove("C:\Users\"&@UserName&"\AppData\Roaming\loaderdata\CreeperWorld","C:\Users\"&@UserName&"\AppData\Roaming\CreeperWorld",1) DirRemove("C:\Users\"&@UserName&"\AppData\Roaming\loaderdata\CreeperWorld") EndIf cheers 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now