Directly switching (without pressing OPTION) between AIFF and mp3 iTunes libraries

audioitunes

I have two iTunes libraries, one for pop music in compressed and lossy formats and another for classical music (and sometimes for jazz) in AIFF. I maintain two libraries because I'm concerned about bloating my home account with uncompressed files.

I am able to choose between the two by pressing Option before clicking the iTunes icon, but choosing from the two locations gets tedious.

How can I shorten the choice, ideally by having two icons, one for each library?

Best Answer

Try this.

Unfortunately, there is no direct method to use AppleScript to load a library, so this method instead adjusts the the iTunes preference file via AppleScript. I just verified that the method works in 10.8.4.

You'll want to follow the procedure once for each library, then export as an application from AppleScript Editor. Once you create the applications, you can simply doubleclick on the appropriate application to load your chosen iTunes library.

I made one slight addition to the AppleScript in order to make it the frontmost application:

tell application "System Events" to set frontmost of process "iTunes" to true