Autohotkey code

Hi,

I switched to mac and I would like to migrate the following AHK code to mac.
It works on WoW game, when I activate the caps lock it start to press 0 every 100ms; when I also press 1 the button are repeated continuously as long as I keep it pressed.
Would be possible to obtain the same using this software?

#IfWinActive, World of Warcraft
Loop
{
Sendinput {Blind}{0}
sleep 100
}
return

*Capslock::
Suspend
Pause,,1
return

$1::
Loop
{
if not GetKeyState("1", "P")
break
Send 1
Sleep delay
}
return