No internet connection
  1. Home
  2. How to

Add Plug in to created instrument track

By Paul Reeves @Paul_Reeves
    2021-07-22 03:59:14.107Z

    Hello,

    I dont know JavaScript at all but have been trying to piece together a script to open a new instrument track and then i want to add kontakt to, I took the code from another post...

    /* Script includes code from Oliver Momm */

    // Function to set Pro Tools frontmost via AppleScript
    function setPTfrontmost() {
    sf.system.execAppleScript({
    script: 'tell application "System Events" to tell process "Pro Tools" to set frontmost to true'
    });
    }

    // Set Pro Tools frontmost
    setPTfrontmost();
    sf.wait({ intervalMs: 50 });

    // Invokes "Track -> New..." dialog window
    sf.ui.proTools.menuClick({
    menuPath: ['Track', 'New...']
    });

    // Wait for "New Tracks" window to appear
    var ntDlg = sf.ui.proTools.dialogWaitForManual({ dialogTitle: 'New Tracks' }).dialog;

    // Select "Instrument Track"
    for (var i = 0; i < 5; i++)
    sf.keyboard.press({
    keys: 'cmd+down'
    });

    // Select "Stereo"
    sf.keyboard.press({
    keys: 'cmd+right'
    });

    // Click "Create" button
    sf.ui.proTools.focusedWindow.getFirstWithTitle("Create").elementClick();

    But cant now get it to add in the instance of Kontakt.

    any help would be awesome thanks

    • 2 replies
    1. Hello Paul,

      You can find the best way to do this in this thread: Creating a new track with any plugin.

      Basically, the most efficient way is to create a track preset of an Instrument track with Kontakt already instantiated on it and using one of the solutions offered in the post to recall it into the session.

      Hope that helps!

      1. PPaul Reeves @Paul_Reeves
          2021-07-22 23:00:18.804Z

          Awesome thanks so much, yea that is much better and easier

        • Progress
        • P@Paul_Reeves closed this topic 2021-07-22 23:00:31.059Z.