PHP Code:
;#################
;Include der .au3s
;#################
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("MouseClickDelay","1");Setzt Mausklickdelay auf 1 Millisekunde
Hotkeyset("{F5}","_Stop");Setzt Hotkey (F5)
Global $Switch = False;Setz die $Switchvariable auf False
;#################
;Erstellen Gui (Label, Button, Inputboxen etc.)
;#################
#Region ### START Koda GUI section ### Form=
GUICreate("Klick", 175, 187, 232, 410)
GUICtrlCreateLabel("Position1", 8, 32, 47, 17)
GUICtrlCreateLabel("Position2", 8, 56, 47, 17)
GUICtrlCreateLabel("Position3", 8, 80, 47, 17)
GUICtrlCreateLabel("Position4", 8, 104, 47, 17)
$bko1 = GUICtrlCreateInput("", 56, 32, 49, 21)
$bko2 = GUICtrlCreateInput("", 56, 56, 49, 21)
$bko3 = GUICtrlCreateInput("", 56, 80, 49, 21)
$bko4 = GUICtrlCreateInput("", 56, 104, 49, 21)
GUICtrlCreateLabel("X", 72, 8, 11, 17)
$nko1 = GUICtrlCreateInput("", 112, 32, 49, 21)
$nko2 = GUICtrlCreateInput("", 112, 56, 49, 21)
$nko3 = GUICtrlCreateInput("", 112, 80, 49, 21)
$nko4 = GUICtrlCreateInput("", 112, 104, 49, 21)
GUICtrlCreateLabel("Y", 128, 8, 11, 17)
GUICtrlCreateLabel("Klickdelay in Millisek.", 8, 128, 103, 17)
$gDelay = GUICtrlCreateInput("", 112, 128, 49, 21)
$Start = GUICtrlCreateButton("Start", 8, 152, 155, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Start
_Start();Wenn der Startbutton gedrückt wird, startet die Funktion _Start()
EndSwitch
WEnd
Func _Start();Start
$xko1 = GUICtrlRead($bko1);Liest Inputbox1
$xko2 = GUICtrlRead($bko2);Liest Inputbox2
$xko3 = GUICtrlRead($bko3);Liest Inputbox3
$xko4 = GUICtrlRead($bko4);Liest Inputbox4
$yko1 = GUICtrlRead($nko1);Liest Inputbox5
$yko2 = GUICtrlRead($nko2);Liest Inputbox6
$yko3 = GUICtrlRead($nko3);Liest Inputbox7
$yko4 = GUICtrlRead($nko4);Liest Inputbox8
$Delay = GUICtrlRead($gDelay);Liest Inputbox9
While 1; Startet Endlosschleife
MouseMove($xko1,$yko1);Bewegt die Maus auf die in die Inputbox1 (X) und Inputbox2 (Y) eingegebenen Koordinaten
MouseClick("left");Mausklick links
If $Switch = True then Exitloop;Wenn F5 gedrückt wird (siehe Zeile 11), wird die Funktion _Stop aufgerufen (Zeile 82) und setzt $Switch von False auf True und wenn $Switch = True ist wird der Loop beendet
Sleep($Delay);Wartet die eingegebne Zeit
MouseMove($xko2,$yko2)
MouseClick("left")
If $Switch = True then Exitloop
Sleep($Delay)
MouseMove($xko3,$yko3)
MouseClick("left")
If $Switch = True then Exitloop
Sleep($Delay)
MouseMove($xko4,$yko4)
MouseClick("left")
If $Switch = True then Exitloop
Sleep($Delay)
WEnd
EndFunc
Func _Stop()
$Switch = True
EndFunc