dougscripts.com

Welcome!

Download hundreds (478 and counting) of AppleScripts for Apple's iTunes that will help make managing your digital music collection easier and more fun!

Popular Now

Proper English Title Capitalization

downloaded 16m 13s ago

Proper English Title Capitalization v3.6

Title Cap various track tags, featuring editable exceptions lists

Append to Selected Tag

downloaded 27m 18s ago

Append to Selected Tag v4.7

Append user-entered text to beginning or ending of selected tag of each selected track

downloaded 28m 59s ago

Albumize v2.0

Renumber playlist tracks to play order

Albumize Selection

downloaded 32m 40s ago

Albumize Selection v3.0

Renumber order of selected tracks

Convert and Export

downloaded 49m 37s ago

Convert and Export v4.1

Convert selected tracks and export the converted files to a new folder

Remove Leading-Trailing Spaces

downloaded 55m 47s ago

Remove Leading-Trailing Spaces v1.5

Removes leading and trailing space characters from chosen tags in selected tracks

What's AppleScript?

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:

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.

Check back often or follow me on Twitter @dougscripts, my YouTube channel or on Facebook, or subscribe to my RSS blog feed and 30 Most Recent Scripts RSS feed to stay notified about new and updated scripts and info.

Latest:

May 21 2018 - 6:07 pm

Batch-Change Media Kind Bug

Sometimes it’s difficult to tell if a bug is really a bug or just a bizarre design decision. What I thought was a fixed bug might be the latter. The gist of this particular situation is that while you can select an individual Music track and change the Media Kind in its Show Info > Options panel to Music, Podcast, Audiobook or Voice Memo, you cannot select anything but Music on a batch selection. This post at Apple Discussions illustrates the issue with screenshots.

It is frequently desirable to change the Media Kind of Music tracks to Audiobook because these kinds of files are often imported as Music tracks. But unless you want to change each one individually there’s only a complicated workaround that apparently requires deleting and re-adding.

I did not try this workaround. Instead I wrote this AppleScript that changes the Media Kind of the selected tracks to Audiobook:

tell application "iTunes"

repeat with aTrack in selection

try

set media kind of aTrack to audiobook

end try

end repeat

end tell

A Correspondent alerted me to the issue and he tested this script out on a few batches of tracks without a problem (thanks again, Stephen).

To use the script: Open it in Script Editor by clicking the little script icon above. Save it named whatever you like with the Format “Script” (.scpt) in your ~/Library/iTunes/Scripts/ folder so that it will be listed in the iTunes Script menu. As usual with little scripts like this its often expedient to add a keyboard shortcut.

May 16 2018 - 8:45 am

Remove Currently Playing from Current Playlist

It actually takes more words to explain what this script does than words used in the script itself.

You might be listening to a playlist when you hear a song that doesn’t belong in that playlist—a Frank Zappa track ended up in a Frank Sinatra playlist, for example. You could: right-click on the iTunes LCD and click the “Remove From Playlist” item. If you haven’t disabled it, you’ll see a confirmation dialog asking if you realy want to remove the current track from the playlist.

That’s three clicks so far. And then, after the track is removed from the playlist, iTunes stops. And to resume, you’ll either hit space bar to play the next track (which will be selected) or spend some time looking for a track to play next.

That’s a lot of business.

So here’s a script that will delete the the currently playing track from the current playlist and start playing the next track* automatically:

tell application "iTunes"

if special kind of current playlist is not none then return

set deleteThis to current track

next track

try

delete deleteThis

end try

end tell

Open this in Script Editor by clicking the little little script icon above. Save it named whatever you like with the Format “Script” (.scpt) in your ~/Library/iTunes/Scripts/ folder so that it will be listed in the iTunes Script menu. Follow the instructions on this page to add a keyboard shortcut.

Oh yes. A keyboard shortcut.

The first line ensures you don’t run this on a track playing from a media library playlist, because deleting a track from one of those deletes the track from the library. Then it stores a reference to the currently playing track, then plays the next track. Finally, the former current track is deleted from the playlist. The try block is used so that if the track can’t be deleted for some reason the script will fail gracefully.

*The Next Track is a terrific podcast I co-host.

May 5 2018 - 3:29 pm

Silent iTunes Update Fixes Crossfade Issue

The most recent version of iTunes, 12.7.4.76 from March 29. 2018, broke the Crossfade feature. I’m a bit late on this, but Apple released an update to iTunes, 12.7.4.80, on April 16, 2018 that reportedly fixes this. But you won’t see this update in the App Store.app. You have to go to this page at Apple to get it.

I’ve installed it today and Crossfade is still inoperative. However, several Correspondents at this Apple support page report that it may take a little while for Crossfade to work again. I don’t know why that would be; perhaps some caches need to clear or something.

UPDATE MOMENTS LATER… Crossfade is working,

April 27 2018 - 10:32 am

The Next Track, Episode #102 – Silence

Well, without silence, all the noises in the world would run together…right? Or, at least the tracks of an album or playlist would. But what about silence as a “thing” to be appreciated as the space between musical events? That’s what we talk about in this week’s episode.

You can listen to the episode at The Next Track website here or subscribe from this page to make sure you get all future episodes. As usual, there’s a link to an Apple Music playlist of our “next track” picks.

April 23 2018 - 11:55 am

NEW: Side Splitter

Back in the day, LP record albums were experienced as pairs of “sides”, right?

A decent record side was about 22 to 27 minutes long. And so we got used to listening to chunks of music of this duration. These time constraints on a record would often affect how the album was programmed, such as the song order and perhaps other conceptual factors.

If you spent a lot of time listening to record albums this way, you may remember the convention of “flipping the record” after the first side was finished in order to hear the other side. It only took a few moments to do so, but this pause in the action is the sort of thing you don’t experience much with CDs and virtually never with hours-long playlists.

I wondered what it would be like now to experience some of my classic digitized albums with a deliberate pause between the last song of one side and the first song of the next side. So, here’s Side Splitter.

It will copy a selection of tracks into separate user-designated “album side” playlists (by placing a checkmark next to the last song of a “side”) and then offer to auto-play them; when a “side” playlist stops, the script will offer to play the next “side” playlist, which you acknowledge by clicking an “OK” button the script shows in a dialog. When the entire album has played this way, the script will offer to delete the playlists.

It actually brings back that feeling of playing individual record sides.

Side Splitter is free to use with a donation nag. More info and download is on this page.

April 21 2018 - 9:49 am

NEW: Artwork as Album Folder Icon

I usually recommend that you should just ignore the files in the iTunes Media folder. There’s not much of a reason to go poking around in there if iTunes is managing your audio files. And interfering could disturb iTunes.

But plenty of iTunes users manage these files manually outside of the iTunes Media folder (although iTunes will still use this folder for Store downloads, CD rips, podcast downloads, and so on, in cases where it needs to know where to save something). For example, users who share their iTunes audio files with DJ’ing software may prefer to access these files manually. So it might be handy to make Album folders more easily identifiable by using the album artwork as the Album folder icon.

Artwork as Album Folder Icon will use the assigned artwork from the selected tracks as the icon for the folder containing each track’s corresponding file in the Finder:

Just select some tracks, or a playlist of tracks, and begin processing with the script. If the tracks have artwork and their files are accessible, the individual album’s artwork will be applied as the icon for the folder containing the files.

More information and download is located on this page.

April 20 2018 - 2:26 pm

The Next Track, Episode #101 – Radio Paradise

I was only just mentioning Radio Paradise in our episode on Radio a few weeks ago and that I’ve been a frequent listener for years. Well, in this week’s episode we were happy to welcome Bill Goldsmith, the co-founder and and co-operator (along with his wife, Rebecca) of this venerable internet radio station.

You can listen to the episode at The Next Track website here or subscribe from this page to make sure you get all future episodes. As usual, there’s a link to an Apple Music playlist of our “next track” picks.

April 15 2018 - 2:15 pm

The Next Track, Episode #100 – How We Listen to Music Today

For our 100th episode, Kirk and I reflect on how the way we listen to music has changed over the nearly two years we’ve been producing the podcast. I think that if you had told me back when we started that I’d be reasonably content with streaming, I’d have thought you were crazy.

You can listen to the episode at The Next Track website here or subscribe from this page to make sure you get all future episodes. As usual, there’s a link to an Apple Music playlist of our “next track” picks.

April 7 2018 - 2:07 pm

Album Loved No Longer a Thing?

I was playing around with Album Loved settings in the latest iTunes (12.7.4) and I’d have sworn the Album Loved was displayed as a single heart adjacent to the Album Rating. But not now?


Where’s the love?

You can see that “Loved” is chosen in the contextual menu but there is no indication that anything is loved.

And it seems that in some Views, I can batch-set all the tracks to Loved, but not the actual album—or, at least, this is not being displayed.

I’m leaning towards “bug”.

UPDATE: Steve MacGuire reminds me that the Album Love heart is still visible in a wide-enough Artwork column in Songs View:

But I rarely use this configuration. So now I’m wondering if I am “mis-remembering” the Album Love heart in Album View?

April 4 2018 - 6:06 am

Name New Playlist From Selection, Updated

I’ve mentioned my “Name New Playlist From Selection” script in the past. It emulates iTunes’ “Playlist From Selection” command with the added feature of asking for the playlist name before actually creating the playlist. This just seems to make sense to me rather than naming it afterwards. I’ve given it the same keyboard shortcut as the iTunes command (Shift-Command-N) so that the script is launched instead of the command being carried out.

Here is an updated version of that script which adds an option to provide a playlist description. The default text presented will be “Created 4/4/2018”, or whatever the current date is.
(more…)

Site contents © 2001 - 2018 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not interrupt the one doing it.