Scrape a track's output?
By Mark Abrams @Mark_Abrams
Hi all!
Wondering how I can scrape a selected track's output? I'd like to store it as a variable to route a track.
- Kitch Membery @Kitch2022-08-05 19:18:17.474Z
Hi Mark
This should do the trick;
sf.ui.proTools.appActivateMainWindow(); const outputPathButton = sf.ui.proTools.selectedTrack.invalidate().outputPathButton; const outputPath = outputPathButton.popupMenuFetchAllItems().menuItems.find(mi=>mi.element.isMenuChecked).path; //Close the output Path Popup sf.ui.proTools.appActivateMainWindow(); log(outputPath);
- FForrester Savell @Forrester_Savell
Hi @Kitch
How would you do this to scrape multiple outputs for all selected tracks? I'm trying to store all the outputs of selected tracks, to then apply them to the Bounce window.
Forrester
Kitch Membery @Kitch2023-06-22 00:19:24.348Z
Something like this should do the trick :-)
function getTrackOutput(track) { sf.ui.proTools.appActivateMainWindow(); const outputPathButton = track.invalidate().outputPathButton; const outputPath = outputPathButton.title.value.split("\n").slice(-1)[0]; return ["output", outputPath] } let trackOutputs = sf.ui.proTools.selectedTrackHeaders.map(track => getTrackOutput(track)); log(trackOutputs);