Hät gerne Verbesserungsvorschläge, ist mein 1.Bot!
Bezüglich dem Code und der Funktion.
Oder die die mir nicht vertrauen ^^ :
PHP Code:
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <misc.au3>
Opt("PixelCoordMode", 0)
Opt("OnExitFunc", "onexit")
HotKeySet ("e", "End")
GUICreate("Pinball-BoT", 264, 175)
GUICtrlCreateLabel("Press START BOT to start Pinball-BoT Press e to End Bot", 30, 40, 200, 50)
$Button1 = GUICtrlCreateButton("Start Bot", 150, 120, 89, 25)
GUISetState(@SW_SHOW)
$Button2 = GUICtrlCreateButton("End Bot" ,30, 120, 89, 25)
GUISetState(@SW_SHOW)
Opt("SendKeyDelay", 50)
Opt("SendKeyDownDelay", 100)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Run ("C:\Programme\Windows NT\Pinball\pinball.exe")
Sleep(5000)
Send("{Space down}")
sleep(1000)
Send("{Space up}")
While 1
PixelSearch(149, 417, 180, 485, 0xB4B4BC)
If Not @error Then
Send("{Y down}")
Sleep(100)
Send("{Y up}")
EndIf
PixelSearch(183, 417, 208, 485, 0xB4B4BC)
If Not @error Then
Send("{M down}")
Sleep(500)
Send("{M up}")
EndIf
PixelSearch(320, 414, 339, 430, 0xB4B4BC)
If Not @error Then
Sleep(2000)
Send("{Space Down}")
Sleep(1000)
Send("{Space Up}")
EndIf
Func End()
send("!{F4}")
Exit
EndFunc
WEnd
Case $Button2
Exit
EndSwitch
WEnd
Exit