Ritzky Posted September 2, 2012 Posted September 2, 2012 I've seen lots of threads where I can hold a key down for a certain period of time, but all of them involve "sleep". What if I want to do other things while the key is being held down? Does AutoIt support this? Something like: Send("{Up 1000}") That will press the up arrow 1000 times, is there anyway to hold the key down for 1000ms? (Without using sleep)
Khryus Posted September 2, 2012 Posted September 2, 2012 (edited) From the help file: "To hold a key down Send("{a down}") ;Holds the A key down Send("{a up}") ;Releases the A key" Edited September 2, 2012 by megablox FireFox 1 "The story of a blade is linked in Blood." ―Yasuo
Bowmore Posted September 2, 2012 Posted September 2, 2012 What the problem with using sleep(1000)? "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
FireFox Posted September 2, 2012 Posted September 2, 2012 What the problem with using sleep(1000)?He wants to execute code when the key is held down, he did not know how to do it instead of setting a Sleep which prevents from executing something else.Br, FireFox.
Ritzky Posted September 3, 2012 Author Posted September 3, 2012 That doesn't hold a key down for a set amount of time, it holds it down forever until I call the KeyUp function.
AdmiralAlkex Posted September 3, 2012 Posted September 3, 2012 That doesn't hold a key down for a set amount of time, it holds it down forever until I call the KeyUp function.Then you call KeyUp after a set amount of time. Look up for example AdlibRegister(). .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
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