I want to rename the comment of the selected track to the track
I was able to find a script to rename the comment to the track name from the forum.
However, I don't know how to automatically do this process for all selected tracks.
I picked up the command from the forum and tried inputting it, but the following did not work. Can someone please tell me how to apply this to the selected track?
sf.ui.proTools.appActivate();
/** @param {{ action: function }} arg */
function doForEachSelectedTrack({ action }) {
sf.ui.proTools.appActivateMainWindow();
sf.ui.proTools.mainWindow.invalidate();
const selectedTracksNames = sf.ui.proTools.selectedTracks.names;
sf.ui.proTools.trackDeselectAll();
selectedTracksNames.forEach(selectedTrackName => {
sf.ui.proTools.trackSelectByName({ names: [selectedTrackName] });
action(selectedTrackName);
sf.ui.proTools.mainWindow.invalidate();
});
}
doForEachSelectedTrack({
action: selectedTrackName => {
// Insert the actions you'd like to perform on every track here!!
}
});
var comments = sf.ui.proTools.selectedTrack.textFields.first.value.value;
sf.ui.proTools.selectedTrack.trackOpenRenameDialog({
renameAllSelectedTracks: true,
});
sf.keyboard.type({
text: comments,
});
sf.ui.proTools.focusedWindow.buttons.whoseTitle.is("OK").first.elementClick();
- Kitch Membery @Kitch2023-09-05 17:36:05.092Z
@samuel_henriques, I seem to recall you having a great script for this. Is that the case?
samuel henriques @samuel_henriques
hello guys,
yes I do,
Copy track name and paste to PT scribble strip... #post-23吉田崇, let me know if it's working well
Kitch Membery @Kitch2023-09-05 17:45:20.434Z
@samuel_henriques Thanks, legend!
- In reply tosamuel_henriques⬆:
Thank you.
This code in this conversation is what I wanted to do.
However, with my Pro Tools 2023.6, it only worked once. nothing else happened.samuel henriques @samuel_henriques
I thought it might need an update.
I'll do it as soon as I can.