Key spammer that can be paused.

Ask gaming related questions
dfl0
Posts: 2
Joined: 28 Jul 2020, 12:30

Key spammer that can be paused.

28 Jul 2020, 12:59

Code: Select all

Loop
{
Send, p
Sleep, 5
}
Return
I have this code that spams "p", but I want to add something to it that can toggle the spam. So when I click a key, "L" for example, the script starts spamming "p", and when I press "L" again, it stops spamming and then I can turn it on again with the same key. Also, I would like to have the toggle key as "p", the same one being spammed, if possible.
Thank you!
Last edited by BoBo on 28 Jul 2020, 14:43, edited 1 time in total.
Reason: Move to Gaming section.
need4speed
Posts: 132
Joined: 22 Apr 2016, 06:50

Re: Key spammer that can be paused.

28 Jul 2020, 13:45

add this to the end:

Code: Select all

$p::Pause, Toggle
User avatar
Yakshongas
Posts: 591
Joined: 21 Jan 2020, 08:41
Facebook: Yakshongas

Re: Key spammer that can be paused.

28 Jul 2020, 14:22

Or:

Code: Select all

#MaxThreadsPerHotkey, 2

$P::
Toggle := !Toggle
While (Toggle = 1)
{
    Send, p
    Sleep, 10
}
Return
Please mark your topics as solved if you don't need any further help. ✅

Need a little more help? Discord : Yakshongas#9893 🕹
dfl0
Posts: 2
Joined: 28 Jul 2020, 12:30

Re: Key spammer that can be paused.

28 Jul 2020, 15:11

These dont seem to work :(
User avatar
Yakshongas
Posts: 591
Joined: 21 Jan 2020, 08:41
Facebook: Yakshongas

Re: Key spammer that can be paused.

28 Jul 2020, 15:25

Maybe like this? Added a bit more of delay and more press duration for the keys to register properly.

Code: Select all

#MaxThreadsPerHotkey, 2
SetKeyDelay, 50, 50

$P::
Toggle := !Toggle
While (Toggle = 1)
{
    Send, p
}
Return
Please mark your topics as solved if you don't need any further help. ✅

Need a little more help? Discord : Yakshongas#9893 🕹

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 17 guests