ab21 0 Posted April 5, 2005 (edited) Hi all, i'm new to autoit and i want to write a script that will send in keystrokes automatically for infinite times untill the user hits "esc". I know how to set a hotkey and exit the program but how to actually set a hotkey and "pause" the script and use the same hot key to "re-enable" the script? another little problem is, i read about how to send in a keystroke for a specific amount of times, but how can i make the script to enter the keystroke for infinite times for 5 times per second? will it work if i put send() & sleep(200) inside a loop? Edited April 5, 2005 by ab21 Share this post Link to post Share on other sites
zcoacoaz 0 Posted April 5, 2005 RTM, my friend, RTM (Read The Manual) and yes you can have more than one command in a loop [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Share this post Link to post Share on other sites
ab21 0 Posted April 5, 2005 srry i just started reading about autoit about an hour ago, i haven't d/l'd the program yet, about the send() & sleep(200) part, i just wanted to know if that'll allow the script to send a keystroke for infinite times with 200 milisec wait. Share this post Link to post Share on other sites
ShelbySue 0 Posted April 5, 2005 HotKeySet will allow you to capture a key press. read the Doc on that. Share this post Link to post Share on other sites
herewasplato 2 Posted April 6, 2005 srry i just started reading about autoit about an hour ago, i haven't d/l'd the program yet, about the send() & sleep(200) part, i just wanted to know if that'll allow the script to send a keystroke for infinite times with 200 milisec wait.<{POST_SNAPBACK}>yes. a script can do what you have asked about...while 1 send("A") sleep(200) wendyou might want to add a line or two to bring the window of interest into focus just before sending stuff to it... see winactivate and winwaitactiveas for the pause/resume script code - steal that from the manual which is also online - see the bottom of this page:http://www.autoitscript.com/autoit3/docs/f...s/HotKeySet.htmhope this helps [size="1"][font="Arial"].[u].[/u][/font][/size] Share this post Link to post Share on other sites