Toggle Mute/Solo on Specified Track Issue
I have this script for toggling between the rough and active mix, which works most of the time.
sf.ui.proTools.trackGetByName({ name: "Rough Mix", makeVisible: false }).track.trackSelect();
if (sf.ui.proTools.selectedTrack.isMuted)
{
sf.ui.proTools.selectedTrack.trackSetSolo({ targetValue: 'Enable' });
sf.ui.proTools.selectedTrack.trackSetMute({ targetValue: 'Disable' });
}
else if (sf.ui.proTools.selectedTrack.isSoloed)
{
sf.ui.proTools.selectedTrack.trackSetSolo({ targetValue: 'Disable' });
sf.ui.proTools.selectedTrack.trackSetMute({ targetValue: 'Enable' });
}
Occasionally though, it will select the track NEXT to the Rough Mix track, and I have to manually select the rough mix and then run the script (triggered from my stream deck) for it to function as usual. Once I've selected another track, the script will still only select the track NEXT to the rough mix until I restart pro tools. It will function normally for a time and then this process will start again.
Any options to make this more stable?
- Chris Shaw @Chris_Shaw2022-10-12 18:02:16.252Z
You may just need to put
sf.ui.proTools.mainWindow.invalidate()
at the top of your script to refresh SF's cache. Adding/deleting tracks can cause issues like the one you're having.- JJim Stewart @Jim_Stewart5
Great thanks I'll give that a try!