OK, so I am home now and I have had a play.

This works as straight text with no variables..
Code:
/rpc Razorslax CreateMacro "Heal1"  1  "/cast [target=razorbaxftw]heal"  1  1
But when I do the version with the variables
Code:
/rpc Razorslax CreateMacro "Heal1"  1  "/cast [target=" .. UnitName(Player) .. "]heal"  1  1
It errors and only graps the first "/cast [target=" part. Anyone know what is used as joiners? I have tried ".." and "&" and "," and "and".