Scroll Into View - always Follow Selcted Track (Mix Window)
Hi. The script "Output Window: Follow Selected Track" is really awesome. Is there a way to get the script Scroll Into View:
sf.ui.proTools.selectedTrack.titleButton.mouseClickElement({
isControl: true,
isShift: true,
});
to always follow the selected track?
Thanks
- Christian Scheuer @chrscheuer2020-03-17 10:51:46.201Z
You could do it like this...
But careful - as this will scroll your session whenever you select a new track, which is likely not necessarily what you want.
I don't currently see a possible workaround to that.var lastFocusedTrackName; function main() { try { var newName = sf.ui.proTools.selectedTrackNames[0]; if (newName === lastFocusedTrackName || newName === undefined) return; lastFocusedTrackName = newName; sf.ui.proTools.selectedTrack.trackScrollToView(); sf.ui.proTools.selectedTrack.titleButton.mouseClickElement({ isControl: true, isShift: true, }); } catch (err) { } } function runForever(name, action, interval, timeout) { var now = (new Date).valueOf(); if (now - globalState[name] < timeout) throw 0; //Exit if we were invoked again inside the timeout globalState[name] = now; sf.engine.runInBackground(function () { try { while (true) { sf.engine.checkForCancellation(); globalState[name] = (new Date).valueOf(); action(); sf.wait({ intervalMs: interval, executionMode: 'Background' }); } } finally { globalState[name] = null; } }); } runForever("isScrollToFocusedTrackRunning", main, 500, 5000);
- RRobert Sörling @robertsorling
Awesome! This actually fits some of my workflows but I guess what I'm really after is for the mix window to always scroll the selected track to the far left (if possible), without affecting the edit window view. This would be great when working on one screen set ups (like lap tops), not having to switch between mix/edit, if that makes sense?
Christian Scheuer @chrscheuer2020-03-24 23:49:50.573Z
Oh I see. I changed the title of the question to reflect this now.
Off the top of my head I don't know how to make the Mix window scroll, but let's leave this question open until we can figure it out.- RRobert Sörling @robertsorling
Ok, thanks! And thanks for a great app and awesome support!
- In reply tochrscheuer⬆:
Varun John @Varun_John
Is there any way to bypass this command when not needed ?
Christian Scheuer @chrscheuer2022-02-20 15:28:06.789Z
Yes :) – see here:
Track Output window follow track selection #post-16