No internet connection
  1. Home
  2. Support

Renaming Tracks

By Alexandre H @Alexandre_H
    2021-10-04 12:42:23.307Z

    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 ?

    • 6 replies
    1. In reply toAlexandre_H:

      Hi Alexandre,

      You should be able to use a script like this:

      sf.ui.proTools.selectedTrack.trackRename({
          renameFunction: oldName => `New Name of Track Here`,        
      });
      
      1. If 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();
        
      2. In reply toAlexandre_H:
        Alexandre H @Alexandre_H
          2021-10-14 13:53:20.816Z

          Thank 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)

          1. S
            In reply toAlexandre_H:

            Hi Christian,
            can you explain how to enter the code string?
            I am not familiar with scripts.

            Thank you
            Cristiano

          2. S
            In reply toAlexandre_H:

            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: {}
            });