Danke, hier ist mein Code.
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("TagNachtScript", 249, 218, 390, 356)
GUISetFont(8, 800, 0, "Rockwell")
GUISetBkColor(0x99B4D1)
$Button1 = GUICtrlCreateButton("Tag", 8, 96, 233, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Nacht", 8, 128, 233, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Einstellung", 8, 8, 233, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Exit", 8, 184, 233, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Hilfe", 8, 40, 233, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
MsgBox( 0, "WICHTIG", "WICHTIG: Minecraft muss in Vollbildmodus sein, das heist nicht F11 sondern Maximieren." )
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MsgBox( 0, "Error", "Wenn Minecraft nicht gestartet ist schliest sich das Programm!")
If NOT ProcessExists("javaw.exe") Then Exit
If ProcessExists ("javaw.exe") Then MsgBox (0,"Check","CHECK: Ok, Minecraft ist gestartet.")
$pos = PixelSearch( 0, 993, 1276, 1021, 7974988,0)
If isArray($pos) then
MouseMove($pos[0],$pos[1],0)
MouseClick("Left")
EndIf
Sleep( 500 )
Send( "{ESC}" )
Sleep( 500 )
Send( "b" )
Sleep( 1000 )
Send( "time set 0", 10 )
Send( "{Enter}" )
Case $Button2
MsgBox( 0, "Error", "Wenn Minecraft nicht gestartet ist schliest sich das Programm!")
If NOT ProcessExists("javaw.exe") Then Exit
If ProcessExists ("javaw.exe") Then MsgBox (0,"Check","CHECK: Ok, Minecraft ist gestartet.")
$pos = PixelSearch( 0, 993, 1276, 1021, 7974988,0)
If isArray($pos) then
MouseMove($pos[0],$pos[1],0)
MouseClick("Left")
EndIf
Sleep( 500 )
Send( "{ESC}" )
Sleep( 500 )
Send( "b" )
Sleep( 1000 )
Send( "time set 12500", 10 )
Send( "{Enter}" )
Case $Button5
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Hilfe", 310, 127, 192, 124)
GUISetBkColor(0x696969)
$Group1 = GUICtrlCreateGroup("Hilfe", 8, 8, 297, 73)
$Label1 = GUICtrlCreateLabel("= Sie müssen Ingame sein um den Script zu benutzen!", 16, 32, 262, 17)
$Label2 = GUICtrlCreateLabel("= Sie müssen in Minecraft Cheats an haben!", 16, 56, 215, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Case $Button4
Exit
Case $Button3
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Einstellung", 176, 177, 635, 150)
GUISetBkColor(0x99B4D1)
$Group1 = GUICtrlCreateGroup("Problem", 8, 8, 161, 65)
$Label1 = GUICtrlCreateLabel("Bei mir in Minecraft wird es", 16, 32, 129, 17)
$Label2 = GUICtrlCreateLabel("nicht Tag/Nacht.", 16, 48, 86, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Problem lösen!", 8, 80, 163, 89, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MsgBox( 0, "Error", "Wenn Minecraft nicht gestartet ist schliest sich das Programm!")
If NOT ProcessExists("javaw.exe") Then Exit
If ProcessExists ("javaw.exe") Then MsgBox (0,"Check","CHECK: Ok, Minecraft ist gestartet.")
$pos = PixelSearch( 0, 993, 1276, 1021, 7974988,0)
If isArray($pos) then
MouseMove($pos[0],$pos[1],0)
MouseClick("Left")
EndIf
Send( "{ESC}" )
MouseMove( 488, 533, 6 )
MouseClick( "left" , 488, 533, 2 , 6 )
Sleep( 500 )
MouseMove( 857, 482,6 )
MouseClick( "left" , 857, 482 , 2 , 6 )
Sleep( 500 )
MouseMove( 272, 718, 6 )
MouseClick( "left" , 272, 718 , 1 , 6 )
Sleep( 1000 )
Send( "bb" )
Sleep( 500 )
MouseMove( 644, 719, 6 )
MouseClick( "left" , 644, 719 , 2 , 6 )
Sleep( 500 )
MouseMove( 694, 720, 6 )
MouseClick( "left" , 694, 720 , 2 , 6 )
Sleep( 500 )
MouseMove( 642, 318, 6 )
MouseClick( "left" , 642, 318 , 2 , 6 )
MsgBox( 0 , "Erledigt!", "So jetzt starte den Script neu dann versuch es nochmal Tag/Nacht zu machen." )
EndSwitch
WEnd
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Form1 = GUICreate("TagNachtScript", 249, 218, 390, 356)
GUISetFont(8, 800, 0, "Rockwell")
GUISetBkColor(0x99B4D1)
$Button1 = GUICtrlCreateButton("Tag", 8, 96, 233, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Nacht", 8, 128, 233, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Einstellung", 8, 8, 233, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Exit", 8, 184, 233, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Hilfe", 8, 40, 233, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
EndSwitch
WEnd
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndSwitch
WEnd