Jakob said: an API script (which can send chat commands (and can call abilities, but not macros afaik)). An API script can get the text of a macro just fine. You couldn't use sendChat('', '#my-macro'), but you could use sendChat('', myMacro.get('action')).