Those are the full blown help/harm templates I recommend. Personally, I’d keep the hostile target as your target and mouseover heal your allies; I find it just makes life easier as both Disc and H-Pal, and with H-Pal in particular then you’re also doing auto attack damage.
You could probably also do something like this but I haven’t tested it.
If mousing over friendly THEN cast HELP_SPELL on friendly
Else If targeting enemy THEN cast HARM_SPELL on enemy
If mousing over friendly OR targeting enemy THEN stopmacro
Clear Target
Start Attack (targets the nearest enemy and starts auto attack)
Cast HARM_SPELL
Target Last Target
Oh and there’s also this beauty but it’s a dedicated key.