Tips and Info
Recently, I was watching a DVR of a football game I had made with EyeTV. In general, I prefer to skip the parts that aren't showing football players playing football. So, while watching the game on iTunes I used the script Skip Back or Ahead to jump ahead 120 seconds when necessary.
The thing about that script is that I didn't exactly streamline the workflow. Here are the steps required to skip ahead 120 seconds:
- Click the iTunes Scripts menu, scroll, and click the script's name to launch the script
- Enter the number of seconds in the dialog that appears--in this case the three digits "1-2-0"
- Click the "Ahead" button to dismiss the dialog
...and then the playing iTunes track, my football game, advances two minutes. But although it looks like just three quick steps it seems to take about a half an hour to perform. OK, not a half an hour. But it does seem kinda clunky to have to do a lot of mousing and key pressing just to perform a simple task like skipping ahead.
Here's what you can do to streamline the script at your house.
You probably know that you can use iTunes' Print command to create CD box labels and stuff, which I'm guessing not many people need much any more. You can also print a list of all your Albums, sorted by Artist. Big whoop? Well, instead of printing it to paper, use the PDF Service in PDF Adder to add the listing as a PDF to iTunes' Books library. It syncs to the iBooks app on your iPhone or iPad, too, so you can keep a portable list of all your albums with you. Update it once a month or so. Mine came to thirty-two pages! (Gotta work on my iPhone Cross-Country-Ski-Fingers Speed Scroll technique.)
I frequently get asked if there is an easy way to move an iTunes library (files, playlists, ratings, and all) from a Windows machine to a Mac. My friend Kirk McElhearn has written it all down in this how-to at Macworld.
It's not the size of your "iTunes Media" files that best describes how big your media file collection is. Often, querying Correspondents will report that their iTunes Media folder is so many GBs (or so many days-worth). But if that total includes a lot of video then the number of files is smaller than the same-sized folder containing just 128kbps audio files (eg: my "Star Trek" with Extras at 6GB+ is a little smaller than my "Compilations" folder which contains over a thousand files). Very few of my scripts and apps directly work on the files in the iTunes Media folder anyway, so in many cases its size is irrelevant; scripts work with tracks in iTunes, so the number of tracks is more important than the size of their files. A better relative measurement for comparison purposes is the size of your "iTunes Music Library.xml" file (located in ~/Music/iTunes). It has an entry for each track in your library and all (well, most) playlists. Therefore, the more tracks and playlists you have the larger the XML file will be.
I've gotten several emails lately inquiring about scripts and apps that can assist with gathering up far-flung files from old music folders. It's the sort of thing that happens when you move to a new computer, upgrade iTunes, and add hard drives without doing the requisite housekeeping at the time (or on a regular basis). This is fairly typical:
Throughout the last 4-5 years, Iʻve ended up with an enormous bunch of music which is all on one of my hard drives, and Iʻd like to consolidate all of it, get rid of the dupes, junk/damaged recordings, etc. For instance, some of the data are backups of my old iTunes libraries that I created before upgrading to newer versions. I like the way the script addToLib works. but Iʻm looking for a way that I can accomplish the same thing without moving the music from each album folder, and then Trashing each folder individually.
I've been recommending using Music Folder Files Not Added which allows you to scan a folder any number of folders deep for files not in the iTunes database and optionally add them. Of course, you may still want to Trash the folder once the files are addedand this presumes you have "Keep iTunes Media folder organized" setbut you'll only have to move the single parent folder to the Trash and not dozens of sub-folders. And if duplicates are a problem, there's always Dupin, right?. Yes, still some work involved (after all, it took a long time for you to make that mess!) but operating on one set of parent folders at a time will make the process easier.
Rob Griffiths points out that in iTunes 9, as you are selecting or de-selecting tracks in any playlist or library, the size and time in the status display along the bottom of the iTunes browser window increases or decreases respectively. Neat!
As you may know: to run AppleScripts that were compiled on a PowerPC machine on Intel machines (and therefore Snow Leopard) requires Rosettaan optional install on your SL install disc. While Rosetta is a fairly small install, some people have expressed an interest in staying Rosetta-free. There are quite a few of these types of AppleScripts here on the site and I'm working on updating them to Universal Binary (although a good percentage of these in the Retro Scripts category probably won't be updated by virtue of being obsolete). Long-time visitors may also have some of these scripts in their collections.
While you could wait for me to update these kinds of scripts to UBdisclosure: one of these days I will get around to admitting that I am a notorious procrastinatoryou can update these scripts yourself by doing what I would do: open the script in AppleScript Editor, noting whether it is a compiled Script (.scpt) or an Application (.app), and re-save it. It will be re-compiled for your machine type, and if it is an Intel machine, will run without Rosetta. The "Run Only" and "Startup Screen" checkboxes can be left unchecked. Script Applications that use idle handlers need to be checked "Stay Open".
During the Save, if AppleScript Editor informs you that the "Document Format is Read Only: This script application is in a format that is no longer supported...", the case for non-bundled applications compiled pre-SL, just click the "Save As" button, and proceed with the save. In Snow Leopard, single-file-type apps are no longer supported. The defacto Application type is a bundle.
The AppleScript Release Note: 10.6 Changes page at Apple has more on this.
You may have been (prematurely) lamenting the inability to drag tracks from the iTunes Store to a playlist on your machine for later purchase because of the new format. Well, just put the store in Browse mode (Command-B). Tracks will be available the old-fashioned way, more or less:
When you're playing an iTunes LP the Command-L shortcut to reveal/select the track in iTunes doesn't work. Unless.
Place the iTunes LP "booklet" in its own playlist (select it and press Shift-Command-N) and open that playlist in its own window by double-clicking the name of the playlist (or choose "Open in New Window" by Control-clicking the playlist name). Double-click the booklet to open the iTunes LP in the playlist window just opened. Now you have access to the main iTunes browser while the iTunes LP stuff is playing in the separate window.
This script will emulate the Command-L shortcut providing the iTunes LP is in a separate window:
If you've got a script that needs to target QuickTime Player in Snow Leopard you probably really want to target "QuickTime Player 7". Otherwise, if you target "QuickTime Player" the QuickTime Player X app will run and it doesn't have the AppleScript Goodness like QTP7. However, if the script also has to run in Leopard, you have to target "QuickTime Player"--without the "7". But you don't need to write two scripts.
In OS 10.5 and later you can target an app by its application id. I remember seeing that in the AppleScript Release Notes for 10.5 thinking "Hmm. Now how can I use that" and never really thought of anything. Until I needed to access QTP in both 10.5 and 10.6.
This tell block:
...will target "QuickTime Player" in OS 10.5 and "QuickTime Player 7" in OS 10.6. The application id is the same for each, so it makes no difference what their names are. And the AppleScript architecture is virtually the same in both operating systems. (Remember that "QuickTime Player 7" is an optional install either during installation or from the "Optional Installs" folder on your installation disc.)
"QuickTime Player X" is a drastically different version of the player app and scripts written for QTP7 will not play well with it. However, it is scriptable to a modest extent. Its application id is "com.apple.QuickTimePlayerX" in case you need to target QTPX specifically.