Jump to content
Sign in to follow this  
SarahDavis

hold key for multiple strokes

Recommended Posts

SarahDavis

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.

Share this post


Link to post
Share on other sites
SarahDavis

great example for a non programmer, i think this program is a little too complex for what i need. thx for your time.

Share this post


Link to post
Share on other sites
omikron48

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.