Hi. I can't get Soundflow to successfully make a change in Disk Allocation.
All I need is to open the Disk Allocation window, and option click (on let's say the top most item) to set all the tracks to use the same drive.
I get these sessions from a composer and their disk allocation always comes in screwed up so I constantly need to reset it to my current working drive. Thought soundflow would come to the rescue but SF seems to not be able to interact with the drive popup menu.
Any help?
- Raphael Sepulveda @raphaelsepulveda2022-02-03 21:31:49.836Z
Yeah, that table is a bit trickier than usual.
Give this a try:
function setDiskAllocation({ rootMediaFolder }) { const diskAllocationWin = sf.ui.proTools.windows.whoseTitle.is("Disk Allocation").first; sf.ui.proTools.menuClick({ menuPath: ['Setup', 'Disk Allocation...'] }); diskAllocationWin.elementWaitFor(); const firstRowInTable = diskAllocationWin .tables.whoseTitle.is("Disc Allocation").first .children.whoseRole.is("AXRow").allItems[2] .children.whoseRole.is("AXCell").allItems[1] .children.whoseRole.is("AXMenuButton").first; // Select all items in table firstRowInTable.mouseClickElement({ isOption: true, }); // Assigns new Root Media Folder firstRowInTable.popupMenuSelect({ relativePosition: { x: 20, y: 5 }, menuPath: [rootMediaFolder] }); diskAllocationWin.buttons.whoseTitle.is("OK").first.elementClick(); diskAllocationWin.elementWaitFor({ waitType: "Disappear" }); } setDiskAllocation({ rootMediaFolder: "Macintosh HD" // <- Set Root Media Folder Here });
- MMatt Friedman @Matt_Friedman
Thank you so much. That totally works!
- GIn reply toMatt_Friedman⬆:Gaston Ibarroule @Gaston_Ibarroule
Hey! I'm looking for this type of function and it looks very promising I'd need to choose only the selected tracks in the timeline. Is there a way to do this? It could be great if it could just bring me to "Select Folder" and then I finish the process.
- GGaston Ibarroule @Gaston_Ibarroule
@raphaelsepulveda Maybe it's better to tag you.
- In reply toGaston_Ibarroule⬆:
Raphael Sepulveda @raphaelsepulveda2024-07-01 20:46:52.039Z
Hey @Gaston_Ibarroule, give this a try (tested in macOS Ventura, PT 2024.6);
function setCustomDiskAllocationOfSelectedTracks() { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); const selectedTrackNames = sf.ui.proTools.selectedTrackNames; const diskAllocationWindow = sf.ui.proTools.windows.whoseTitle.is("Disk Allocation").first; if (!selectedTrackNames.length) { throw "No tracks selected.\nPlease select one or more tracks and try again." } sf.ui.proTools.menuClick({ menuPath: ['Setup', 'Disk Allocation...'] }); diskAllocationWindow.elementWaitFor(); const table = diskAllocationWindow.tables.whoseTitle.is("Disc Allocation").first; const tableRows = table.children.whoseRole.is("AXRow").map(row => row); const targetRows = tableRows.filter(row => { const staticText = row.children.whoseRole.is("AXCell").first .children.whoseRole.is("AXStaticText").first; return selectedTrackNames.includes(staticText.title.value); }); // Select tracks in Disk Allocation Window targetRows.forEach(row => row.children.whoseRole.is("AXCell").first.elementClick() ); // Open up popup menu from the first selected track targetRows[0] .children.whoseRole.is("AXCell").allItems[1] .children.whoseRole.is("AXMenuButton").first .elementClick({ asyncSwallow: true }); // Choose the "Select Folder..." option via keyboard sf.keyboard.press({ keys: "return", }); // Wait for the "Open" window to come up sf.ui.proTools.windows.whoseTitle.is("Open").first.elementWaitFor(); } setCustomDiskAllocationOfSelectedTracks();