#include <GUIConstantsEx.au3>
Opt("WinTitleMatchMode", 2)
Opt("MouseClickDelay", 0)
HotKeySet("{ESC}", "Yesno")
HotKeySet("^+x", "Terminate")
;; Give me time to let go of the mouse
Sleep(1000)
Global $yesno = 1
Global $endit = 0
Global $sX=60;
Global $sY=370;
Global $eX=320;
Global $eY=620;
Global $mouseX, $mouseY;
Local $Title = "Cookie"
WinSetOnTop($Title, "", 0)
WinActivate($Title, "")
;; Set mouse into position
Clicky()
;; Start the loop
While 1
If $yesno = 1 Then
MouseMove($mouseX, $mouseY, 10) ;; Prevents mass clicking an icon.
MouseClick("left")
$mouseX += 20
If $mouseX > $eX Then
$mouseX = $sX
$mouseY += 10
If $mouseY > $eY Then $mouseY = $sY
EndIf
EndIf
If $endit = 1 Then ExitLoop
WEnd
;; Goodbye
MsgBox(4096, "Exit", "Clicking down...", 2)
;; THE FUNCTIONS
Func Clicky()
$mouseX = $sX
$mouseY = $sY
$yesno = 1
EndFunc
Func PauseC()
$yesno = 0
EndFunc
Func Yesno()
If $yesno = 0 Then
Clicky()
Else
PauseC()
EndIf
EndFunc
Func Terminate()
$endit = 1
EndFunc
Comments
0 B
|👍
/👎
0 B
|👍
/👎