This thread really helped! I wrote (well, copied and modified from my good friend Jeff Farrow) my first LUA plugin today, riffing off this! The tostring() thing worked like a charm, and is perfect for my application.
I use this to quickly label cues with a "CueLabel" macro so I don't have to type out "CHORUS" over and over again when I'm charting songs for a band. The macros also set the appearance, and now I can change the colour of every VERSE cue in the desk just by changing my VERSE appearance! An improvement on this process that I started in MA2.