You can trigger a macro from a script as described in the Scripting section of the documentation, or as described on this thread
You can trigger a macro from a script as described in the Scripting section of the documentation, or as described on this thread