I would like to use an action button to start or stop a complex macro. I have tried the following to start a macro:
const xapi = require('xapi');
xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
if (event.PanelId === 'Camera_on') {
xapi.command('Macros Macro Activate', { Name: 'Camera switching'});
}
});
It appears though that "activating" a macro doesn't actually start the macro. It seems to enable it so that the next time the macro runtime is started or restarted it will run. Is there a way that a macro can be started and stopped from inside another macro ?