dougscripts.com

AppleScript

April 9 2009 - 12:04 pm

Missing Menu and Spare Parts Sections

Some visitors may have noticed a few changes to the site's formatting. The main challenge with a site like this is trying to make it easy to find something, but too many links were making every page more cluttered than it needed to be. So I got rid a lot of the links that cluttered the left column; in fact, I got rid of the left column altogether. Most navigation can be done via the menu-like links in the header of each page.

I have tidied up the Missing Menu Commands page and added a Spare Parts page that lists a few helpful iTunes AppleScript routines and handlers for script-makers. I'll continue to add to this page.

Finally, I dislike the way Amazon MP3s sometimes download with " (Album Version)" at the end of their titles. Here's a simple script, Remove (Album Version), that will delete that text from the selected tracks.

February 28 2009 - 9:28 am

NEW: Lyrics via LyricWiki

Lyrics Via LyricWiki will use the name and artist of the selected or playing track as the basis for a SOAP query to LyricWiki.org; fruitful results will be displayed so you can choose to apply the lyrics to the particular track.

If I had a dollar for all the Correspondents who sent me the AppleScript SOAP call used in this script, I could take a week off. Well, maybe take a long weekend. Information on LyricWiki's SOAP webservice is here.

February 27 2009 - 9:41 am

UPDATED: No Lyrics to Playlist v2.0

No Lyrics to Playlist has been updated to version 2.0. It will search a selected playlist for all tracks in the selected playlist that do not contain lyrics and copy them to a playlist it will create called "No Lyrics". Includes a second script to clear the "No Lyrics" playlist of tracks with lyrics.

This set of scripts was written by Herwin Lans and originally posted about four years ago. Because of changes in iTunes, it required updating and, particularly, the "Clear No Lyrics Playlist" script needed an over-haul.

February 27 2009 - 9:40 am

NEW: Purchase Date to Comments

Purchase Date to Comments will copy the purchased date--if available--of the selected tracks to the comment tag of each. You can choose either UTC format ("2008-12-27") or localized Short date format ("12/27/08"). UTC dates will be placed at the beginning of any existing comment text to allow tracks to be sorted by comment. Short dates will be placed after any existing comment text. (In either case, Smart Playlists could be created using "Comment contains 2008-12" or "Comment starts with 2008-12".)

January 2 2009 - 7:06 am

Library Follow-Up

After playing around with the "show-library-playlist" setting, it looks like you do have to set "hide-library-playlist" also. So, to show the "Library", run these two commands in Terminal one after the other (that is, press Return after entering each):

defaults write com.apple.iTunes show-library-playlist -bool TRUE
defaults write com.apple.iTunes hide-library-playlist -bool FALSE

To hide the Library again, run the same commands, but reverse the TRUE/FALSE values.

January 1 2009 - 1:59 pm

Show the iTunes Library Old School

I'm not certain if this has been mentioned anywhere--I haven't seen it--but I found the defaults command for displaying the entire iTunes library. Remember when you actually had a large playlist named "Library", before Apple split it up into--what I call--"Master" libraries of "Music", "Movies", "Podcasts", and so on? The "Library" listed everything in your iTunes library. Well, you can get that back using this command in Terminal:

defaults write com.apple.iTunes show-library-playlist -bool TRUE

Quit iTunes before entering the command. When you restart you'll have a new playlist named "Library" at the top of your Source list, above "Music".

If you want to remove the "Library" again, use this command in Terminal:

defaults write com.apple.iTunes show-library-playlist -bool FALSE

There is a second preference called "hide-library-playlist", which I at first thought would have to be set in tandem with the opposite of "show-library-playlist", but this doesn't seem necessary. In fact, you can set one or the other, apparently, and get the desired result; that is setting "show-library-playlist" to TRUE or setting "hide-library-playlist" to FALSE amounts to the same thing. Also, for AppleScript purposes, this playlist can be referenced as library playlist 1; it always could be, but now it is visible.

December 30 2008 - 2:40 pm

Artificial Skip Counts/Skip Dates

Recently, Mac OS X Hints ran a hint about overcoming iTunes' criteria for increasing a track's skipped count and skipped date via AppleScript. See, iTunes will only increase these properties if the track is advanced to another track during the first 2 to 20 seconds of play, and the hint tried to work around this so the skip properties could be increased anytime during play. Nothing personal, but I thought the OP at Mac OS X Hints kind of went overboard. This script on the Missing Menu Commands page will get the job done without a lot of fuss.

December 23 2008 - 1:26 pm

Native Half-Star Ratings

This hint at Mac OS X Hints describes a simple terminal defaults command that allows iTunes to accept half-star ratings by drag or inter-star-clicking.

December 12 2008 - 9:59 am

UPDATED: Add from eMusic Downloads Folder v1.1

Add from eMusic Downloads Folder v1.1 (like Add from Amazon MP3 Folder) will display the Album folders in your designated eMusic downloads folder so you can select which of them to add to iTunes. Optionally, if you allow iTunes to "Copy files to iTunes Music folder when adding to library", you can choose to move the original folder and files out of the eMusic download folder and to the Trash. Latest version runs as application to avoid a potential startup error.

December 12 2008 - 9:56 am

UPDATED: Add from Amazon MP3 Folder v1.1

Add from Amazon MP3 Folder v1.1 will display the Album folders in your designated "Amazon MP3" downloads folder so you can select which of them to add to iTunes. Optionally, if you allow iTunes to "Copy files to iTunes Music folder when adding to library", you can choose to move the original folder and files out of the "Amazon MP3" download folder and to the Trash. Saves a few keystrokes. This newest version runs as an application since the compiled version would often generate an error at startup.

Although the Amazon MP3 Downloader application has a preference to add downloaded purchases to iTunes, I could never get it to work.

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