Hi, i have this simple script currently which spams "1" and is turned on/off with F2 :
Loop
{
Send 1
Sleep 230
}
return
F2::Pause
I would like the exact same script, but instead of spamming only 1 i want it to spam 2 and 3 also with adjustable spam rate. I want the keys to be spammed simulteniously, can you help me? Thanks.
Simple spam script Topic is solved
Re: Simple spam script
Hallo.
try:
try:
Code: Select all
SetTimer, 1, 230 ;every 230 ms
SetTimer, 2, 330 ;every 330 ms
SetTimer, 3, 430 ;every 430 ms
1:
2:
3:
Send % A_ThisLabel
Return
F2::Pause
- eventhorizon
- Posts: 158
- Joined: 27 Oct 2016, 14:22
Re: Simple spam script
or it could be done something like this
Code: Select all
^y:: :< set adjustable spam rate in ms
defaultspamrate := 230
inputbox,spamrate, Adjustable Spam Rate, What spam rate in ms?,,,,,,,,%defaultspamrate%
if (errorlevel)
spamrate := defaultspamrate
return
f2::
running := !running
spamit:
while (running)
{ send 123
sleep %spamrate%
}
return
A computer lets you make more mistakes faster than any invention in human history – with the possible exceptions of handguns and tequila.
Re: Simple spam script
Hey bud, I'm not OP but i am a total noob to autohotkey and I'm trying to make something similar.eventhorizon wrote:or it could be done something like this
Code: Select all
^y:: :< set adjustable spam rate in ms defaultspamrate := 230 inputbox,spamrate, Adjustable Spam Rate, What spam rate in ms?,,,,,,,,%defaultspamrate% if (errorlevel) spamrate := defaultspamrate return f2:: running := !running spamit: while (running) { send 123 sleep %spamrate% } return
I want something to spam the number 4 every 6 seconds. I took what you made above and tried making this, but i'm getting an error
Code: Select all
^y:: :< set adjustable spam rate in ms
defaultspamrate := 6000
inputbox,spamrate, Adjustable Spam Rate, What spam rate in ms?,,,,,,,,%defaultspamrate%
if (errorlevel)
spamrate := defaultspamrate
return
f2::
running := !running
spamit:
while (running)
{ send 4
sleep %spamrate%
}
return
Error this line does not contain a recognized action.
Info: : < set adjustable spam rate in ms
Line#
001: Return
This program will now exit
Am i making a silly mistake or just doing this completely wrong?
Re: Simple spam script
Hallo,
I have corrected the Maereax script:
I have corrected the Maereax script:
Code: Select all
spamrate := 230 ;defaultspamrate
^y:: ;< set adjustable spam rate in ms
inputbox,spamrate, Adjustable Spam Rate, What spam rate in ms?,,,,,,,,%spamrate%
if (errorlevel)
spamrate := spamrate
return
#MaxThreadsPerHotkey, 2
f2::
#MaxThreadsPerHotkey, 1
running := !running
while (running)
{
send 123
sleep %spamrate%
}
return
- eventhorizon
- Posts: 158
- Joined: 27 Oct 2016, 14:22
Re: Simple spam script
The comment line in the ^y hotkey line (line 1) used a colon character (:) instead of a semi-color (;). My Bad. I didn't confirm the code. Change the colon (:) in that like to a semi-colon (;) and it should be fine.
A computer lets you make more mistakes faster than any invention in human history – with the possible exceptions of handguns and tequila.
Re: Simple spam script
hi,can u make this script run in background or in a minimized game?i tried this and it is working but only when the window im playing is active.thanks
Re: Simple spam script
@rendidii - That (your since deleted post) is not an accurate quote of Rohwedder’s post. If you meant to post your own modification of his code, please indicate that and don’t put your version inside quote tags.
Edit: Your version didn’t appear to have any serious value, so it has been (at least temporarily) deleted. If you can explain its purpose, which seems unlikely, it can be restored.
Edit: Your version didn’t appear to have any serious value, so it has been (at least temporarily) deleted. If you can explain its purpose, which seems unlikely, it can be restored.
Who is online
Users browsing this forum: No registered users and 67 guests