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

Ask gaming related questions (AHK v1.1 and older)
mb06powerbaser
Posts: 2
Joined: 19 Apr 2018, 17:28

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

19 Apr 2018, 17:54

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)
Rohwedder
Posts: 7622
Joined: 04 Jun 2014, 08:33
Location: Germany

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

20 Apr 2018, 04:00

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

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 44 guests