Need a little help with this, not sure how Im supposed to set it up.

Im wanting to make a CCmacro for my mage and shammy that would target their focus, but would also work if they dont have a focus target.

I have one written like this, but doesnt seem to work,

/stopcast
/stopmacro
/target Focus
/cast Hex

same for the mage except with Polymorph of course. How could I write this one up better or at least make it halfway work?