Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How to spam a key?

$
0
0

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.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>