Add Plug in to created instrument track
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
- Raphael Sepulveda @raphaelsepulveda2021-07-22 21:33:30.980Z
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!
- PPaul Reeves @Paul_Reeves
Awesome thanks so much, yea that is much better and easier
- Progress