Download hundreds (454 and counting) of AppleScripts for Apple's iTunes that will help make managing your digital music collection easier and more fun!
downloaded 4m 54s ago
Export selected playlists as individual XML or M3U files
downloaded 20m 50s ago
Displays files in iTunes Media folder not in iTunes track library
downloaded 27m 41s ago
View/Edit tags of selected track(s) in single window
downloaded 28m 12s ago
Enter text for the selected tracks' Category tag
downloaded 28m 46s ago
Renumber order of selected tracks
downloaded 40m 57s ago
Capitalize the first letter of each word in selected track names
AppleScript is a simple Macintosh-only programming language that can control and automate actions on your Mac. AppleScript is already available on your computer as part of the Mac OS and many popular applications can be automated using AppleScript scripts. Scripts written for iTunes can manage files and track information, create playlists, interact with other applications, perform innovative tasks, and handle many kinds of chores which otherwise would be repetitive, laborious, and/or time-consuming.
Cool! Where Do I Start?
Start browsing the site by using the scripts ↓ Menu link above. AppleScripts are gathered into these general Categories:
- Managing Tracks
- Managing Track Info
- Managing Artwork
- Managing Playlists
- Controlling iTunes
- Exporting Info
Or use the search box at the top of every page to try and find something specific.
Not sure how to install AppleScripts? Here's the Download/Installation FAQ & Video.
Apple has released iTunes 12.1 with fixes to device syncing and a new widget for controlling iTunes in Notification Center.
Things fixed: selection object for selected tracks in Audiobooks library works, reference to Audiobooks library via “get view of front window” command works. Things not fixed: View Options for CD display, Command-I shortcut for CD “Get Info”. More as it develops.
Playlists Info will display a sortable list of playlists in the current library (or in the selected source) along with their size, time and number of tracks. I’ve been finding this handy for eyeballing playlist sizes when managing music between iTunes and devices.
Additionally, the script can export a text file listing that information.
More info and download is here.
iTunes can only export a single playlist at a time using the File > Library > Export Playlist… command. My mouse finger’s inter-phalangeals are achy just thinking about exporting more than a few that way. Batch Export Playlists v1.4 will export each selected plain, Smart, and Genius playlist as individual XML or M3U files to a user selected directory. Such files can be re-imported into iTunes again later or into other devices or apps.
As a bonus, Smart playlist XML files can be exported as two files, with one containing just the Smart criteria.
This latest version adds a heirarchical view for Playlist Folders which more closely emulates iTunes’ playlist view and has some minor tweaks for better compatibility with OS X 10.10 and iTunes 12.
More information and download is here.
iTunes turns fourteen years old today which makes it about a month older than this website. And I think I’ve only just noticed that Playlist Folders don’t have a duplicate command. (Technically, Playlist Folders were introduced in September 2007 with version 5.0. I’m still surprised I hadn’t noticed. I probably just forgot. Yeah. That’s it.) Recently, I wanted to get rid of a bunch of Playlist Folders and dump their tracks into plain playlists and I figured a duplicate command might do that.
I suppose it’s easy enough to just select all the tracks in a selected Playlist Folder and use “Playlist From Selection” (Shift-Command-N) but I also wanted to delete the original Playlist Folder in the same swoop. And doing all that that turns into a mittful of keypresses and mouse-arounds. Which makes my scripty-sense tingle.
Duplicate Playlist Folder as Playlist will copy all the tracks in a selected Playlist Folder to a new “plain” playlist, essentially duplicating the tracks as viewed when the Playlist Folder is selected.
Optionally, it will delete the selected source Playlist Folder and its contents (of course, the tracks remain in your library, but any playlists and sub-Playlist Folders it contains will be deleted).
Codesigned, free, and nagless, more info and download is here.
Remove Leading-Trailing Spaces will remove any number of extra space characters at the beginning and ending of chosen tags (Name, Artist, Album Artist, Album, Composer, Genre, Grouping and Show) in the selected tracks.
Selected tags are remembered between launches.
iTunes 12 won’t let you add leading or trailing spaces to a text tag in the Get Info panel so these sorts of anomalies are likely to be the result of tagging by another means (by editing a tag directly in the iTunes browser window, for example, or by using another application).
Kirk has found a bug in iTunes 12 whereby selecting a batch of tracks and deleting their Genre tag via the Get Info panel inserts 8 spaces instead of empty text into each track’s Genre tag. This creates a Blank Genre that is actually displayed and selectable in Genre lists.
This AppleScript will correctly delete the Genre tag of each track in a selection:
tell application “iTunes”
set sel to selection
repeat with thisTrack in sel
tell thisTrack to set its genre to “”
Also, any number of other scripts that can edit the Genre tag, like Multi-Item Edit, will get the job done.
Chuck Joiner invited me to join him on his MacVoices podcast. We talk about iTunes and AppleScript (of course) and obsessive-compulsive music organization, among other topics.
Over the weekend, I released a version of Dupin that was basically a simple maintenance release. However, it was then brought to my attention that a bug had been in existence since v2.8.2 which errantly moved files to the Trash when using Dupin to remove tracks from a playlist. This isn’t an often-used feature—most users just want to delete the tracks and Trash the files from the entire library—but you can imagine the problem this would cause when the last thing you expected while just removing tracks from a playlist is to find that the files had been Trashed as well.
I have fixed that issue in version v2.8.4 of Dupin.
iTunes knows some stuff about your tracks but won’t let you see it other than via the Get Info panel because there are no columns in the browser window to accommodate it. We can fix that.
Sundry Info To Comments v4.0 can copy your single choice of filename, file path (location), file’s parent folder path, file creation date (YYYY-MM-DD HH:MM:SS), current playlist, volume adjustment, start time or stop time (HH:MM.SS), artwork size (WxH), purchaser name or purchaser account ID to choice of Category, Comments, Description or Episode ID tag of each selected track. By putting data in one of these available tags it can be visible and sortable or used with Smart Playlist criteria.
Setting up to copy the Apple ID to the Episode ID tag of the track selection.
This latest version adds the track’s start time, stop time and artwork size as info to apply; adds the Episode ID tag as a potential target tag; adds user-enterable separator-text field when appending to extant tag text; now stays active and frontmost until Quit; has minor compatibility adjustments for OS X 10.10.
I’ve been on a roll lately with the Managing Artwork scripts, eh?
The latest is Size of Artwork, which simply displays the size of the artwork of a selectd track:
For OS X 10.9 or later. This script is way more convenient to use when you assign it a keyboard shortcut.