Renaming Tracks
Hello, I'm trying to automatically rename new tracks in Pro Tools.
Click Menu: Pro Tools / Track / New
Wait for UI Element : Pro Tools / First Windows ' New Tracks'
Press Keys : 3 (for 3 new tracks)
Wait : 120ms
Rename Track : First Selected Track (For All selected: Yes)
Wait for UI Element : Pro Tools / Firt Windows ''Audio 1'' (Appear)
Press Key's : (Name of the Track)
It crashes most of the time with error message and it doesn't take into consideration Shift+Right. In order rename the following track
PS: It sometimes work but 75% of time doesn't.
Has any of you encounter the same thing ? Or successfully done it ?
In reply toAlexandre_H⬆:Christian Scheuer @chrscheuer2021-10-04 15:25:41.422ZHi Alexandre,
You should be able to use a script like this:
sf.ui.proTools.selectedTrack.trackRename({ renameFunction: oldName => `New Name of Track Here`, });
Christian Scheuer @chrscheuer2021-10-04 15:26:41.410ZIf what you're seeing is that right after adding a new track, it won't work, then the likely issue is SoundFlow's track cache.
To circumvent that issue, add this line right before renaming the track:
sf.ui.proTools.invalidate();
In reply toAlexandre_H⬆:Alexandre H @Alexandre_HThank you Christian ! it works, do you know how can I tell it to rename the tracks, STARTING from the first track ? So I can rename in order the following tracks, starting from the start (1st track)
- SIn reply toAlexandre_H⬆:studio@keasound.com @studiokeasound_com
Hi Christian,
can you explain how to enter the code string?
I am not familiar with scripts.Thank you
Cristiano
Christian Scheuer @chrscheuer2023-01-12 16:06:45.237ZSee here:
- SIn reply toAlexandre_H⬆:studio@keasound.com @studiokeasound_com
I converted the macro I created into a script.
The command works sporadically, there are more times when it does not work.
Summing up the commands I gave:Create new track
arm the track
(and so far it works perfectly)Finally the last command is: rename selected track, but it almost never works.
Between each command there is always a "wait", which I have modified several times and with different values, even increasing to 2000ms, but it still does not work.
I have also tried using the "select first record enable track" command, putting it before the "rename track" command, but it still doesn't work.
Can you help me with this?
Thank you
Cristiano.This is the script:
sf.keyboard.press({
keys: "cmd+shift+n, cmd+up, cmd+up, cmd+up, cmd+up, cmd+up, numpad enter",
fast: true,
});sf.wait({
intervalMs: 1000,
});sf.keyboard.press({
keys: "shift+r",
fast: true,
});sf.wait({
intervalMs: 200,
});//Calling command "Rename Selected Track" from package "undefined" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clcf936ky0000l110ggp9f9bf")
sf.soundflow.runCommand({
commandId: 'user:ckp49i4j60000a2100yfwywgf:ckou1qcq6009wzv108n39uknd',
props: {}
});