sisiws 0 Posted May 17, 2010 (edited) hi im new to autoit and need help send ("{x down}") sleep (2000) send ("{x up}") when i execute that script the x are not been hold down why? in notepad it should be like this xxxxxxxxxxxx cause i hold the key down for 2000 using sleep command instead i only get one x only..im not trying to send x 10x..what i want is to make the key hold down work.. sorry for my bad english Edited May 17, 2010 by sisiws Share this post Link to post Share on other sites
JohnOne 1,603 Posted May 17, 2010 Because you are sending the keydown message and then you are sleeping which is a function itself. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
Kealper 16 Posted May 18, 2010 This should do what you need, it will just press x continually for 2 seconds. $TimeStamp = TimerInit() ;Create timestamp While TimerDiff($TimeStamp) < 2000 ;While the timestamp is less than 2 seconds old, do this Send("x") WEnd Send("{x down/up}") is for use with key combinations, so stuff like Send("{x down}y{x up}") would be like holding x and pressing y, then releasing both. Share this post Link to post Share on other sites
sisiws 0 Posted May 18, 2010 thanks now i got a clue how it works Share this post Link to post Share on other sites