Auto-Prep July 2022 (V1)
Title
Auto-Prep July 2022 (V1)
What do you expect to happen when you run the script/macro?
It stops once it hits the lowest track presented on the screen
Are you seeing an error?
Couldn't right click track menu
What happens when you run this script?
It's supposed to: 1. get folder track's name 2. create group from tracks inside folder track named the same 3. route those tracks to the corresponding folder track they're inside of 4. repeat
How were you running this script?
I used a Stream Deck button
How important is this issue to you?
5
Details
{ "inputExpected": "It stops once it hits the lowest track presented on the screen\n", "inputIsError": true, "inputError": "Couldn't right click track menu", "inputWhatHappens": "It's supposed to:\n1. get folder track's name\n2. create group from tracks inside folder track named the same\n3. route those tracks to the corresponding folder track they're inside of\n4. repeat", "inputHowRun": { "key": "-MpfwmPg-2Sb-HxHQAff", "title": "I used a Stream Deck button" }, "inputImportance": 5, "inputTitle": "Auto-Prep July 2022 (V1)" }
Source
//Macro converted to script
sf.ui.proTools.trackEnsureTrackListViewIsAccessible({
makeVisible: true,
});
//Calling command "Show Only Audio Tracks" from package "M1"
sf.soundflow.runCommand({
commandId: 'package:cl1vi47ig001tgo101mxo4ti1',
props: {}
});
/* sf.wait(); */
//Calling command "Hide Inactive Tracks" from package "M1"
sf.soundflow.runCommand({
commandId: 'package:cl1wmma2r00056310lmndv0zs',
props: {}
});
/* sf.ui.proTools.groupsEnsureGroupListIsVisible(); */
//Calling command "Repeat N Times" from package "undefined" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckuxffxq80000u010m7g02u3l/ckykkhblv00005010vnzhi0gm")
sf.soundflow.runCommand({
commandId: 'user:ckuxffxq80000u010m7g02u3l:ckuxg4i32000cu010dk8ldgm3',
props: {
repetitions: 18,
}
});
/* //Calling command "Auto-Group Macro (M1) ✅" from package "M1"
sf.soundflow.runCommand({
commandId: 'package:cl23yjzg9000a4210kziby6fc',
props: {}
}); */
/* //Calling command "2. Route to Folder Track (June 2022)_3 ✅" from package "M1"
sf.soundflow.runCommand({
commandId: 'package:cl4bv87ji0001nr107rz3adgj',
props: {}
}); */
/* //Calling command "3. Move On to Next Folder" from package "M1"
sf.soundflow.runCommand({
commandId: 'package:cl37xrg7h0003xq10dg2j04il',
props: {}
}); */
Links
User UID: ts9UvupFaLPwJESD715UM7Fll4I2
Feedback Key: sffeedback:ts9UvupFaLPwJESD715UM7Fll4I2:-N72jbVQxEzxKGzonQ39
- Vic Cuccia @viccucciamusic
@Kitch What's up bud!
Been testing these for a few weeks now. Unfortunately the "general" script stopped working and hasn't worked since so I reverted back to script #3 (the one made for my current pro tools setup). That being said, it stops mid-way once it hits the lowest visible track in the session. Am I able to tweak anything either in the code or by adding a function so it keeps scrolling the session? Attaching a screen recording:
Vic Cuccia @viccucciamusic
Now it actually stop working altogether also. It's so unpredictable!
- In reply toviccucciamusic⬆:
Kitch Membery @Kitch2022-07-16 01:48:12.330Z2022-07-16 01:56:31.055Z
Hi Vic,
I'm on vacation at the moment returning in August, so will take a look when I get back.
The Script/Macro you have posted seems to be made up of a number of different scripts with only the reference code. To understand what is happening I'd need to see the individual scripts.
I'd encourage you to check out a post Christian wrote on how to repeat an action for multiple tracks... See the following thread;
Then you could use
sf.ui.proTools.selectedTrack.trackScrollToView();
every time each track is selected so that the track scrolls into view.function doForAllSelectedTracks(action) { var originallySelectedTrackNames = sf.ui.proTools.selectedTrackNames; try { sf.ui.proTools.selectedTrackHeaders.forEach(track => { track.trackSelect(); track.trackScrollToView(); action(track); }); } finally { sf.ui.proTools.trackSelectByName({ names: originallySelectedTrackNames }); } } /**@param {AxPtTrackHeader} track */ function trackFunc(track) { log(track.normalizedTrackName) //Logs the name of the selected track //Insert track actions here; } function main() { sf.ui.proTools.appActivateMainWindow(); doForAllSelectedTracks(trackFunc); } main();
Let me know how you go with it. :-)
Rock on!
Vic Cuccia @viccucciamusic
Oh dude, totally fine no rush at all. Enjoy the vacation, and looking forward to linking with you when you come back bud! Thanks for providing the other post also! 🤘