No internet connection
  1. Home
  2. How to

How to determine if protools main menu item is greyed out / unavailable

I'm trying to determine if a selected clip is a clip or a fade. If a fade is selected then the PT menu item Clip > Edit Lock/Unlock is greyed out / unavailable. How do I determine this with a script?

Ideas?

Solved in post #3, click to view
  • 4 replies
  1. Kitch Membery @Kitch2020-11-25 22:17:21.177Z

    Hi Chris!

    To work out if the selection info use this sf.ui.proTools.selectionGetInfo()

    As for the Menu Item Stand by...

    1. In reply toChris_Shaw:
      Kitch Membery @Kitch2020-11-25 22:27:13.854Z

      And here it is

      const isMenuEnabled = sf.ui.proTools.getMenuItem("Clip", "Edit Lock/Unlock").isEnabled;
      
      log(isMenuEnabled);
      

      Hope that helps :-)

      Reply1 LikeSolution
      1. In reply toChris_Shaw:
        Kitch Membery @Kitch2020-11-25 22:34:10.992Z

        FYI... You can also check for "isMenuChecked";

        1. Awesome. Thanks!