AHK will keep switching targets

I have been using AHK now for a few months and just about 3 weeks ago after say 5 to 10 min of playing it will start just switching targets and keep until I turn off the program. The switching will be super fast. It will not even let me hit a target because it switches so fast. I will then turn back on and it will start again. Anyone have this problem. It will do the same on every macro I have tried.
Here is the AHK I have been using.
#IfWinActive World of Warcraft
$2::
GetKeyState, state, 2, P
if state = D

Loop
{
Send {2}
Sleep, 50
Send {2}
Sleep, 50
Send {2}
Sleep, 50
Send {2}
Sleep, 50
Send {2}
Sleep, 50
Send {2}
Sleep, 50
return
}
#IfWinActive

Thank you for your help.

this is not a troll… if it switches while using it, let go of the button you have assigned just before you kill the target. i know alot of the macros auto target and i have to pay attention to enemy HP bars whhile fighting to stop before they die.

I have tried that. It will switch targets at the start of the fight and make it so I cant even hit one till I turn it off. Thank you for your help.

delete the macro and restart pc then reinstall the macro
check keybinds to just in case

what i do delete the “/targetnearestenemy” and put the targeting on another button…therefore you can only attack/tag the target you want…

1 Like

just take out /targetnearestenemy and do it yourself

1 Like