How do I make a script that has a loop of holding down a key for a specific amount of seconds?
-
- Posts: 2
- Joined: 10 Jun 2018, 16:38
-
- Posts: 16
- Joined: 16 Jun 2018, 00:54
Re: How do I make a script that has a loop of holding down a key for a specific amount of seconds?
Answering for the sake of those who research the same question I'm about to answer.
Replace yourkey with the key you want.
Replace yourkey with the key you want.
Code: Select all
$yourkey::
Sendinput, {yourkey down} ; holds key down
Sleep, 1000 ; set this to any value, this is 1 second in miliseconds
Sendinput, {yourkey up} ; releases key
Return ; stop script
Who is online
Users browsing this forum: No registered users and 196 guests