Jump to content

hold key for multiple strokes


Recommended Posts

hi, i am not a programmer and wondered if someone could help me with an example. What i have is an old game where the z and x keys are fire buttons, but sometimes the key does not register and i end up mashing it to get it fire. What i would like to do is to hold the key down and have autoit mash for me until i release it. Could someone start me off with a clue, i have had a look and found _isPressed, but dont know where to start with it. i would appreciate any help. Thank you.

Link to comment
Share on other sites

Usually, when I want a "turbo" button, I bind a toggle switch to a different key, otherwise, the original key you want to mash wouldn't register because of HotKeySet.

Also, some times the key isn't recognized by the program when it gets spammed, although it works correctly, as verified by notepad (the correct key gets typed repeatedly). In cases such as this, it's usually because the key send is happening too fast for the program to recognize it. The way to fix it is by increasing the time delay that a key is pressed down during Send.

Opt("SendKeyDownDelay", 50)
Edited by omikron48
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...