Guest User

Untitled

a guest
Feb 26th, 2011
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.58 KB | None | 0 0
  1. #NoTrayIcon
  2. #Region
  3. #AutoIt3Wrapper_Icon=Icon.ico
  4. #AutoIt3Wrapper_Outfile=Launcher.exe
  5. #EndRegion
  6. ; ================================;
  7. ; Minecraft Launcher
  8. ; Made by Kazu
  9. ; © 2011 Kingdom Sieger Networks
  10. ; ================================;
  11.  
  12. ;====Includes====;
  13. #include <ButtonConstants.au3>
  14. #include <GUIConstantsEx.au3>
  15. #include <ProgressConstants.au3>
  16. #include <StaticConstants.au3>
  17. #include <WindowsConstants.au3>
  18.  
  19. ;=====FileInstall=====;
  20. FileInstall("logo.jpg", "logo.jpg")
  21.  
  22. ;====GUI====;
  23. $GUI = GUICreate("Legendary-Network.eu Minecraft", 415, 181, 262, 208)
  24. $GUI_OPT = GUICtrlCreateMenu("&Optionen")
  25. $GUI_NAME = GUICtrlCreateMenuItem("Name bearbeiten", $GUI_OPT)
  26. $GUI_HP = GUICtrlCreateMenuItem("Homepage", $GUI_OPT)
  27. $GUI_EXI = GUICtrlCreateMenuItem("Beenden", $GUI_OPT)
  28. $GUI_UPDATE = GUICtrlCreateButton("Auf Updates prüfen", 8, 88, 125, 33, $WS_GROUP)
  29. $GUI_START = GUICtrlCreateButton("Spiel starten", 144, 88, 125, 33, $WS_GROUP)
  30. $GUI_EXIT = GUICtrlCreateButton("Beenden", 280, 88, 125, 33, $WS_GROUP)
  31. $GUI_UPD_BAR = GUICtrlCreateProgress(8, 128, 400, 25)
  32. $GUI_IMG = GUICtrlCreatePic(@ScriptDir & "\logo.jpg", 16, 8, 390, 80, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
  33. GUISetState(@SW_SHOW)
  34.  
  35. ;===Variable===;
  36. $ServerINI = @ScriptDir & "\serverversion.ini"
  37. $Ini1 = IniRead(@ScriptDir & "\serverversion.ini", "Update", "Version", "0.0")
  38. $Ini2 = IniRead(@ScriptDir & "\localversion.ini", "Update", "Version", "0.0")
  39. $dl = IniReadSection($ServerINI, "Client")
  40. $url = "http://46.4.146.40/minecraft/updates/"
  41. $sString = BinaryToString(InetRead('http://46.4.146.40/minecraft/updates/serverversion.ini', 1), 4)
  42. $hFile = FileOpen(@ScriptDir & "\serverversion.ini", 2)
  43.  
  44. ;====Funktionen====;
  45. While 1
  46.     $nMsg = GUIGetMsg()
  47.     Switch $nMsg
  48.         Case $GUI_EVENT_CLOSE
  49.             Exit
  50.         Case $GUI_EXIT
  51.             Exit
  52.         Case $GUI_EXI
  53.             Exit
  54.         Case $GUI_NAME
  55.             ShellExecute("namechanger.exe", "/noSound", @AppDataDir & "\.minecraft\bin\")
  56.         Case $GUI_HP
  57.             ShellExecute("http://46.4.146.40/minecraft/index.html")
  58.         Case $GUI_UPDATE
  59.             _updatecheck()
  60.         Case $GUI_START
  61.             ShellExecute("Minecraft.exe", "", @AppDataDir & "\.minecraft\")
  62.             If Not @error Then Exit
  63.     EndSwitch
  64. WEnd
  65.  
  66. ;===Funktionen===;
  67. Func _updatecheck()
  68.     FileWrite($hFile, $sString)
  69.     FileClose($hFile)
  70.     If $Ini1 <> $Ini2 Then
  71.         $iMsgBoxAnswer = MsgBox(52, "Aktualisierung gefunden!", "Es wurde eine Aktualisierung gefunden." & @CRLF & "Möchten Sie diese herunterladen?")
  72.         Select
  73.             Case $iMsgBoxAnswer = 6
  74.                 InetGet($dl, "test.au3", 1)
  75.             Case $iMsgBoxAnswer = 7
  76.                 Exit
  77.         EndSelect
  78.     EndIf
  79. EndFunc   ;==>_updatecheck
Advertisement
Add Comment
Please, Sign In to add comment