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

Playlist Manager

downloaded 6m 30s ago

Playlist Manager v2.1

Perform tasks on a batch of playlists; rename, delete, duplicate, merge, more

This Tag That Tag

downloaded 10m 24s ago

This Tag That Tag v4.3

Applet assists with swapping, copying, appending data between track tags

downloaded 10m 27s ago

Whack Current Track v2.0

Deletes the current track from all playlists and moves to Trash

Multi-Item Edit

downloaded 12m 10s ago

Multi-Item Edit v4.2

View/Edit tags of selected track(s) in single window

downloaded 28m 6s ago

Re-Embed Artwork v2.1

Exports and then re-imports selected tracks' artwork

Remove n Characters From Front or Back

downloaded 31m 11s ago

Remove n Characters From Front or Back v5.0

Delete characters from the beginning or ending of selected tracks' name, artist, album, comments, composer, or show tags

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 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.

June 29 2015 - 6:56 am

Script of the Day: Artist to Last-First

Artist to Last-First will parse the text of the chosen tag (Artist, Album Artist, Composer or one of their Sort siblings) of a selection of tracks:

Move the LAST word of the tag to the beginning, eg:

  • Hound Dog Taylor -> Taylor, Hound Dog
  • OR Move the FIRST word of the tag to the end, eg:

  • The Crystal Method -> Crystal Method, The
  • Then, the newly configured text can be copied back to your choice of Artist, Album Artist, Composer, Sort Artist, Sort Album Artist and/or Sort Composer tag(s).

    More information and download is on this page.

    Previous Scripts of the Day. Subscribe to my RSS feed or follow @dougscripts on Twitter to get daily “Script of the Day” notifications.

    June 26 2015 - 6:29 am

    Script of the Day: Sundry Info to Comments

    Sundry Info To Comments copies 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.

    Sundry Info To Comments

    By putting data in one of these available tags it can be visible and sortable or used with Smart Playlist criteria.

    More information and download is on this page.

    Previous Scripts of the Day. Subscribe to my RSS feed or follow @dougscripts on Twitter to get daily “Script of the Day” notifications.

    June 25 2015 - 6:47 am

    Script of the Day: Search Results to Playlist

    Search Results to Playlist can search a chosen category (entire Library, Music, Movies, etc) or the selected playlist for user-entered text by All, Song, Artist, Album, or Composer tag and copy the track results to a Search Results playlist, which will be created automatically if necessary.

    Search Results to Playlist

    Can optionally re-create or append to the Search Results playlist on each run. Floats over iTunes while active for easy access.

    More information and download is on this page.

    Previous Scripts of the Day. Subscribe to my RSS feed or follow @dougscripts on Twitter to get daily “Script of the Day” notifications.

    June 24 2015 - 5:24 am

    Script of the Day: Playlist Names to Text File

    Playlist Names to Text File will export the names of the playlists in the selected Source to a text file. The Source is determined by whatever playlist is currently selected: if you have a device playlist selected, all its names will be exported; if you have an iTunes library playlist selected, then all iTunes playlist names will be exported.

    More information and download is on this page.

    Previous Scripts of the Day. Subscribe to my RSS feed or follow @dougscripts on Twitter to get daily “Script of the Day” notifications.

    June 22 2015 - 5:47 am

    Script of the Day: Trackographer

    Trackographer will monitor iTunes and send tag and time-of-play information of each track that plays (including iTunes Radio and internet radio streams if they provide track info) to a text file.

    Preferences can be set to include or not include various basic tags and to create a plain text file or a tab-delimited text file which can be imported into a spreadsheet.

    More information and download is on this page.

    Previous Scripts of the Day. Subscribe to my RSS feed or follow @dougscripts on Twitter to get daily “Script of the Day” notifications.

    June 20 2015 - 11:36 am

    UPDATED: Multi-Item Edit v4.2

    Multi-Item Edit is an applet that acts as an alternative to iTunes’ “Get Info” editing panel:

    Multi-Item Edit screenshot

    You can read more about it on its product page, where there’s also a quick YouTube video explaining how it goes.

    This latest version fixes a problem with changing Last Played and Last Skipped dates in single-edit mode; fixes a logic issue with auto-setting checkboxes; worksaround issue whereby iTunes Match tracks might be ignored; fixes an issue with toggling Information Tracking; and has preliminary support for OS X 10.11 (El Capitan) beta.

    Multi-Item Edit is free to try for ten days, $1.99 thereafter.

    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.