Jump to content

Hold keystroke, enter other keystrokes, release original keystroke?


GGCrew
 Share

Recommended Posts

Is there a command to do this? I already know about commands like ALTDOWN etc. for various function buttons...

but for example... what if I want to hold the Y key, and while still holding it, input K, S, T, wait 1 second, Q, release Y?

I didn't see any command when I searched through the options, but it's possible that I missed it...

I also tried {yDOWN} which of course doesn't work.

Link to comment
Share on other sites

Hi and Welcome to the forums!

Straight out from the helpfile:

To hold a key down (generally only useful for games)

Send("{a down}") ;Holds the A key down

Send("{a up}") ;Releases the A key

Please try it yourself next time, you could learn something ;)
Link to comment
Share on other sites

  • 1 month later...

Did you ever tried it by yourself with AutoIt V3?

With this you should get sequences of a's if the cursor is in an editor.

What you get is a single 'a' every 6 seconds.

Any suggestions, why this is not working as described in the helpfile?

While True
 Send("{a down}")
 Sleep(5000)
 Send("{a up}")
 Sleep(1000)
WEnd
Link to comment
Share on other sites

Did you ever tried it by yourself with AutoIt V3?

With this you should get sequences of a's if the cursor is in an editor.

What you get is a single 'a' every 6 seconds.

Any suggestions, why this is not working as described in the helpfile?

You send one "A", you get one "A". That is how it works, and the helpfile doesn't mention otherwise.

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...