dougscripts.com

Cocoa-AppleScript

September 21 2013 - 10:20 am

NEW: Multi-Media Items Edit

For reasons not yet clear, as of iTunes 11.1, multi-item editing is no longer possible when a track selection contains mixed media kinds, audio and PDF for example. Kirk explains the matter here.

The script Multi-Media Items Edit provides basic tag editing for a selection of tracks of any media kind.

Wondering why your favorite tag or option isn't included? Just keeping it simple, friend-o.

May 31 2013 - 12:41 pm

UPDATED: File Renamer v2.3

File Renamer will rename the files of the selected tracks (or the files of the tracks in the selected playlist) with a filename pattern that is formulated using the tracks' tag data. Optionally, export a copy of the files to a chosen location and rename the files in that location.

This latest version will format date properties as YYYYMMDDHHMMSS.

More info and download here.

March 14 2013 - 2:06 pm

UPDATED: File Renamer v2.0

Week or so ago this site got some hits from a post at Reddit which served to remind me that "Uh, this site's been around for thirteen years." One of the comments reported that "I used a file renamer script that renames files based on the tracks metadata. It changed all my .m4a tracks to .mp3 and broke a lot of my library even though I told it to not replace file extensions." Sorry about that.

The original version of File Renamer (which was written by a fellow named Tino Heth) was posted in January 2002 and it hasn't been updated since. Back then, there were only MP3s, so the script didn't have to account for M4A. Unfortunately, it didn't account for any other extensions either. So I thought if people are still talking about it after all these years I'd better update it.

You can download it here.

January 30 2013 - 9:52 am

NEW: Search Results to Playlist

I've been using a variation of this search script for a while so I thought I'd update it with some customization settings nailed on and post it (there's a simple snippet version of it here). The thing is: I often want my iTunes search results to go directly to a playlist so I can get right to work on them there, usually tag editing. Without some automation this is typically a multi-stage grind comprised of searching, selecting track results, making new playlist, naming new playlist, locating and selecting the tracks again when new playlist gets focus (stab!), putting tracks into playlist by any one of various means, and then forgetting why I was searching for these tracks in the first place. (Related memory-loss issue: Name New Playlist From Selection.)

Search Results to Playlist puts a floating window over iTunes that provides the ability to search iTunes and copy the track results to a designated Results Playlist.

It can search the entire library, the selected playlist, or any of the categories (Music, Movies, Books, etc) for text in All, Name, Artist, Album, or Composer tags and then copy the results to a playlist. The script will create this Results Playlist if necessary. If the playlist already exists then the track results can replace its current contents or may be appended to it.

more

November 9 2012 - 8:27 am

NEW: Dual-Pass Search

Dual-Pass Search conducts a two-pass search for tracks in the currently selected playlist. On the first pass, the search query behaves like iTunes' own searchbox. Then the track results from the first pass are processed with a second search query.

The track results can be displayed in a Results Window and optionally sent to Results Playlist in iTunes.

Download it here.

October 4 2012 - 4:43 pm

UPDATED: Playlist Manager v1.1

Playlist Manager v1.1 can perform common useful tasks on a multiple selection of playlists: rename (add text, remove text, search and replace text), toggle repeat and shuffle, duplicate, delete, export, merge.

This latest version fixes a problem with renaming playlists that are contained in Playlist Folders and now allows "blank" to be used as the replace text in the Search and Replace tool.

September 28 2012 - 12:33 pm

NEW: Playlist Manager

I create, reuse, and recycle playlists frequently and my playlists rarely remain static. A hindrance in my playlist management is the inability to select more than one playlist at a time to, say, delete or rename them. Well, I got around to fixing that with Playlist Manager.

This applet can perform common useful tasks on a multiple selection of playlists: rename (add text, remove text, search and replace text), toggle repeat and shuffle, duplicate, delete, export, merge.

September 13 2012 - 1:29 pm

UPDATED: Remove n Characters From Front or Back v4.6

Remove n Characters From Front or Back lets you delete a specified number of characters from either the beginning or the ending of the Song Name, Album, Artist, Comments, Composer or Show tag (or their "Sort" siblings) of each selected track. For example, delete the initial digits and the space from "01 First Track", "02 Second Track", and so on.

This updated version caps the maximum number of characters to the length of the shortest text in the selected tags, preventing inadvertent deletion of tag text that may be shorter than the user-set number of characters to remove.

July 26 2012 - 11:06 am

Downloading Doug's AppleScripts In the Era of Gatekeeper

As you may know, OS X 10.8 introduces a new security feature called Gatekeeper which can conditionally disallow software downloaded from the internet from being launched on your machine. You can access the Gatekeeper settings in the Security pane of System Preferences.

Gatekeeper offers three "trusted source" security settings for launching downloaded apps:

  1. Only launch apps from the Mac App Store
  2. Only launch apps from the Mac App Store or digitally signed with an authorized Apple Developer ID
  3. Launch anything downloaded from anywhere

The default Gatekeeper setting is Number 2. My guess is that the sort of people who visit this site will have lowered that to Number 3, "Allow from Anywhere".

[UPDATE: As of macOS 10.12, the third option is no longer available.]

Gatekeeper doesn't take notice of many of the types of AppleScripts available from this site so downloading and launching those scripts from here won't trigger Gatekeeper no matter what the security setting. AppleSctipt applications, which constitute the majority of recent applets and droplets, have been/will be codesigned with an Apple Developer ID.

However, it is still remotely possible that a handful of older scripts from this site may be quarantined by Gatekeeper and won't be permitted to launch after you download them. (This does not affect scripts that you have already downloaded and have launched at least once.)

What to do: Control-Click/Right-Click on the script in the Finder and choose "Open" which will present an option to override any Gatekeeper settings. Alternatively, you could lower your Gatekeeper security setting temporarily while you launch the script and then restore the setting afterwards.

Once you've successfully launched the script the first time, by whatever means, it will be ignored by Gatekeeper thereafter.

Update: additional new information posted here.

June 20 2012 - 9:50 am

NEW: Convert and Replace

It hadn't ever occurred to me that the term "convert", as it applies to converting an audio file from one type to another and which is the AppleScript command for doing so, could be construed to mean "replace". Though that's probably why Apple has unambiguously named the menu item in the iTunes Advanced menu used to "convert" a track selection as "Create MP3 Version" (or whatever the current import setting is). It's pretty obvious you get an additional new track and not a transformed replacement.

"Convert" in its "replace" sense, however, is what a number of Correspondents have wanted to do: downsize some ALAC tracks to AAC or MP3, for example, and have the converted versions replace the occurrences of the originals in any playlists.

Convert and Replace will convert a batch of selected tracks—or the tracks in a selected playlist—using an encoder chosen on-the-fly (the encoder's current Preferences-set options will be applied) and replace the originals throughout your entire library with the converted versions. Additionally, you can opt to Trash/delete or keep the original files and tracks. (If the tracks are kept they remain in the "Music" library but will have been replaced in all other playlists.)

Possible deal-breaker: newly converted tracks will have a Date Added of "now". There is no getting around this since Date Added is a read-only property assigned by iTunes when a new track is added to its library.

For OS X 10.6 or better.

Site contents © 2001 - 2024 (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 be interrupting the one who is doing it.