Jump to content

How to spam a key?


Recommended Posts

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
Link to comment
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.

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