No actual programming language that can work in macro's i fear.

There's two ways you can solve this however.

A) Try to word your macro diffirently, for example "I'm using my stun!" opposed to "X is stunned!". In this case, if it works great. If not, atleast you gave notice. People should be on their toes regardless and look for themselves if it worked or not.

or

B) Make a second macro button, which would be rediculous, but would involve a silent stun action firing off with button #1. And a manual input under button #2 that displays a line to the party saying "the <t> is stunned!" if you see that you stunned it.

Nothing short of chatlog-reading third party apps that would basicly be scripted bots would work towards what you want to do with it otherwise.