You can't make a macro like that, you can only make a macro that says you used stun, not something that only triggers if it worked.