Jump to content

Pressing and holding a key button


Recommended Posts

I have looked through Lxp's guide and I was trying to find a way to make autoit press a key, let's say the button S, but not only should it press it, but also hold it for a desginated amount of time specified by user. Is there a way to do this? Thanks!

Link to comment
Share on other sites

  • Moderators

I have looked through Lxp's guide and I was trying to find a way to make autoit press a key, let's say the button S, but not only should it press it, but also hold it for a desginated amount of time specified by user. Is there a way to do this? Thanks!

MouseDown()?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

That wouldn't work for a specific key on the keyboard would it?

No, it is for the mouse. You could maybe use AutoItSetOption ( "SendKeyDownDelay" , [miliseconds to hold down next keypress]) and then send?

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
Share on other sites

  • Moderators

I mis-understood what you meant by "Button S", you meant "Keyboard S"?, If so, then SadBunny has the right idea.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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