dougscripts.com

Welcome!

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

Popular Now

Needle Drop

downloaded 7m 28s ago

Needle Drop v5.0

Play through each track in a playlist at your set interval

Merge-Delete Playlists

downloaded 9m 39s ago

Merge-Delete Playlists v3.3

Batch merge and/or delete playlists

downloaded 17m 34s ago

Album-Artist to HTML Table v1.0

Album-Artist pairs to HTML doc

downloaded 23m 15s ago

Add or Subtract Play Count v2.0

Add or subtract a user-entered number from each selected track's Plays

File Renamer

downloaded 24m 12s ago

File Renamer v3.1

Use tag data to formulate new file name for selected tracks' files

Increment Number Tags

downloaded 25m 3s ago

Increment Number Tags v2.3

Set choice of various number tags of selected tracks incrementally

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 the Download/Installation FAQ & Video.

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

Latest:

July 4 2015 - 11:40 am

iTunes 12.2 Issues With Popular DJ Software

The DJ TechTools website reports that several popular DJ apps, including Rekordbox, Traktor, and Serato are having problems integrating with the latest iTunes.

So, it’s not just me and Sonos.

July 4 2015 - 10:01 am

iTunes 12.2 Playlist View Issues

iTunes 12.2 introduces a new View by which to display tracks in a playlist: “Playlist”. It displays a nice header with artwork from the tracks in the playlist and abbreviated tag information. I like it.

Playlist in playlist view

Except that there is an issue when dragging tracks from a playlist set to “Playlist” view to another drag-and-drop enabled application. The pasteboard that should contain metadata information about the tracks being dragged (“com.apple.itunes.metadata” is the name of the pasteboard type) only supplies the file paths (“NSFilenamesPboardType”).

This affects my apps “Join Together”, “M3Unify” and “Playlist Assist”. The workaround is to either drag tracks while the playlist is in “Songs” view or drag the entire playlist by selecting its name in the Playlist Column and dragging.

I’m working on fixes for those apps.

July 2 2015 - 12:10 pm

Share iTunes XML with other applications

iTunes 12.2 has a new setting in the Advanced pane of Preferences:

Share iTunes XML with other applications

If you download and use any of my apps or scripts you should probably leave that checked. In fact, if you use any software that may interact with iTunes you should leave it checked. The iTunes XML file is a way for other applications to easily get information about your current iTunes library. Denying access to this file will most likely cause these apps to fail.

I have already gotten reports of users experiencing mysterious issues with my software, only to find out they had unchecked this preference. I’m not sure what security issues this setting is supposed to address but unless you are aware of a particular issue, I don’t see why you shouldn’t leave it checkmarked.

July 1 2015 - 5:07 pm

play with once Is Broken

(I have updated this post. See below.)

To play a track just once and then stop you’re to do something like this, using the once modifier with the play command:

tell application “iTunes”

set aTrack to item 1 of selection

play aTrack with once

end tell

Well, that doesn’t work in iTunes 12.2. The tracks just keep on coming. In fact, a few times some random track in some other playlist started playing afterwards or queues up in Up Next.

UPDATE (July 1, 2015, 6:39PM) – I think I may be wrong about this. I cannot replicate the original set of issues I describe above.

July 1 2015 - 12:36 pm

Dupin 2.8.7 Available

I fixed a couple of bugs that occur with iTunes 12.2, mostly cosmetic. Click “Check for Update…” in your current version or download the lateset from here.

Similar bugs showed up in Dupin Lite 2 and a new version has been submitted to the Mac App Store for review. It should be available from there in a few days.

July 1 2015 - 11:07 am

UPDATED: Music Folder Files Not Added v4.5

Music Folder Files Not Added will list the file paths of the files in your designated “iTunes Media” folder which are not in iTunes’ track library. Additionally, you can select a different parent folder and its contents will be compared to the iTunes library. Includes options to Add a selection of found files to iTunes, move them to the Trash, and export a text file listing the file paths.

This latest version accommodates some changes in iTunes 12.2 and provides preliminary support for OS X 10.11 (El Capitan) beta.

Music Folder Files Not Added is free to try for 10 days, $1.99 thereafter. This is a free update for registered users.

More information and download is on this page.

July 1 2015 - 8:23 am

Dragging from Audiobooks Still Fails

This has been a problem for a couple of versions now. You can’t drag tracks from the “Audiobooks” library. There’s simply nothing in the “Tracks” node of the dragged pasteboard. Here’s what the pasteboard looks like in Console after trying to drag a track from the Audiobooks library to my app Join Together:

Pasteboard contains no track entries

July 1 2015 - 6:06 am

iTunes 12.2 and AppleScript Issues, Volume 1

The current track and current playlist properties return a -1731 “unknown object type” error when run against a currently playing Apple Music track. That’s going to be a problem for scripts and apps that use those properties to identify a playing track. I couldn’t say if this is intentional or a bug.

The iTunes XML reports the main Library name as “####!####”. This is not necessarily AppleScript related, but several of my scripts may refer to this “Master” playlist by obtaining its name from the XML.

More as it develops.

June 30 2015 - 7:47 pm

Cute New iTunes track Property

It’s loved:

tell application “iTunes”

set sel to selection

repeat with aTrack in sel

try

set aTrack’s loved to true — or false if un-loved

end try

end repeat

end tell

The playlist also has a loved property. track also has album loved.

UPDATE: Unfortunately, current track and current playlist are broken for Apple Music tracks. So changing the loved property of a playing Apple Music track can’t be done.

June 30 2015 - 6:32 pm

iTunes v12.2, Apple Music and AppleScript

Today, Apple released a new version of iTunes for OS X that accommodates its new MUSIC service, comprising: Beats 1 global 24/7 radio; algorithm- and human-curated playlist streams (replacing iTunes Radio); “Connect”, the social media component; and the ability to play tracks streamed from Apple’s music catalog alongside your current library tracks.

Apple did not make the new iTunes app available to developers before its official release and, of course, the Apple Music services weren’t available until today either. So I had to wait like everybody else to see what AppleScript changes may have been wrought upon the latest iTunes app. I’m primarily concerned with still being able to manage my own media library with AppleScript and, if possible, accommodating any streaming Apple Music tracks that I may mix in with them.

There are changes in iTunes 12.2 that will require several if not many scripts and apps to be updated. This is going to take me some time to ascertain, but I will report the issues when I have figured them out.

Site contents © 2001 - 2015 (that's right: 2001) Doug Adams and weblished by Doug Adams, dougscripts AT mac DOT com. About.
All rights reserved. Legal.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no affiliation with Apple, Inc.