dougscripts.com

Archive: March 2007

march 26 '07 - 3:29 pm
UPDATED: CDDB Safari Kit v2.3.3

CDDB Safari Kit had to be updated because Gracenote mooked with their template. These two AppleScripts, "CDDB Safari" and "CDDB Tracks to iTunes via Safari", assist in finding and retrieving Album track information, Album, Artist, and Year from Gracenote's CDDB website using Apple's Safari browser.

march 23 '07 - 1:15 pm
Save Imported CDs to New Location

This hint at Mac OS X Hints points out that holding down the Option key while loading a CD (if "On CD Insert" is set to "Import CD" or "Import CD and Eject") or when clicking the "Import CD" button will allow you to choose a destination to save the ripped CD tracks to other than your default iTunes Music folder (set in Preferences > Advanced > General). Even if you have "Copy files to iTunes Music folder when adding to library" checked iTunes will ignore that setting and "know" that the imported tracks' files are in your selected location. Could be handy!

march 23 '07 - 10:45 am
Apple TV Works With CRTs

Paul Kafasis, big amoeba at Rogue Amoeba, has posted a great overview of Apple TV. My favorite observation is Surprise #2: The AppleTV doesn't require a "Widescreen TV" or an HDTV. I have a wonderful Toshiba 32" CRT that already loves PS2 and which I'm sure would make room in its heart for an Apple TV.

march 23 '07 - 9:52 am
NEW: Scour Web Page for Media v0.5

Scour Web Page for Media will examine the current web page in Safari for your choice of media files, such as those on a MP3 blog (currently mp3, aac, and pdf files are supported), and allow you to select any found files to download and then add them to iTunes. Options include selecting download location, adding to a particular iTunes playlist, and the ability to delete the original files after adding to iTunes.

march 21 '07 - 11:57 am
UPDATED: Current Track to Twitter v1.5

Whew! Quick update to Current Track to Twitter, which was NEW this morning (see previous entry). Rather than have you hard code the script, you can now create a new password in your Keychain with your Twitter account info, thus keeping it secure. You'll have to set up a new password with the Keychain Access app and instructions are included in the script's Read Me. Much obliged to Coda Hale's original script for QuickSilver which provided some routines.

march 21 '07 - 10:21 am
NEW: Current Track to Twitter v1.0

If you're a Twitter user, Current Track to Twitter is a stay-open applet that continuously monitors iTunes and when a new song starts playing will post info about that song to your Twitter account, including song name, artist, album, and rating stars. Geeky!

march 20 '07 - 8:45 am
UPDATED: Super Remove Dead Tracks v1.5.1

I've updated the venerable Super Remove Dead Tracks (one of the oldest scripts on the site) which surveys iTunes for tracks whose files are no longer available (as indicated by a "!" next to their names) and removes them. I noticed some dialog box text problems so I fixed them and made some tweaks to the code. Nothing new added, just made more Super.

march 19 '07 - 4:37 pm
My Web Host Wants You To Know...

As part of our ongoing efforts to improve our hosting platform, we will be performing scheduled quarterly server maintenance between 12:00am midnight and 8:00am EDT on Sunday, March 25, 2007. During this time, your Web site may be inaccessible.

So don't expect mission-critical iTunes AppleScripts to be available this coming Sunday (or whenever; EDT is -4 from GMT currently). I will be asleep when this is going on. Please shut off the lights when you're done.

march 19 '07 - 3:19 pm
Apple's AppleScripts for iTunes Found

I had mentioned earlier that Apple's AppleScripts for iTunes page had been re-posted with no links to the original iTunes scripts. But the original has been resuscitated on this page, which includes a download link for the original iTunes AppleScripts from Apple.

march 19 '07 - 7:36 am
UPDATED: Tracks Without Artwork to Playlist v2.2

Tracks Without Artwork to Playlist will survey the selected tracks or the selected Playlist for tracks without any artwork and quickly copy them to a new discrete Playlist. This latest version corrects for some rare "false positives".

march 16 '07 - 6:32 pm
Re-map Command-F to Activate Search

Rob Griffiths has posted a neat tip at his Mac OS X Hints Weblog at Macworld that describes how to Search local iTunes via Command-F. It explains how to assign Command-F to activate the iTunes search box rather than activating Full Screen View, and re-assign a new key combo for Full Screen View.

march 16 '07 - 6:02 pm
That Was Fast! iTunes 7.1.1 Released

I'll bet some people didn't even know iTunes 7.1 was out, and now Apple has released iTunes 7.1.1. According to the info, "iTunes 7.1.1 addresses a stability issue and minor compatibility problems in iTunes 7.1."

march 15 '07 - 9:58 am
Apple's AppleScripts for iTunes Kaput

I just noticed today that Apple is no longer making their iTunes AppleScripts collection available, which used to be downloadable from this page (I believe they were written by Sal Himself). Instead they recommend visiting here or Script Builders at Macscripter.net. Just so, many of the scripts in that collection were getting old and in the way. No clue if they'll update them.

march 15 '07 - 9:45 am
UPDATED: Export Selected Tracks to XML v1.2

Another update to a script that needs to locate the current XML file: Export Selected Tracks to XML will create an importable XML file using the data from the selected tracks, similar to the iTunes "Export Song List..." as XML menu command except that just the selected tracks' data are exported. Later, you can reimport the files using the iTunes "Import..." command in the File menu.

march 14 '07 - 3:24 pm
UPDATED: Export Smart Playlist Criteria v1.2

Another couple of scripts that need to reference the XML file: Export Smart Playlist Criteria is a collection of two scripts, "Export Smart Playlist Criteria" and "Export Selected Smart Playlist Criteria", each export just the criteria of the selected Smart Playlist(s) to an XML file. This file can then be imported to any iTunes using the "Import" command in the File menu. Handy for backing up Smart Playlist criteria or for sharing your Smart Playlists' criteria with other users. The latest version of each script is able to locate the XML file of a loaded multiple library.

march 14 '07 - 3:22 pm
UPDATED: Assimilate View Options v1.2

The script Assimilate View Options has been updated since one of its routines attempted to display the entire library playlist and this is no longer possible in iTunes 7.1. The script re-creates your playlists, excepting Smart Playlists and "special" playlists (Purchased, Podcasts, Party Shuffle, Audibooks, TV Shows, and Movies), then deletes the old ones so all of the View Options are the same as the main Music library (taking advantage of the fact that new playlists acquire the Music library's View Options).

march 11 '07 - 4:29 pm
Sort iTunes 7.1 by Release Date

iTunes 7.1 adds a "Release Date" sorting field, which I hadn't noticed until this morning. Tracks that come down from the iTunes store, including podcasts and videos, seem to use it. Unfortunately, it is not accessible by AppleScript or any manual-inputting means that I can determine.

march 9 '07 - 10:55 am
Make The Loser Sing!!!

We love it at my house when someone gets booted from (the-campy-and-we-oh-so-love-to-hate) American Idol and then they have to sing. Make The Loser Sing! Sing, Loser! Sing!

march 8 '07 - 7:45 am
More About PDFs

In my post yesterday, I suggested using "PDF Adder" to add PDFs to your iTunes. Duh. I neglected to mention that also in the PDF Adder collection is a PDF Service Workflow called "Add to iTunes...". When installed in your [username]/Library/PDF Services folder it appears as an option under the "PDF" drop-down in any app that supports a Print dialog. So, find a page in Safari, hit "Print" and select "Add to iTunes...". It will ask for a name, artist, and album for the PDF and then add it to iTunes.

march 7 '07 - 4:15 pm
30th HS Reunion

It suddenly dawned on me that it's 2007. I notice years that end with a 7 because I graduated High School in 1977. Like 1939 was great for movies, 1977 was great for rock music. And that was 30 years ago!? BTW: do not invite me to the reunion.

march 7 '07 - 12:27 pm
PDF Booklet via Safari

I've been messing with Wikipedia to get info for various artists (see Search Wikipedia). But I wanted to be able to save the info, perhaps even including it in iTunes for future reference. Can do. Today I tried this trick: use Safari to go to the Wikipedia page containing info on your favorite artist. Click "Print" in Safari's File menu and then click "Save as PDF" in the PDF drop-down. Optionally, hit the "Preview" button in the Print dialog to see what the PDF will eventually look like after it's saved and then save it as a PDF.

Once the PDF has been saved, use PDF Adder to add it to iTunes. The "PDF Adder" script in that collection will let you choose an existing PDF file and add it to iTunes and provide Album and Artist tags to the new PDF so that it will be sorted with the associated Album. If your iTunes Advanced>General Preferences is set to "Copy files to iTunes Music folder when adding to library" the PDF will be copied to your iTunes Music Library folder, and the original PDF can be Trashed.



As far as Wikipedia goes, it appears they use a "print.css" file that fomats the page for printing. This maintains formatting while eliminating the sidebars and such. Other sites may do so as well--like the one you're looking at now ;).

march 7 '07 - 10:46 am
How To Write Your First AppleScript

Perceval McElhearn has posted How To Write Your First AppleScript at Macinstruct. It's a nice intro for those of you who want to get started. BTW: Perceval is the descendant of my good friend and Mac aficionado Kirk McElhearn. The nut don't fall far from the tree.

march 7 '07 - 7:04 am
Show Entire Library Workaround

For those of you iTunes 7.1 users who are dismayed by the inability to display the entire library (as noted in this post) here's a workaround. Create a Smart Playlist whose only criteria is "Size is greater than 0" and click on Live updating. Name this new SP something obvious like "Everything" or "Full Library" or what have you. Then create a script like this, substituting the name of your SP where appropriate:

tell application "iTunes"
	set view of front browser window to playlist "Everything"
end tell

Save it to your iTunes Scripts folder and give it a shortcut so you can easily display the SP when necessary. Thanks to Correspondent George Dick for the idea.

march 6 '07 - 4:06 pm
VoiceOver Accessible

From the comments at Chris Breen's What's new in iTunes 7.1 at Playlist:

One feature that undoubtedly escape[d] most peoples['] notice is [the] fact that iTunes is now accessible with VoiceOver. This is a major step forward for sight impaired individuals. In the past VoiceOver could not access anything within iTunes. Now virtually everything in iTunes can be navigated and controlled with VoiceOver....Kudos go to Apple for getting iTunes accessible.

march 6 '07 - 2:22 pm
No More View library playlist 1

Correspondent George Dick reports--and I have verified--that you can no longer display library playlist 1, that is, the entire iTunes library, with a script such as this:

tell application "iTunes"
	set view of front browser window to library playlist 1
end tell

Bummer.

march 6 '07 - 8:45 am
NEW: Selected Tracks Played or Unplayed

Another new AppleScript track property in iTunes 7.1 is unplayed. This item does not appear in the GUI (not even in Smart Playlist criteria!?) but is accessible in the XML file, so I suspect this is something AppleTV may want to know about. In any case, you can set a selection of tracks as unplayed or played by setting the unplayed property to true or false, respectively. And that's what Selected Tracks Played or Unplayed does for a selection of tracks. Need I add for iTunes 7.1 or better only?

UPDATE: it appears the unplayed property may be specific to podcasts. However, the script will work with any track.

MORE UPDATE: do my TV Shows now have a blue dot on the far left indicating their played status?

march 6 '07 - 7:40 am
NEW: Batch Set Tracks Sorting Tags

I don't know who doped my corn flakes yesterday, but after iTunes 7.1 came out I'd swear the dictionary didn't show the new sorting tags. Well, things have gotten back to normal here and I've got Batch Set Tracks Sorting Tags for you. This script will allow you to batch-set the new sorting tags ("Sort Name", "Sort Artist", "Sort Album Artist", "Sort Album", "Sort Composer", "Sort Show") of the selected tracks, rather than manually doing so one track at a time.

march 5 '07 - 6:13 pm
Apply Sort Field

iTunes 7.1 adds a "Apply Sort Field" submenu in the track contextual menu (Control-click a track). What's that about?

march 5 '07 - 4:51 pm
iTunes 7.1 Released

Apple has released iTunes 7.1, available from your Software Update or as a stand-alone installer from the iTunes download page. This is a major update (7.0.2 to 7.1) which probably accommodates Apple TV; we shall see if any AppleScript enhancements ensue. More to come...

march 5 '07 - 7:40 am
UPDATED: Join Together v5.1.1

Join Together has been updated to version 5.1.1. This AppleScript Studio application will enable you to join the files of selected iTunes tracks together with QuickTime and export them as a single AAC file/track. Optionally, with Apple's ChapterTool application installed, you can then create a "chapterized" audio file of the exported AAC file with pointers to the individually joined tracks.

This is a minor fix release that fixes an error that occurred at startup when attempting to generate a Genre names list from the XML file of a loaded multiple library ("Can?t get items 1 thru -2 of {??}. (-1728)") and prohibits auto-selection of every track in the "Music" or "Audiobooks" playlist when no specific tracks have been selected.

march 4 '07 - 6:06 pm
More About Multiple Libraries

As I pointed out in the post about updating Tracks Without Artwork to Playlist, when using a loaded multiple library the current iTunes Music Library.XML file will be the one associated with the loaded library and not necessarily the XML file located in ~/Music/iTunes/. Several scripts which need to access the current library's XML file do not account for this--just one of those things I neglected to think about when iTunes 7 introduced the multiple libraries feature. I will be updating those scripts in the coming days.

march 4 '07 - 5:46 pm
UPDATED: Tracks Without Artwork to Playlist v2.1

I was wondering why some people were still getting false positives when using Tracks Without Artwork to Playlist. Then it dawned on me that if a multiple library was loaded, the wrong iTunes Music Library.XML file was being checked! This new version corrects that problem.

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