That typo might explain some problems I've had modifying that code. Thanks for fixing it. I updated the first post.
With some help from Daidalos, I figured how to change it to mouse clicks instead of a key. It seems you need to use { } after "Send" with mouse buttons, although not number keys. I'm currently trying to see if I can use AHK for healing but I need to add a toggle to this code because the mouse clicks are used for too many other functions in the game.
#ifWinActive World of Warcraft
{
$RButton::
Loop
{
if not GetKeyState("RButton", "P")
break
Send {RButton}
sleep 1
}
return
$LButton::
Loop
{
if not GetKeyState("LButton", "P")
break
Send {LButton}
sleep 1
}
return
}