Guest michaelG Posted May 12, 2004 Share Posted May 12, 2004 hi all, i want to create a simple bot to double click... i read Autoit help files, but havn't realy understood how i actualy start the script im using... vasicly i want the macro to: 1) switch to a window (another program). 2) 3 double click commands with 1 sec pauses (sleep 1000) - i have a macro runing on the other program - so i only need the double clicking. 3) pause for 2-4 secs, i'll need to tune it manualy. 4) loop steps 2-3, till i press a key (lets say escape, but i hope it won't colide with the other program's escape usege) 5) end program compleatly (i.e dump the script) when i press another key combination (lets say ctrl-alt-F12 or something) i'd be glad for any help, as i said im new at autoit, i have a bit of programming experiance, but i guess not enough thx from advnce, Michael Link to post Share on other sites
CyberSlug 6 Posted May 12, 2004 Share Posted May 12, 2004 Well, this should help get you started: #1 WinActivate("title") #2 ; adjust the $x and $y coordinates as needed $x = 10 $y = 19 MouseClick ( "left" , $x, $y, 2) sleep(1000) MouseClick ( "left" , $x, $y, 2) sleep(1000) MouseClick ( "left" , $x, $y, 2) #3 sleep(3000) #4 While 1 sleep(100) ;prevent maxing-out your CPU ; body of script goes here WEnd #4 continued and #5 See the example of HotKeySet in the help file HotKeySet("^!{F12}", "Terminate") Func Terminate() Exit EndFunc See the "Using AutoIt/Running scripts" section in the help file for details of running a script. Hope that helps Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to post Share on other sites
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