Trying to make a script that spam keystrokes while the other key is held down

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
andya34
Posts: 2
Joined: 21 Apr 2018, 19:39

Trying to make a script that spam keystrokes while the other key is held down

21 Apr 2018, 19:47

So im trying to make a script that spams "a" key while the LShift key is held down when i press the trigger key.

Code: Select all

F3::
if (enable := !enable)
    setTimer, routine, -1
return

routine:
while enable
{
    send {LSHIFT down}
    Random, r, 50, 200
    sleep r
    sendInput a
}
return
this is my code. it works well but it just doesn't stop when i press f3 again. it stops when i'm deleting the line " send {LSHIFT down}", so this must be the problem.
it is important to send strokes while the shift key is held down so don't tell me use "sendInput +a". also it needs to send the strokes at random intervals.
andya34
Posts: 2
Joined: 21 Apr 2018, 19:39

Re: Trying to make a script that spam keystrokes while the other key is held down

22 Apr 2018, 06:11

It also need to hold down the shift key in the progress. not "shift down" "send keystroke" "shift up".

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, mikeyww and 186 guests