Guest User

Update Script

a guest
Jul 27th, 2012
739
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version := 0.1
  2.  
  3. Filedelete,update.bat
  4.  
  5. UrlDownloadToFile, http://www.autohotkey.net/~lace/Gang-Keybinder/version.txt, version.txt
  6. FileRead, newver, version.txt
  7. FileDelete, version.txt
  8. if (version < newver)
  9.   {
  10.     newververfügbar := 1
  11.     MsgBox, 4,Aktuelle Version, Lieber Benutzer,`n`nEs ist eine aktuellere Version deines Keybinders verfügbar, (Version %newver%).`nMöchtest du diese jetzt herunterladen?
  12.     IfMsgBox, Yes
  13.     {
  14.  
  15.         MsgBox, 64, Update Download, Das Update wird nun heruntergeladen ,dies kann bis zu 20 Sekunden dauern..., 3
  16.         Urldownloadtofile,http://www.autohotkey.net/~lace/Gang-Keybinder/Gang-Keybinder.exe, %A_ScriptName%.new
  17.         BatchFile=
  18.         (
  19.         Ping 127.0.0.1
  20.         Del "%A_ScriptName%"
  21.         Rename "%A_ScriptName%.new" "%A_ScriptName%
  22.         cd "%A_ScriptFullPath%"
  23.         "%A_ScriptName%"
  24.         Del update.bat
  25.         )
  26.  
  27.         FileDelete,update.bat
  28.         FileAppend,%BatchFile%,update.bat
  29.         MsgBox, 64, Update ausführen, Das Update wird nun ausgeführt...bitte warten..., 3
  30.         Run,update.bat,,hide
  31.         Exitapp
  32.         }
  33.     }
  34. else
  35.  {
  36.     newververfügbar := 0
  37. }
Advertisement
Add Comment
Please, Sign In to add comment