Sign in to follow this  
Followers 0
ablazed

How to spam a key?

5 posts in this topic

#1 ·  Posted (edited)

Hello, I apologize in advance if this topic is a duplicate (which it probably is) but I cannot find exactly what I'm looking for, or it's too complicated for me to understand.

In short I'm trying to make a script that spams a key when I hold it down. (ie. I hold down the e key and it spams it until I release the key)

Currently this is what I have:

$secondsToHoldKey = 0
$KeyToPress = "e"
 
Send ("{"&$KeyToPress&" DOWN}")
Sleep ($secondsToHoldKey*1)
Send ("{"&$KeyToPress&" UP}")
 
Honestly this is from another post I saw, and it doesn't work at all for me and I don't think I'm even close to the right track. Any help would be greatly appreciated.
Edited by ablazed

Share this post


Link to post
Share on other sites



Sorry, but I can't spend too much time trying to figure it out.

Thanks, it's nice to know people are at least looking at the thread.

Share this post


Link to post
Share on other sites

Help me if I'm not understanding exactly what you want...

But my keyboard does this automatically?

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

^ Held the A key down briefly. There are settings (Assuming Windows... considering Mac Vs AutoIt = Lol)... that change the sensitivity, and how quickly it spams a key when you hold it down.

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  
Followers 0