No internet connection
  1. Home
  2. How to

Make Selected Track Inactive Fails

By Gabriel Lundh @Gabriel_Lundh
    2021-02-01 10:26:09.420Z

    Hi all!
    In part of a longer script I have an if/else statement, whos else-part is suppose to make inactive an active VCA in a template. The If/else statement works fine and it finds the active VCA that is suppose to be made inactive. However, I get the error message "Could not find menu item: Track->Make Inactive" at random points of the script.

    I have tried all the scripts I could find on this forum, tried the make inactive macro, converted to script - even doing a simple menu click on the Menu item Make Inactive with a waiting time after the VCA has been selected. Still get the same error message.

    Could this be a bug or am I missing something?
    Right now, one part of the else statement (they all look alike) looks like this:

        sf.ui.proTools.trackSelectByName({
        names: ["GTRVCA"],
        });
    
        sf.wait({
        intervalMs: 500,
        });
    
    
        sf.ui.proTools.menuClick({
        menuPath: ["Track","Make Inactive"],
        });
    
    

    Would love some help from you geniouses!

    All the best,
    Gabriel

    Solved in post #2, click to view
    • 2 replies
    1. Hi Gabriel,

      There's a chance that Pro Tools hasn't updated its menu items at the point in the script where you are.
      You can trick Pro Tools into updating the menu items by simulating a keystroke. Find some keystroke you can safely send that doesn't change what you're doing. I often use "arrow left" because it just centers the view on the left side of the selection.

      sf.keyboard.press({ keys: 'left' });
      
      Reply1 LikeSolution
      1. GGabriel Lundh @Gabriel_Lundh
          2021-02-01 11:20:43.726Z

          Hi Christian,

          As always - this worked and solved the problem! Thank you!!

          All the best,
          Gabriel