Enable/Disable Keyboard Trigger via Macro or Script?
I'm wondering if it's possible to enable/disable a keyboard trigger on a script from another macro or script?
Some context:
I have a series of macros that I use to clear a video offset when I'm bouncing a QuickTime and then re-enter the offset once the bounce is done. (This way I don't forget to re-enter the offset once the QuickTime is completed!)
I'm a freelancer and have a number of studios I work out of which all have different video offsets and also different ProTools versions. Right now I just go into the SoundFlow script editor and enable the keyboard trigger for the script that has the correct offset & either "Bounce Mix" or "Bounce QuickTime" for the room I'm working in. Not a huge deal BUT I would love to be able to have a series of buttons on my stream deck to enable the keyboard shortcut on the macro that corresponds with the studio I'm working in!
Anyone know if this is doable?
- Chris Shaw @Chris_Shaw2021-10-18 21:58:14.996Z
Hey Aaron,
From what I can tell you're asking if SF can be used to control SF. Unfortunately this is not possible. Looking at your scenario, It seems the best solution would be to use a different keyboard trigger for each command/offset.
- In reply toAaron_McCourt⬆:Christian Scheuer @chrscheuer2021-10-18 22:49:57.853Z
You can also change the script itself so it reads the computer's hostname and then looks up a table of offsets based on each computer and uses that to determine what to fill in :)
Christian Scheuer @chrscheuer2021-10-18 22:53:23.173Z
Something like this - then use the offset variable to set your QT offset as before.
const offsetByHostName = { 'Christians-MacBook-Air-5': 14, 'Christians-Mac-Pro': 27, }; var hostName = sf.system.hostNameGet().hostName.split('.local')[0]; log(`This computer's hostname is '${hostName}'`); var offset = offsetByHostName[hostName]; if (offset === undefined) throw `There's no offset defined for computer with hostname '${hostName}'`; log(`Offset chosen: ${offset}`);