Download hundreds (475 and counting) of AppleScripts for Apple's iTunes that will help make managing your digital music collection easier and more fun!
downloaded 4m 20s ago
Perform search-and-replace on text in your choice of tags
downloaded 15m 54s ago
Delete characters from the beginning or ending of selected tracks' name, artist, album, comments, composer, or show tags
downloaded 17m 35s ago
Play each track in playlist starting at user-set seconds from end
downloaded 17m 50s ago
Restore each selected track's artwork from an image file stored in its Album folder
downloaded 18m 14s ago
Search YouTube using tag info from selected or playing track
downloaded 18m 39s ago
Check scripts downloaded to your computer from dougscripts.com for latest version
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.
The latest episode of The Next Track podcast concludes our three-part look at films about music with a chat about some of our favorite (and not so favorite) concert movies. They just don’t seem to make ’em like they used to, if they make ’em at all.
Early in the ‘cast, I talked about going to see a lot of these movies at The Palace Concert Theater in Providence, RI when they held 99¢ movie nights. It has since been converted into the very very nice Providence Performing Arts Center (PPAC).
Here’s a shot of the older incarnation’s marquee, which I believe was probably taken in 1972:
Courtesy of rirocks.net.
An aside observation: The J Geils Band—who, of course, hail from neighboring Boston—were incredibly popular around this time so it’s no wonder The Eagles were second bill.
You read a lot of doom and gloom about CDs and audio downloads as we careen into the streaming age. But I am delighted that my file-related applications—Dupin, Join Together and M3Unify—still continue to be (reasonably) popular.
I’ve just posted an update for M3Unify which takes care of some minor maintenance.
M3Unify can manage file exports from iTunes by providing flexible user options such as file renaming, sub-folder creation, simple file conversion and so on. In the video demo I describe how I use it to export audio files to a thumb drive for use in my car’s audio player. But there are many other uses for it.
M3Unify is $5.00 and this update is free for registered users. Thanks for using it!
The iCloud Download column cannot be removed from a playlist in Songs View for very long (it can’t be removed at all from a playlist in Playlist View). You can hide it using View Options, but this will only be temporary and it won’t be long before it pops back up again. Its default initial placement seems to be adjacent to the Name column.
Personally, I like having this column available since I sometimes want to know if a track I want to work on has a local file or one that resides in the cloud. But I have heard from Correspondents who would prefer this column to stay hidden when they hide it.
Well, the trick I use is to keep it visible…but not visible. If you’re like me, you probably have the most important tag columns on the left side of a playlist in the browser window (while in Songs view). But I also keep non-essential/less-frequently-used columns far-off to the right so they are not visible when the playlist is horizontally scrolled full left in the browser window. So, click-and-drag the iCloud Download column all the way over to the right side of a playlist.
If you do this in the Music library (with Songs selected) then every playlist you create subsequently will be configured the same way when in Songs view. Existing playlists will need to be manually adjusted.
A Space Between will play each track in the selected playlist and will wait (one might say insert but that’s technically incorrect) a user-set number of seconds between each. Play can commence at the “top” of the playlist or from a selected track.
NOTE: This script will only work as described when the “Up Next” queue is empty. You can use the “Clear” button” in “Up Next” to empty it of tracks. This is an issue with iTunes 12.2 and later.
I’m often hopping around in iTunes among the “Library”, “For You”, “Browse”, “Radio” and “Store” tabs and likewise apt to be in a specific media library, like Podcasts or Movies. As such, it can be a minor pain to get back to my local Music library.
Okay, it’s only a couple of clicks. But it does elicit from me a small “arghh” burp from time to time.
So here’s a very simple script to which you can assign a keyboard shortcut that will display the Music library in the Library tab:
Save this in your home/Library/iTunes/Scripts/ folder and name it “Go to Music Library.scpt”. The script will appear in the iTunes Script menu. Then, open System Preferences and go to the Keyboard panel. Select “Shortcuts” and then “App Shortcuts” from the list on the left. Click the “+” button on the right side. In the drop down panel, select “iTunes” in the Application popup. Enter the name of the script, “Go to Music Library”, in the Menu Title text field. Enter your shortcut combination in the Keyboard Shortcut text field (I use Control-Command-H, where the “H” stands for “home”). Click the “Add” button and then close out of System Preferences. Thus, whenever you want to get back to your Music library, just hit the shortcut.
I’ve done something similar for my Internet Radio Station playlist.
Every so often I become re-enamored with my iPods. I have a 30GB “Video” iPod (5th gen) and a 160GB iPod Classic both of which still work very well. We talked about it on this episode of The Next Track podcast.
I recently heard from 3 different Correspondents within a single week who had updated their old iPods with 512GB SD cards—a procedure that I understand is very difficult.
The film “Baby Driver” has re-ignited the iPod love.
Vinyl is resurging. Cassettes are on a come-back. Could MP3 players be next?
Probably not. But, if you do still use an iPod from time to time then you might be interested in the update to Selected Playlists To iPod.
I sync music to one of my iPods, but the other is manually managed. There’s an Autofill feature but I prefer to manually drag tracks and playlists to fill it up the old-fashioned way. Or use a script. Selected Playlists To iPod will allow you to select a batch of playlists in iTunes and have them copied to a connected iPod, rather than have to drag each one individually in iTunes.
This only works with “conventional” iPods—and not the iPod Shuffle. It may work with iOS devices, but iOS doesn’t always buy what AppleScript is selling, if you know what I mean. The older iPod operating system works more co-operatively with iTunes.
Apple has released iTunes 12.7.3 with support for HomePod and improved AirPlay interface. (Update: I’m not sure I am able to detect the “improved AirPlay menu”.) More as it develops.
A Correspondent queries:
“Do you have a script that can create a playlist of songs if they have the “Skip when shuffling” attribute ticked in the info panel? The reason is because when I sync those songs to the iPhone that feature doesn’t sync along with it so they play regardless. The feature works on the Mac, just not on the iPhone.”
The shufflable property of a track does not have a corresponding Smart playlist criterion or Songs view column. So, looks like the only way to identify these tracks en masse is with AppleScript.
Interestingly, the shufflable property works somewhat backwards. If the “Skip when shuffling” checkbox is set (and a checkbox when checked has a “true” value) the corresponding shufflable property is set to false; that is, “not shufflable”. This might be the opposite of what you’d expect. For instance, when “Remember playback position” is set to true with a checkmark, its correponding bookmarkable property is set set to true (yes, allow this track to be bookmarked). Just kind of interesting. A little. But its important to keep in mind when you want to detect the correct (and not opposite) value.
Anyway, here’s a script that will copy any tracks in the Music library set to “skip when shuffling” to an existing playlist:
tell application "iTunes"
set targetPlaylist to playlist "Skip Shuffle Tracks"
set musicPlaylist to (some playlist whose special kind is Music)
set theTracks to every track of musicPlaylist whose shufflable is false
repeat with aTrack in theTracks
set db to database ID of aTrack
if not (exists (get some track of targetPlaylist whose database ID = db)) then error
duplicate aTrack to targetPlaylist
Open this in Script Editor by clicking the little script icon. Save it named whatever you like as a Script Bundle in your ~/Library/iTunes/Scripts/ folder so that it will be listed in the iTunes Script menu. I have already created a playlist in iTunes named “Skip Shuffle Tracks” so make sure you do, too. if you want to use a playlist with a different name then you will have to hard-code that name in the script where I have used “Skip Shuffle Tracks”.
Whenever you run the script it will get a list of track references from the Music playlist where each has its shufflable set to false. It will iterate over this list and for each track it will first see if the track already exists in the target playlist; and if it does not the track will be copied to the playlist.
The second try block around the duplicate command ensures that if any track cannot be copied, such as a “dead” track, the script will skip it without erroring.
A Correspondent asked how to deal with Voice Memos when the Voice Memo track in iTunes is named using the text that was entered after recording it and its associated file is named using a date and time format. Specifically, he wanted to offload and archive some of the recordings but was concerned that the filenames were not sufficient to describe the contents of the file. Could the track name be transferred to the filename?
The script File Renamer is ostensibly for renaming a track’s file in-place. But it can also be used to rename a copy of a file which can be saved to a user-chosen folder.
In this case, the Voice Memos have already been sync’d to iTunes from the iPhone. I’ve selected a single Voice Memo track in the screenshot, but batches are acceptable as well.
I originally named the Voice Memo “New Recording 3”. But the filename of the selected track is something like “20180105 060425.m4a”, indicating that I recorded it on January 5, 2018 a little after 6AM. File Renamer will create a copy of the file and name it “Voice Memo – New Recording 3.m4a” using the genre and name tags of the track, as well as some additional separator text. The original file remains unaffected.
BTW: I wasn’t able to find a specific Voice Memos playlist in iTunes. (Was there ever one? I’m not a Voice Memos Guy.) So I created my own with a Smart Playlist matching all media where Media Kind is Voice Memo.
For more sophisticated offloading options, you may also want to try M3Unify.