dougscripts.com

Popular Now

Search-Replace Tag Text

downloaded 16m 56s ago

Search-Replace Tag Text v6.6

For Music/TV Perform search-and-replace on text in your choice of tags

Remove n Characters From Front or Back

downloaded 17m 13s ago

Remove n Characters From Front or Back v6.7

For Music/TV Delete characters from the beginning or ending of selected tracks' name, artist, album, more

Proper English Title Capitalization

downloaded 18m 45s ago

Proper English Title Capitalization v4.5

For Music/TV Title Cap various track tags, featuring editable exceptions lists

This Tag That Tag

downloaded 19m 22s ago

This Tag That Tag v5.7

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

downloaded 21m 27s ago

New Play Count v4.0

For Music Set the Plays of selected tracks

downloaded 26m 30s ago

Re-Embed Artwork v2.7

For iTunes Exports and then re-imports selected tracks' artwork

Welcome!

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

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 macOS and many popular applications can be automated using AppleScript scripts. Scripts written for Apple's Music, TV and iTunes apps can manage files and track information, create playlists, interact with other applications, perform innovative tasks, and handle many kinds of chores with accuracy and precision 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.

Check back often or follow me on Twitter @dougscripts, my YouTube channel, 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:

RSS ROOLZ! SUBSCRIBE!

April 19 2021 - 8:55 pm

Can't Believe I'm Posting About GUI Scripting

It is a fact universally acknowledged—in my house—that GUI Scripting stinks. But the flip side of that is that sometimes it can be the only way to automate something with AppleScript. Especially so if the developers of the app you are 'scripting have long been ignoring your suggestions. Again, my house.

GUI Scripting is a way to write AppleScript that works by simulating mouse clicks, selections, key presses and other "touches" of the GUI elements of an app in order to get the app to do what those clicks and presses do. For instance, you can simulate a mouseclick on a menu item in a menu and whatever happens when you usually click that menu item will happen. GUI Scripting is clunky to work with for a number of reasons, but the two most discouraging are that it's tough to know what and how and where to click and press for the Thing you want to do; and that if the developer changes an app's layout in the future the scripts could break because something isn't where it was before.

Despite all that, I've been playing with GUI Scripting lately. It's what I use to change playlist views in Playlist Manager and how Needle Drop clicks the "Clear" button in the Playing Next panel. If you've used those scripts, you've had to give permission in "Accessibility" to allow those scripts to use the "System Events" app. System Events is what enables AppleScript to target GUI elements.

Here's a little scripting project that uses some GUI Scripting to do three things that I like to do somewhat regularly in the Music app: open the selected playlist in its own window; change the playlist View to "as Songs"; reposition the playlist window to a standard place, rather than BANG right over the main browser window. (Note that I could only get it to work on the latest version of Big Sur with the latest version of Music, which bears out my thoughts above about clunkiness.)

(more…)

April 18 2021 - 12:28 pm

UPDATED: This Tag That Tag v5.7

For macOS 11 and later only. This applet will assist with swapping, copying, and appending data between two user-chosen tags in selected tracks or tracks in the selected playlist:

Swap - swap data between tags, ex: ARTISTCOMPOSER
Copy - copy data from one to another tag, ex: ARTIST->COMPOSER ARTIST
Append - append data from one tag to the end of another, ex: ARTIST->COMPOSER - ARTIST
Prepend - append data from one tag to the beginning of another, ex: ARTIST->ARTIST - COMPOSER

The latter three actions also provide an option to delete the info from the first tag after the copy. Read Me explains all.

Latest version:

  • Fixes fatal error in previous versions that may have prevented script from launching
  • Adds toggle for "Are you sure"? confirmation dialog
  • Minor UI and performance enhancements

More information for This Tag That Tag v5.7 and download link is here.

April 16 2021 - 11:41 am

UPDATED: List MIAs v5.9

For macOS 10.15 and later only. This applet checks your Music or TV library for missing and presumed dead tracks--those tracks that have become disassociated from their file and which are listed with a "!"--and can delete them from the app or create a text file listing these tracks by last known File Path, Song Name, Artist and Album, which you can view using TextEdit.

Also see Super Remove Dead Tracks and Media Folder Files Not Added.

Latest version:

  • Minor UI adjustments, improvements

More information for List MIAs v5.9 and download link is here.

April 15 2021 - 1:04 pm

UPDATED: Drop A Few My Way v5.3

For macOS 10.15 and later only. Drag and drop audio files to this droplet to have the Music app convert them with an encoder selected on the fly, restoring the Preferences-set encoder afterwards, and save them to a user-selected location. The converted files/tracks are removed from the Music app, as though it "never saw them". Includes option to delete the source audio files.

Latest version:

  • Fixes regression whereby source files/tracks not removed from Music library

More information for Drop A Few My Way v5.3 and download link is here.

April 15 2021 - 11:23 am

UPDATED: Search-Replace Tag Text v6.6

For macOS 10.15 and later only. Performs a search-and-replace on the text in your choice of track tags in the Music or TV app (Title, Artist/Director, Album Artist, Album, Composer, Comments, Genre, Grouping, Show, Movement or Work) in the selected tracks or all the tracks in the selected Playlist. Features case sensitivity and whole word match options and "Test run" preview.

Latest version:

  • Fixes issue with "clear" buttons inexplicably disappearing
  • Minor UI and performance updates

More information for Search-Replace Tag Text v6.6 and download link is here.

April 12 2021 - 6:07 pm

NEW: Playlist Views Manager v1.0

For macOS 11 and later only. This stay-open-and-floating script applet can set the View, sort and sort direction and, in Songs View, show/hide the Column Browser and its columns for a selected playlist in the Music app. (This script will require your permission to access "System Events" in order to run. Please see the Read Me RTFD doc.)

Latest version:

  • Initial release

More information for Playlist Views Manager v1.0 and download link is here.

April 12 2021 - 4:29 pm

UPDATED: Playlist Manager v4.0

For macOS 11 and later only. The Music app only allows one playlist to be selected at a time. This applet can perform common useful tasks on a multiple selection of playlists: playlist title renaming (add text, remove text, search and replace text) and duplicate, delete, export, move to Playlist Folder and merge playlists; change the View As and Sort By settings. (This script will require your permission to access "System Events" in order to run. Please see the Read Me RTFD doc.)

Latest version:

  • Adds "Views" section
  • Minor performance enhancements

More information for Playlist Manager v4.0 and download link is here.

March 27 2021 - 2:03 pm

UPDATED: Sort by Artwork Size v2.1

For macOS 10.15 Catalina and later only. For users who are particular about managing artwork, this script can write the size of a track's artwork (eg: "600x600") to choice of Category, Comments, or Description tag (enabling tracks to be sorted by artwork size in a playlist using the chosen tag) and/or copy tracks with artwork less than or greater than a user-entered size to a new discrete playlist, named, for example, "Artwork < 300".

Latest version:

  • Initial accommodation for macOS Big Sur
  • Demo Mode is no longer time-based

More information for Sort by Artwork Size v2.1 and download link is here.

March 26 2021 - 8:35 pm

UPDATED: Audition End v3.5

For macOS 11 and later only. Play through each track in a playlist by a set number of seconds (:05 - :60) from the end. Additionally, wait a set number of seconds between each track; when engaged, begins playing from the first track or the first selected track in the playlist.

Also see Needle Drop.

Latest version:

  • This version for macOS 11 and later only
  • Better handling of timing if cloud track is downloading
  • Adds "Clear Playing Next" as a convenience routine

More information for Audition End v3.5 and download link is here.

March 26 2021 - 2:49 pm

UPDATED: Needle Drop v7.4

For macOS 11 and later only. This applet plays each track in the selected Music playlist for a set time interval optionally starting at a set number of seconds into each track, beginning with the selected track. Handy for 'scoping playlists.

Needle Drop will work best on tracks that have local files. Un-cached tracks streamed from the cloud may upset timing while audio is being downloaded.

Also see Audition End.

Latest version:

  • This version for macOS 11 and later only
  • Adds "Clear Playing Next" as a convenience routine

More information for Needle Drop v7.4 and download link is here.

Site contents © 2001 - 2021 (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.