find and select audio file(s) on the timeline then move them on pre-selected empty audio tracks





Hello,
I am a newbie, and I am a little lost to write my first macro. I was wondering if someone could help to do it.
I would like to be able to run a shortkey to :
1 - open the "search file by name" window to type the file name i wanna select.
2 - select the files on the timeline (edit window) with the Object selecting tool.
3 - move all the selected files on the timeline to empty audio tracks already created.
I will try to make a video of the action in order to be more precise.
I thought it would be simple , but I don't know where to start...
Thank you very much,
Romain
- Christian Scheuer @chrscheuer2021-02-02 11:21:55.465Z
Hi Romain,
This is a fairly complicated thing to start with as your first macro :) It may help you to "save this" task and start with some simpler ones.
The complicated nature comes from that you need to select clips on the timeline. SoundFlow has no current understanding of what goes on in the actual timeline, which makes this kind of thing very hard to do.I'd definitely recommend trying out with a simpler macro/script as the first thing you do :)
- In reply toHors_Piste⬆:Hors Piste @Hors_Piste
Hello Christian,
thank you very much for your answer ! I will try to find a simple way to do it first, like splitting the steps. I thought it would be easy to select the regions because it's a protools command who is doing the selection. And more other, I just saw that the object tool was automatically selected once the audio files was selected and shown on the edit window.
Finding a way to do it would be such a time (and life) saver : I will give a try and post here my questions :)
Thank you !
Romain
samuel henriques @samuel_henriques
Hello @Hors_Piste ,
As Christian is saying, this is a bit complex for a first. But you can have a look at this script I've been working on for some inspiration. I looks similar to what you are asking for,Hors Piste @Hors_Piste
Hello Samuel !
I didn't see your post !
Thanks for your help.I went to your script and I am trying it... But I can not find a way to make it work for me... Maybe I'm missing something.
How do you select the repetitive FX you wanna move to new tracks ?
- In reply tosamuel_henriques⬆:
Hors Piste @Hors_Piste
howerver, this script you have written is very very close of what I wanna do !
this one :
sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.menuClick({ menuPath: ["View", "Other Displays", "Clip List"], targetValue: "Enable", }); sf.keyboard.press({ keys: "cmd+shift+d", }); ///getRegionName() let currentName = getRegionName() if (currentName.indexOf(".") !== -1){ currentName = currentName.slice(0, currentName.indexOf(".")) } if (currentName.indexOf("-") !== -1){ currentName = currentName.slice(0, currentName.indexOf("-")) } var combinedName = currentName putRegionName() selectClipsInClipList(currentName) function getRegionName() { sf.ui.proTools.menuClick({ menuPath: ['Clip', 'Rename...'] }); sf.ui.proTools.windows.whoseTitle.is('Name').first.elementWaitFor(); var currentRegionName = sf.ui.proTools.windows.whoseTitle.is('Name').first.groups.whoseTitle.is('Name').first.textFields.first.value.value; sf.ui.proTools.windows.whoseTitle.is('Name').first.buttons.whoseTitle.is('Cancel').first.elementClick(); return currentRegionName } function putRegionName() { sf.ui.proTools.appActivateMainWindow(); sf.keyboard.press({ keys: "cmd+shift+f", }); sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.elementWaitFor(); sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.checkBoxes.whoseTitle.is('By name').first.checkboxSet({ targetValue: "Enable", }); sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.textFields.whoseTitle.is('').first.elementSetTextFieldWithAreaValue({ value: combinedName, }); sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.buttons.whoseTitle.is('OK').first.elementClick(); } function selectClipsInClipList(currentName) { sf.ui.proTools.mainWindow.popupButtons.whoseTitle.is('Clip List').first.popupMenuSelect({ menuPath: ["Select", "All"], targetValue: "Enable", }); const row = sf.ui.proTools.mainWindow.clipListView.childrenByRole("AXRow").first; row.children.allItems[1].children.first.popupMenuSelect({ isRightClick: true, menuPath: ['Object Select in Edit Window'], onError: "Continue", }); }
This is already awesome...