AutoHotKey Script That Allows Shift, Ctrl, and Alt Modifiers

here is what im using for autohotkey, works with alt, ctrl, and shift modifiers.
included the number 1 and 2 keys. add if you need more. change the numbers for different keys
complimets go to.

Author: Backwardpawn, although it’s a pretty simple script I’m sure someones made it before.
Name: ‘Turbofire’ AutoHotKey Script
Date: 07/14/2009

If using numbers 1-6 you will have to go in game hit esc. go to keybind section under action bar and unbind the ctrl+1-6 and the shift+1-6 but only on the numbers you will be using. if you don't shift and ctrl modifiers in a macro will not work. You might also need to go to interface section under combat and change the self cast key to none and check the box auto self cast.
#ifWinActive World of Warcraft
{
$1::
$^1::
$+1::
$!1::
Loop
{
if not GetKeyState("1", "P")
break
if GetKeyState("LCtrl", "P")
Send ^1
else if GetKeyState("LShift", "P")
Send +1
else if GetKeyState("LAlt", "P")
Send !1
else
Send 1
sleep 135
}
return
}
{
$2::
$^2::
$+2::
$!2::
Loop
{
if not GetKeyState("2", "P")
break
if GetKeyState("LCtrl", "P")
Send ^2
else if GetKeyState("LShift", "P")
Send +2
else if GetKeyState("LAlt", "P")
Send !2
else
Send 2
sleep 135
}
return
}
1 Like

Thanks!!!

Been looking for something like this.

Been scouring high and low to find an AHK script that does exactly as above but with a toggle on/off so that I only need to press my macro key once to start spamming but enabling me to hot ctrl or alt to use modifiers. Does anyone have a script that does this?

You made it a bit more complicated than it needs to be, this is what I use for the e and r keys (the * accepts all modifiers, the Blind passes them on)

#IfWinActive World of Warcraft
$*e:: 
While GetKeyState("e","P") 
{ 
Sendinput {Blind}{e} 
Sleep, 100
} 
Return
$*r:: 
While GetKeyState("r","P") 
{ 
Sendinput {Blind}{r} 
Sleep, 100
} 
Return
#IfWinActive
1 Like

Awesome. And is this a toggle on and toggle off script?

No you will need to hold down the key for this to work. Toggle on/off might be considered over the line in terms of automation as it is working without any input by the user. I use the script above due to an arm injury where mashing keys results in pain and an inability to play at all.

Fair enough, makes sense. I’m used to a toggle script but will give this a whirl. Appreciated mate.

i noticed using this script my character will randomly glitch and not being able to atk, even if i use a basic regular atk like cobra shot tht isnt a macro button. is there anyway to fix this without having to relog i’ve gotten kicked out of grps cuz of this issue twice now. and idk how to fix it.

Hosting Favorite Streamers