a script that spams 1 2 and 3
a script that spams 1 2 and 3
Hi i need a script that spams 1 2 and 3 and by pressing p it start or stops anybody can help with this?
-
- Posts: 44
- Joined: 12 Jun 2020, 05:59
Re: a script that spams 1 2 and 3
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#MaxThreadsPerHotkey 2
#Singleinstance, Force
Toggle := False
P::
toggle := !toggle
Loop
{
If (toggle) {
Send {1}
sleep 20
Send {2}
sleep 20
Send {3}
}
Else {
Return
}
}
- Yakshongas
- Posts: 590
- Joined: 21 Jan 2020, 08:41
Re: a script that spams 1 2 and 3
Is better if you use the While-Loop, like this:
Code: Select all
#MaxThreadsPerHotkey, 2
SetKeyDelay, 50, 50
Toggle := 0
P::
Toggle := !Toggle
While, (Toggle = 1)
{
Send, 123
}
Return
Please mark your topics as solved if you don't need any further help.
Need a little more help? Discord : Yakshongas#9893 🕹
Need a little more help? Discord : Yakshongas#9893 🕹