No internet connection
  1. Home
  2. How to

Change track and clip color, and make inactive

By samuel henriques @samuel_henriques
    2020-08-24 15:04:32.937Z

    Hello,
    I'm using this script to make the track and clips change color and make selected tracks inactive,
    First was a set of actions as macro, then i changed it to script by converting the actions to script.
    I works fine, but is there a way to make is faster?
    Also is it possible to disable the error in the end in the cases the tracks are already inactive? I get an error, witch is fine but if it could be cleaner would be great

    sf.ui.proTools.colorsSelect({
        colorTarget: "Tracks",
        colorType: "Color",
        colorNumber: 1,
    });
    sf.ui.proTools.colorsSelect({
        colorTarget: "ClipsInTracks",
        colorNumber: 1,
    });
    sf.ui.proTools.trackSetActive({
        targetValue: "Disable",
     
    });
    

    Thank you

    Solved in post #2, click to view
    • 3 replies
    1. Kitch Membery @Kitch2020-08-24 16:44:11.372Z

      Hi @samuel_henriques,

      I'm not sure what you mean by "is there a way to make it faster?"

      However... To ignore the error when making track inactive, try this...

      if (sf.ui.proTools.getMenuItem('Track', 'Make Inactive').exists) {
          sf.ui.proTools.trackSetActive({
              targetValue: "Disable",
          });
      }
      

      The above script will check to see if the pro tools menu item "Track", "Make Inactive" exists before executing the code.

      I hope that helps :-)
      Rock on!

      ReplySolution
      1. samuel henriques @samuel_henriques
          2020-08-24 19:00:46.950Z

          Cool that works, thank you.

          I was thinking of something like changing colour os track and clip at same time or something...
          Is not that it's slow, I just star clicking away as soon as I press the command that sometimes the colour don't change.
          No big deal, I have to get used to it

          Thank you so much

          1. Kitch Membery @Kitch2020-08-24 19:06:37.394Z

            My pleasure mate :-)