Ahk 1 button auto fire help

Hi! i’m looking for a ahk script that i can hold down 1 or and 2 and it wil run through the macro then stop when i release the button if anyone can help me that would be great! thanks in advance.

trying to get this script to work.

toggle = 0
#MaxThreadsPerHotkey 2
#ifWinActive World of Warcraft
Toggle := !Toggle
While Toggle{
Send {1}
Send {2}
Send {3}
sleep 180