Auto hot key script

Hi i have created a script for auto hot key but am not sure how to get it to work the way i want push key 1 to run key 1 until i push it again to stop again i need to keep the modifiers as well can some 1 help me complete it?

#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
{

}

Just Download Punchkey, It does Exacty what your looking for…
https://punchkey.weebly.com/