Jump to content
Sign in to follow this  
megahyperion

Sleeping program while holding down a key

Recommended Posts

I dont think you can actually sleep a program while holding down a key since you are acutally pausing the script and everything it does so I was wondering is there anyway to do it?

Like to use the

Send("{a down}")

command to hold down the a key, now lets say I wanna hold down the a key for like 3 seconds, how can I do this ?

Thanks

Share this post


Link to post
Share on other sites

woops one more thing, I cant use the setup that allows the keypresses to be longer because I actually need the whole script to pause and wait for the key to finish being held down.

Thanks

Share this post


Link to post
Share on other sites

Nah it will send the key then sleep for 3 seconds while not doing anything.

Heres what I used to test it

Run("Notepad.exe")
Sleep(2000)
Send("{a down}")
sleep(3000)
Send("{a up}")
Edited by megahyperion

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...