No internet connection
  1. Home
  2. How to

Open the plugin of a selected track by plugin name

By samuel henriques @samuel_henriques
    2020-09-25 11:38:11.006Z

    I would like to open the plugin window of the inserted plugin on a selected track by name.
    I'm using by insert number, but sometimes it isn't on that slot.
    I would prefer to open first instance of "plugin name" of selected track.

    Thank you

    Solved in post #2, click to view
    • 5 replies
    1. This should do it :)

      const pluginName = 'EQ3 7-Band';
      
      const group1Visible = sf.ui.proTools.getMenuItem('View', 'Edit Window Views', 'Inserts A-E').isMenuChecked;
      const group2Visible = sf.ui.proTools.getMenuItem('View', 'Edit Window Views', 'Inserts F-J').isMenuChecked;
      const insertButtons = sf.ui.proTools.selectedTrack.insertButtons.slice(group1Visible ? 0 : 5, group2Visible ? 10 : 5);
      
      const eqButton = insertButtons.find(b => b.exists && b.value.invalidate().value.includes(pluginName));
      if (!eqButton) throw `Could not find plugin "${pluginName}" on selected track`;
      
      eqButton.elementClick();
      

      I'll be adding this (and many other commands) to a template-based package sometime soon :)

      ReplySolution
      1. samuel henriques @samuel_henriques
          2020-09-25 21:10:46.959Z

          Hey Christian,

          Working great, thank you.

          1. In reply tochrscheuer:
            samuel henriques @samuel_henriques
              2020-10-10 13:31:59.920Z

              Wold it be possible to add

              targetValue: "Enable",
              

              Instead off toggle?

              1. In reply tochrscheuer:

                Is there a way to open ALL plug-ins on the selected track?

                1. Hi Jonathan - please ask this in a new thread and we can get to it there. We use the status of a thread (solved or open) to direct our resources, so it's easier to manage if we get new questions in new threads :)