I would like a macro or addon button that when clicked will use a Living Action Potion only if I am stunned or movement impaired. I think you can do conditionals in macros like using one spell if in combat, a different one if not in combat, so I figure this logic may be possible for being stunned. I want to be able to spam a button but only have it use the Living Action Potion if it is immediately beneficial. I'm open to using an addon to do the same thing.
You cannot create smart macros to do X action on X cooldown or player in X state.
You can use WeakAuras to create a button to only show when you're stunned/movement impaired though.
You can also create an addon essentially doing the same thing as the WA, then setting up a bind for the button. You can probably set a bind for the WA button as well but, not really versed in extensive WA stuff.