Try playing around with this one
You MUST unbind multiplier of the key(s) you want to use to make sure it fires off.
For example if we use Q then unbind the shift, Lalt, Cntrl Q keybinds in the game key binds menu.
See below using Q as the example - you can edit Q and also copy past that section again to use other keys as well.
#Persistent
#MaxThreadsPerHotkey 1
#ifWinActive World of Warcraft ; Only run if window ‘World of Warcraft’ is active
; SET DEFAULT SPEED. LOWER = FASTER
sleeptime = 20
; PRESSING CTRL+NUMPAD-(NUMPAD MINUS) TOGGLES THE SCRIPT ON/OFF
<^NumpadSub::
toggle := !toggle
#if toggle
; SHOW IF SCRIPT IS ACTIVE | INACTIVE WHEN YOU PRESS CTRL+NUMPAD-(NUMPAD MINUS)
ToolTip % toggle ? “SCRIPT ON” : “SCRIPT OFF”
SetTimer, RemoveToolTip, 5000
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
; =============================================================
; ================= SETTING SLEEPTIME SECTION =================
; =============================================================
; PRESSING NUMPAD0 SETS THE SPEED TO 50ms
$Numpad0::
KeyWait, Numpad0
If errorlevel = 0
{
sleeptime = 50
ToolTip, SLEEPTIME IS`n%sleeptime% ms
SetTimer, Remove0, 5000
return
Remove0:
SetTimer, Remove0, Off
ToolTip
return
}
; PRESSING NUMPAD1 SETS THE SPEED TO 75ms
$Numpad1::
KeyWait, Numpad1
If errorlevel = 0
{
sleeptime = 75
ToolTip, SLEEPTIME IS`n%sleeptime% ms
SetTimer, Remove1, 5000
return
Remove1:
SetTimer, Remove1, Off
ToolTip
return
}
; PRESSING NUMPAD2 SETS THE SPEED TO 100ms
$Numpad2::
KeyWait, Numpad2
If errorlevel = 0
{
sleeptime = 100
ToolTip, SLEEPTIME IS`n%sleeptime% ms
SetTimer, Remove2, 5000
return
Remove2:
SetTimer, Remove2, Off
ToolTip
return
}
; PRESSING NUMPAD3 SETS THE SPEED TO 150ms
$Numpad3::
KeyWait, Numpad3
If errorlevel = 0
{
sleeptime = 150
ToolTip, SLEEPTIME IS`n%sleeptime% ms
SetTimer, Remove3, 5000
return
Remove3:
SetTimer, Remove3, Off
ToolTip
return
}
; PRESSING NUMPAD9 CHECKS THE CURRENT SPEED
~Numpad9::
KeyWait, Numpad9
If errorlevel = 0
{
ToolTip, CURRENT SLEEPTIME IS`n%sleeptime% ms
SetTimer, Remove, 5000
return
Remove:
SetTimer, Remove, Off
ToolTip
return
}
{
$q:: ; If q is pressed
$^q:: ; If q+control is pressed
$+q:: ; If q+shift is pressed
$!q:: ; If q+alt is pressed
Loop ; If any of the above is true then loop below
{
if not GetKeyState(“q”, “P”) ; If q is not pressed then break the loop
break
if GetKeyState(“LCtrl”, “P”) ; If left control is pressed then send control+q
Send ^q
else if GetKeyState(“LShift”, “P”) ; If left shift is pressed then send shift+q
Send +q
else if GetKeyState(“LAlt”, “P”) ; If left alt is pressed then send alt+q
Send !q
else
Send q ; If q is pressed with no other modifiers send q
sleep 50 ; Time in milliseconds between key repeats
}
return
}