Guest NatasD Posted September 28, 2005 Posted September 28, 2005 Hello, I tried to search for this, but I was unable to find it. I just started using Autoit today, so I am kinda unsure how things work. I was wondering how I would get some mouseclicks to keep looping until I kill the script. Here is the script: WinWaitActive("Title", "", 120) WinMove ("Title", "", 50, 50) [THIS IS WHAT NEEDS TO BE LOOPED] MouseClick ( "left" , 250, 450 , 1 , 20) Sleep (3000) MouseClick ( "left" , 300, 400 , 1 , 10) Sleep (3000) MouseClick ( "left" , 650, 450 , 1 , 20) Sleep (3000) MouseClick ( "left" , 550, 150 , 1 , 10) Thanks in advance.
Valuater Posted September 28, 2005 Posted September 28, 2005 (edited) like this expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused, $t HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMe");Shift-Alt-d ;;;; Body of program would go here;;;; While 1 If $t = 1 Then WinWaitActive("Title", "", 120) WinMove ("Title", "", 50, 50) ;[THIS IS WHAT NEEDS TO BE LOOPED] MouseClick ( "left" , 250, 450 , 1 , 20) Sleep (3000) MouseClick ( "left" , 300, 400 , 1 , 10) Sleep (3000) MouseClick ( "left" , 650, 450 , 1 , 20) Sleep (3000) MouseClick ( "left" , 550, 150 , 1 , 10) EndIf Sleep(10) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMe() $t = 1 EndFunc hope that helps 8) Edited September 28, 2005 by Valuater
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now