Page 1 of 1

how to make a script where when any key i can input in the script when held down is spammed or looped

Posted: 19 Apr 2018, 17:54
by mb06powerbaser
sorry , i post tihs in the wrong section last time.
hi i new to autohotkey and i would like to know this for roblox, here is this script example i found on robloxforum:

F2::
loop, 9999999 {
send, F
sleep 50
}

F3::
reload

^X::
ExitApp

here is link to post where i find it on robloxforum.com: https://robloxforum.com/threads/auto-key-presser.5662/ it is not mine i would like a script like that but except all i have to do is hold B and then it is looped, like on line 2 it says loop, 9999999, except all i have to do is hold it down (without using 1 or 2 keys like F2 and F3 to start and stop thanks)

Re: how to make a script where when any key i can input in the script when held down is spammed or looped

Posted: 20 Apr 2018, 04:00
by Rohwedder
Hallo,
as long as you hold down any key (except End) it will be send repeatedly (spammed).
End key exits the script:

Code: Select all

#Persistent
#InstallKeybdHook
SetTimer PriorKey, 50
PriorKey:
If GetKeyState(A_PriorKey,"P")
	Send, {%A_PriorKey%}
Return
*End::ExitApp