Mit einer GUI und Timer ist das ganze doch viel benutzerfreundlicher:
PHP Code:
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
GUICreate("Bot", 200, 100)
GUICtrlCreateLabel("Delay:", 10, 10, 50, 17)
$I_Delay = GUICtrlCreateInput("600", 60, 10, 70, 17, 1)
GUICtrlCreateLabel("Sekunden", 140, 10, 50, 17)
GUICtrlCreateLabel("X:", 10, 40, 20, 17)
$I_X = GUICtrlCreateInput(0, 25, 40, 70, 17, 1)
GUICtrlCreateLabel("Y:", 105, 40, 20, 17)
$I_Y = GUICtrlCreateInput(0, 120, 40, 70, 17, 1)
$B_Status = GUICtrlCreateButton("Start", 10, 70, 180, 25)
GUISetState()
Global $Timer, $Active = False
Do
$Msg = GUIGetMsg()
If $Msg == $B_Status Then
$Active = Not $Active
If $Active Then
GUICtrlSetData($B_Status, "Stopp")
Else
GUICtrlSetData($B_Status, "Start")
EndIf
$Timer = GUICtrlRead($I_Delay)
EndIf
If TimerDiff($Timer) > GUICtrlRead($I_Delay) * 1000 And $Active Then
MouseClick("left", GUICtrlRead($I_X), GUICtrlRead($I_Y), 1, 1)
$Timer = TimerInit()
EndIf
Sleep(10)
Until $Msg == -3