Download hundreds (473 and counting) of AppleScripts for Apple's iTunes that will help make managing your digital music collection easier and more fun!
downloaded 6s ago
Reset history properties of selected tracks to default values
downloaded 26m 58s ago
Use tag data to formulate new file name for selected tracks' files
downloaded 51m 33s ago
Sort purchased tracks into discrete playlists by name or Apple ID
downloaded 59m 5s ago
Remove iTunes tracks disassociated from files
downloaded 1h 4m 37s ago
Locates pairs of track entries pointing to the same file
downloaded 1h 5m 7s ago
Exports and then re-imports selected tracks' artwork
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 a Download/Installation FAQ & Video.
I have seen some observations on the interwebs that some AAC and MP3 files are not displaying their artwork metadata as the file’s icon under High Sierra 10.13.1. That is: the file for a track with assigned artwork in iTunes displays in the Finder with a generic audio icon rather than the album artwork. If I recall correctly, there have been periods over the years where this has both worked and not worked as expected.
I’ve paid little attention to this issue because I don’t care about artwork for my audio files. Assigned artwork for tracks in iTunes is one thing, but how the files appear in the Finder is of little interest to me. But obviously this is something that many users have come to expect if not rely on.
My understanding is that Apple is aware of this issue. In fact, I’m running the latest High Sierra 10.13.2 beta and don’t detect a problem. So don’t sweat it.
Apple has released iTunes version 12.7.1 (build 18.104.22.168) and it should be available from the App Store. Apple hasn’t mentioned any specific enhancements, features or fixes.
iTunes 12.7 introduced the “Downloaded” playlist that can be made accessible in the Library section of the Sidebar. Ostensibly, this playlist contains all the tracks you have downloaded in one way or another from the Apple Store, iCloud Music Library and Apple Music.
Unfortunately, the Downloaded playlist is inaccessible to AppleScript. The following script should 1) get a reference to the selected playlist and 2) get a reference to the selected tracks, but it does neither:
Thus, any script that needs this information to work with the Downloaded playlist will fail.
Apple has somewhat relented to criticism about removing Apps and Ringtones syncing in iTunes 12.7 and has made iTunes 12.6.3 available with these abilities. iTunes 12.6.3 will install over iTunes 12.7, unlike the non-trivial process previously required to downgrade back to 12.6.2.
I suppose that for people who felt ambushed by installing iTunes 12.7 and weren’t able to get their Apps and Ringtones in order, this will enable some extra time to do so. But I wouldn’t want to stick around on this version. Apple has warned that 12.6.3 won’t provide notifications for future updates and it presumably does not have 12.7’s new features and fixes. So once you’ve made any adjustments (say, getting your Fabulous Ringtones Collection uploaded in toto to your devices, extricated older iOS apps and so on) you may want to upgrade back to 12.7.
Probably shouldn’t have to keep checking what syncs and doesn’t with iCloud Music Library.
Looks like Plays and Last Played Dates are still an issue. If I play a track on my iMac, the Plays and Last Played date update as expected. The same track on my MacBook Pro does not increment. If I play a track on my iPhone, the tracks on the iMac and the MBP increment Plays and Last Played correctly. Played from an iPad mini, nothing updates.
Playing tracks through Home Sharing works as expected.
This mishigas seems to be what is happening for others.
There was a bug with Dupin running under High Sierra that distorted the buttons in a Purge dialog and made them somewhat un-responsive. I hadn’t seen this in the 10.13 betas so I wasn’t expecting any issues when the final release of 10.13 came out this week.
Luckily, an alert Correspondent let me know about it and I fixed it right up this morning. Current users can “Check For Update…” in Dupin’s application menu or download the latest version on this page.
I’ve also submitted an update for Dupin Lite 2 and that should be up on the App Store in a day or so.
For a brief time, back when I was radio DJ, a station I worked at experimented with using “key segues”, whereby a recorded sounder would transition from a song played in one key to a song in another. Thus: Song in C fades -> sounder transitions from C to A minor -> seg next Song in A minor.
It was horrendous.
Anyway. Since I was an Actual Musician (few and far between in radio), it was my job to assign the correct key for each song we played. Which essentially meant that I sat in a studio a couple of times a week with a CD player and a Casio keyboard and diddled around until I determined the key of each song we added that week.
Nowadays, a lot of DJs use the musical key of the tracks they play to create “harmonic mixes”; tracks are mixed or segued according to harmonic rules. Some DJs probably aren’t musically inclined either, so there is software and databases and such that can supply the key for their tracks. Then all they have to do is check the Camelot chart to see what might sound good.
(This, of course, is not perfect, since pitches can vary. Which is what made my old station’s experiments with key segues so cringey. We had CD players that could adjust for pitch, but nobody wanted to spend that much time on creating perfectly harmonic segues. But, whatever.)
I heard from a Correspondent who uses this system. He has the Camelot codes in his iTunes tracks’ Comments tags. These are codes that represent 24 musical keys and look like this: 1A, 2A, 3A…10B, 11B, 12B:
Courtesy of harmonic-mixing.com
He wants to convert the Camelot codes to the actual key. So here is a script that will do that: (more…)
Now that iTunes 12.7 no longer manages iOS apps, you’re left with a “Mobile Applications” folder containing the apps iTunes has been backing up for all these years. For most users this folder can be Trashed after updating to iTunes 12.7. But if your Mobile Appplications folder contains apps purchased with multiple Apple IDs, you may want to re-install the appropriate apps on the appropriate devices.
But which apps belong to which user?
Apps By Apple ID will list the apps in the “Mobile Applications” folder by app name, file name, purchaser’s Apple ID, size, version and last date modified.
Additionally, a tab-delimited text file of this information can be exported or the apps copied and sorted into “Purchased by…” folders (iTunes 12.7 and later only, see the Read Me for other important information).
If you perform a clean install of the operating system, an “iTunes” folder will not be created in the user “Library” folder nor the local “Library” folder (the one at the top level of the startup disk). This has been the case since at least macOS 10.12.2.
Do not confuse this “iTunes” folder with the one created in “Music”, which stores iTunes support files. The “iTunes” folder in the “Library” folder originally contained an “iTunes Plug-Ins” folder as well as the “Scripts” folder. Apple no longer allows third-party visualizer plug-ins (I believe; although the built-in visualizers still work), so the plug-ins folder is apparently unnecessary. But the “Scripts” folder is still checked by iTunes for AppleScript files to display in its Script menu.
Thus, you may have to create these folders yourself. (But only after a clean install. If these folders already exist and you simply update your OS or transfer from a backup post-install then the folders will remain or be restored.) Below are listed the pertinent file paths, with the folders you may need to create emphasized:
For all users of the machine: [startup disk]/Library/iTunes/Scripts/
For a single user: [startup disk]/Users/[user name]/Library/iTunes/Scripts/
(The user Library folder is hidden by default, but most nerds I know immediately make it visible: Select your home folder and open it in a Finder window. Click View > Show View Options in the Finder Menu or press Command-J. At the bottom of the View Options panel, check-mark the “Show Library Folder” checkbox.)
Additionally, you can assign keyboard shortcuts to scripts that appear in the iTunes Script menu.
Don’t forget that the system-wide Script menu, which appears on the right side of the Menu Bar, can also be configured to display scripts that are associated with any frontmost application. Thus, when iTunes is frontmost it can display the appropriate iTunes AppleScripts:
Folders for the system-wide Script menu must be set up like so:
For all users of the machine: [startup disk]/Library/Scripts/Applications/iTunes/
For a single user: [startup disk]/Users/[user name]/Library/Scripts/Applications/iTunes/
You can create AppleScripts for many other Apple and third-party applications and place them here as long as the final folder name matches the name of the application (Photos, MarsEdit, Safari, and so on).
Now, there are essentially two kinds of scripts, compiled scripts and application scripts. Compiled scripts have this icon:
…and application scripts (or applets) have this icon:
Compiled scripts can only be launched from the Script menu (or other third-party launcher). And while applets can be conveniently launched from the Script menu, they can just as well be launched from any location in the Finder by double-clicking them. Sometimes it may be easier to launch an applet from an easy-to-access folder or from the Finder’s Toolbar rather than from one of the Script menu locations.