Disabling audio iLok plug-in’s

I do 90% of my work on a laptop in situ in various theatres and rehearsal rooms. Sometimes I’ve got space to setup my external hard drive and my other acoutrements, including iLok & HASP dongles – which are the bain of my life! Sometimes I don’t though and having just bought a big Waves bundle, if i start up Logic or Live, or FCP or anything else that uses AU or VST plug-in’s I’m now deluged with 30-odd dialog boxes for each plug-in complaining about the absence of my iLok key.

So I’ve written a little AppleScript to disable/enable those plug-in’s acording to whether I’ve got my iLok plugged in. Feel free to use it if you like.

1) Copy and Paste it into AppleScript editor (found in Applications > Utilities),

2) Adjust the list of filenames to match the plug-in’s for your system that you want to be enabled/disabled

3) Click File>Save and choose to save it as an application on to your desktop

4) Go to your plug-in folders (Macintosh HD>Library>Audio>Plug-Ins) and create folders called “Components (Disabled)”, “VST (Disabled)” and “VST3 (Disabled)”

5) Double-click the application on your desktop and click on the Activate or De-Activate button and it’ll ask you for your password then move the plug-in’s to the relevant folder

Here’s the AppleScript:

--- move these plug-ins from Components to Componenets (Disabled) folder for when my iLok isn't present, or vice-versa
-- (c) Gareth Fry 2010
-- check that your Components (Disabled) etc folder exists.
-- Updating your plug-ins may change the names of the files.

--names of all plugin's to disable
set myAUPlugIns to {"SPL Mo-Verb.component", "SPL Transient Designer.component", "WaveShell-AU 7.1.component"} -- the names of iLok protected Audio Units
set myVSTPlugIns to {"SPL", "WaveShell-VST 7.1.vst"} -- the names of iLok protected VST's
set myVST3PlugIns to {"SPL Mo-Verb.vst3", "SPL Transient Designer.vst3", "WaveShell-VST 7.1.vst3"} -- the names of iLok protected VST3's
--
set mySourceComponents to "Macintosh HD:Library:Audio:Plug-Ins:Components:"
set mySourceComponentsDisabled to "Macintosh HD:Library:Audio:Plug-Ins:Components (Disabled):"
set mySourceVST to "Macintosh HD:Library:Audio:Plug-Ins:VST:"
set mySourceVSTDisabled to "Macintosh HD:Library:Audio:Plug-Ins:VST (Disabled):"
set mySourceVST3 to "Macintosh HD:Library:Audio:Plug-Ins:VST 3:"
set mySourceVST3Disabled to "Macintosh HD:Library:Audio:Plug-Ins:VST3 (Disabled):"
display dialog "Activate or De-Activate iLok plug-in's?" buttons {"Activate", "De-Activate"} default button 2
set myAction to button returned of result
set myPassword to ""
tell application "Finder"
try
repeat with myPlugIn in myAUPlugIns
if myAction is "Activate" then
set mySource to the POSIX path of file mySourceComponentsDisabled & myPlugIn
set myDestination to the POSIX path of mySourceComponents
else
set mySource to the POSIX path of file mySourceComponents & myPlugIn
set myDestination to the POSIX path of mySourceComponentsDisabled
end if
do shell script "sudo mv " & quoted form of mySource & space & quoted form of myDestination password myPassword with administrator privileges
end repeat
end try

try
repeat with myPlugIn in myVSTPlugIns
if myAction is "Activate" then
set mySource to the POSIX path of file mySourceVSTDisabled & myPlugIn
set myDestination to the POSIX path of mySourceVST
else
set mySource to the POSIX path of file mySourceVST & myPlugIn
set myDestination to the POSIX path of mySourceVSTDisabled
end if
do shell script "sudo mv " & quoted form of mySource & space & quoted form of myDestination password myPassword with administrator privileges
end repeat
end try

 

try
repeat with myPlugIn in myVST3PlugIns
if myAction is "Activate" then
set mySource to the POSIX path of file mySourceVST3Disabled & myPlugIn
set myDestination to the POSIX path of mySourceVST3
else
set mySource to the POSIX path of file mySourceVST3 & myPlugIn
set myDestination to the POSIX path of mySourceVST3Disabled
end if
do shell script "sudo mv " & quoted form of mySource & space & quoted form of myDestination password myPassword with administrator privileges
end repeat
end try
end tell

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s