A friend of mine made a small relay on a pcb board to fit between the connector of the ess port switching the signal with an external output.
I've got the script working for output 10! At the moment i can use the router and spindle with one post processor, just need to separate the router and spindle toolpaths.
local h_OUTPUT10 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT10)
mc.mcSignalSetState (h_OUTPUT10, 1)
At the moment i've added a toggle button with both scripts to choose router or spindle:
For future reference, i've added the code in the base topic:
https://www.machsupport.com/forum/index.php?topic=42646.0Thanks for the help!