Using Folders to import a group of tracks (as a folder track preset) but then want to delete the un-needed folder
Forgive me - I'm super new to this - I'm sure this is easy
I do a lot of music composing and programming for film and tv and am using track presets to replace the process of importing session data from a template.
In this case I have 2 Bell tracks - one close and one room. I made a folder and put them into it (without routing them to the folder) So with a button, I can import the preset and I get 3 tracks - the folder - and 2 bell tracks. The Folder is selected by defalt and I want to delete it. I added "delete selected folder" and did a UI click to press "keep" so just the folder is deleted.
But I just can't get the folder track to delete.
I Get this error:
08.12.2020 15:31:18.02 [Backend]: AXUIElementException in LoadUIElement: kAXErrorInvalidUIElement
Logging error in action (01) ClickButtonAction: ClickButtonAction requires UIElement
08.12.2020 15:31:18.02 [Backend]: !! Command Error: BELLS [user:ckif1hyp100003p10h5oh0n5a:ckigg575i000ai310d49y4u2h]:
ClickButtonAction requires UIElement (BELLS: Line 24)
SoundFlow.Shortcuts.AXUIElementException: kAXErrorInvalidUIElement
at SoundFlow.Shortcuts.AXUIElement.GetSubElements(String) + 0x1a5
at SoundFlow.Shortcuts.Ax.AxNodes.AxElementArrayFromRole.get_RawItems() + 0x56
at SoundFlow.Shortcuts.Ax.AxNodes.AxElementArray.get_Items() + 0x1b
at SoundFlow.Shortcuts.Ax.AxNodes.AxElementArrayFilter.get_RawItems() + 0x40
at SoundFlow.Shortcuts.Ax.AxNodes.AxElementArray.get_Items() + 0x1b
at SoundFlow.Shortcuts.Ax.AxNodes.AxElementArrayIndexedItem.GetUIElement() + 0x45
at SoundFlow.Shortcuts.Ax.AxNodes.AxElement.LoadUIElement() + 0x27 (AxElementArrayIndexedItem)
<< Command: BELLS [user:ckif1hyp100003p10h5oh0n5a:ckigg575i000ai310d49y4u2h]
Here is my code:
const newTracksWin = sf.ui.proTools.windows.whoseTitle.is('New Tracks').first;
sf.ui.proTools.appActivateMainWindow();
sf.ui.proTools.menuClick({ menuPath: ["Track", "New..."] });
newTracksWin.elementWaitFor();
// Change path here
newTracksWin.popupButtons.allItems[1].popupMenuSelect({
menuPath: ["Track Presets", "Avid", "KS",],
});
// And here
newTracksWin.popupButtons.first.popupMenuSelect({
menuPath: ["BELLS"],
});
newTracksWin.buttons.whoseTitle.is('Create').first.elementClick();
newTracksWin.elementWaitFor({ waitType: "Disappear" });
sf.ui.proTools.trackDelete();
sf.ui.proTools.confirmationDialog.buttons.whoseTitle.is('Keep').first.elementClick();
Many thanks and this program is going to change my life - seriously
- Chris Shaw @Chris_Shaw2020-12-08 21:40:38.314Z
I'm a little confused - your preset makes three tracks : A folder and two (audio?) tracks for your bells and you want to delete the folder track? Why are you creating the folder track with the preset?
Kris Crunk @Kris_Crunk
So I can import my two instrument tracks of bells (close mic and far mic) with one button. Just using the folder to do it. I would typically use import session data to do this and import the 2 tracks. Seems to me that a track preset is much faster. I didn't think I could make a preset of multiple tracks any other way.
Chris Shaw @Chris_Shaw2020-12-08 21:48:53.121Z
Why not create a track preset that just has the two bell tracks? A track preset can hold more than one track.
- In reply toKris_Crunk⬆:Raphael Sepulveda @raphaelsepulveda2020-12-08 21:47:30.550Z
Kris, the answer is much simpler than you realize. What @Chris_Shaw is pointing out is that you can actually create track presets for multiple tracks without them having to be inside a folder. Just select all the tracks you'd like to recall and create a track preset! Give it a try and let us know if you need more details.
Kris Crunk @Kris_Crunk
Ah thanks! I had no clue it would do that! That's much easier lol. Thanks
Chris Shaw @Chris_Shaw2020-12-08 21:51:00.447Z
Yep, a track preset can be a whole session if you'd like.