Jump to content

Hold Key Down


Ritzky
 Share

Recommended Posts

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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().
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...