Hi! I know we can use the element click to toggle a menu item, but it's agnostic to whatever state it's in. Is there a way to check a state, or to force enable / disable?
Pro Tools loop playback as an example:
sf.ui.proTools.menuClick({
menuPath: ["Options","Loop Playback"],
});
Thoughts?
Linked from:
Christian Scheuer @chrscheuer2019-10-24 15:18:44.089ZCertainly :)
sf.ui.proTools.menuClick({ menuPath: ["Options","Loop Playback"], targetValue: 'Disable' //or 'Enable' or 'Toggle' });
Christian Scheuer @chrscheuer2019-10-24 15:19:27.508ZAnd if you just wanted to check:
if (sf.ui.proTools.getMenuItem('Options', 'Loop Playback').isMenuChecked) { //Loop Playback is enabled } else { //Loop Playback is not enabled }
Andrew Scheps @Andrew_SchepsCan you do this with a popup menu? I'm trying to add the targetValue parameter to a popup menu select and getting a syntax error.
Specifically I'm trying to make sure auto-created clips are being displayed in the clip list and the only place to do that is in the clip bin popup menu.
Christian Scheuer @chrscheuer2020-04-08 11:59:42.683Z? I'm trying to add the targetValue parameter to a popup menu select and getting a syntax error.
How did you write this? You should be able to use targetValue in
popupMenuSelect:sf.ui.proTools.mainWindow.popupButtons.whoseTitle.is('Clip List').first.popupMenuSelect({ menuPath: ['Show', 'Auto-Created'], targetValue: 'Enable', });
Andrew Scheps @Andrew_SchepsThat's very strange, I'm sure I had it exactly like that. Working now, thanks!
- SIn reply toDustin_Harris⬆:Steve Bissinger @sbiss2024-06-08 16:00:42.479Z
I was surprised to find this isn't included in the regular PT package. Seems like a good one to add, maybe with one of Kitch's beautiful premade buttons :) Would also be nice if this was (I forget the correct SF terminology) one of those buttons that could reflect the state in PT by changing color.
Christian Scheuer @chrscheuer2024-06-08 16:20:35.348Z@Kitch can you make the icons for this? Then I can make the scripts. (OPP -> Options menu -> Loop Playback)
- SSteve Bissinger @sbiss2024-06-08 16:42:44.431Z
Wow! You guys are the best!
- In reply tochrscheuer⬆:
Kitch Membery @Kitch2024-06-08 17:51:34.760ZFor sure. Anything for Steve!
Will send them to you first thing Monday (or earlier).
Christian Scheuer @chrscheuer2024-06-10 08:35:37.274ZUpdate: We might take a bit more time diving into this to make sure we cover all the playback modes
Christian Scheuer @chrscheuer2024-06-10 18:00:02.183ZThis is now up in 1.0.34
