Super Guide,sehr hilfreich :)
Opt('PixelCoordMode', 2)
Opt('MouseCoordMode', 2)
hotkeyset("{numpad2}", "start")
hotkeyset("{numpad4}", "ende")
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("", 144, 124, 192, 124)
$start = GUICtrlCreateButton("Start", 8, 8, 129, 41, $WS_GROUP)
$Button1 = GUICtrlCreateButton("Beenden und schließen", 8, 56, 129, 41, $WS_GROUP)
$by = GUICtrlCreateLabel("by", 8, 104, 15, 17)
$euername = GUICtrlCreateLabel("DerEinsatz", 24, 104, 55, 17);[color="Red"]<-Hier könnt ihr euren Namen eintragen.[/color]
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $start
start()
Case $ende
ende()
EndSwitch
WEnd
func start()
While (1)
$mpleiste = PixelGetColor (100, 586)
$hpleiste = PixelGetColor (123,570)
if $hpleiste = 0x141414 then ;guckt nach ob die hp leiste ca 1/3 verloren hat
send ("{1 down}") ;pottet
sleep (100)
send ("{1 up}")
sleep(50)
send ("{1 down}")
sleep (100)
send ("{1 up}")
sleep(50)
send ("{1 down}")
sleep (100)
send ("{1 up}")
sleep(50)
send ("{1 down}")
sleep (100)
send ("{1 up}")
sleep(50)
send ("{1 down}")
sleep (100)
send ("{1 up}")
sleep(50)
send ("{1 down}")
sleep (100)
send ("{1 up}")
sleep(50)
ElseIf $mpleiste = 0x454545 then ;guckt nach ob die mpleiste fast leer ist
send ("{2 down}") ;pottet
sleep (100)
send ("{2 up}")
sleep(50)
send ("{2 down}")
sleep (100)
send ("{2 up}")
sleep(50)
send ("{2 down}")
sleep (100)
send ("{2 up}")
sleep(50)
send ("{2 down}")
sleep (100)
send ("{2 up}")
sleep(50)
send ("{2 down}")
sleep (100)
send ("{2 up}")
sleep(50)
EndIf
WEnd
endfunc
func ende()
Exit ;beendet das programm
endfunc