AppleScript
Dead Tracks a Problem for Genius?
There are one or two discussions going on at the Apple Discussions boards about users being unable to properly update Genius in iTunes 9, which apparently prevents Genius Mixes from kicking in. Or something. Some posters have gotten fruitful results after eliminating any dead tracks with Super Remove Dead Tracks.
Download and install the script. Turn Genius off. Run the script. Turn Genius back on.
Smart Playlists Are Not 'Scriptable
Getting an avalanche of email informing me that Smart Playlists in iTunes 9 can use boolean-like operators when defining criteria. While that's great and all, Smart Playlists cannot be constructed with AppleScript so it has zero impact on scripting.
UPDATED: Save Album Art to Album Folder v2.0
Save Album Art to Album Folder v2.0 is a collection of two scripts that will assist with exporting Album artwork to a track's parent folder, presumably the track's "Album" folder.
- "Save Album Art to Album Folder" will export the artwork of the selected tracks or tracks in the selected playlist as a graphics file to the folder which contains each selected track's file--or a specific user-selected folder.
- "Save Track Art to Album Folder" exports the artwork of the single selected track to its parent folder, replacing any previous version.
Read Me explains much more, including modifications you can easily make.
Universal binary for OS 10.5 and better only.
This latest version updates syntax for compatibility with Snow Leopard, streamlines some code, provides new bundled progress indicator app.
Target QuickTime Player by application id
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:
tell application id "com.apple.quicktimeplayer" -- do something in QuickTime Player end tell![]()
...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.
UPDATED: Lyrics via LyricWiki v2.1
Lyrics Via LyricWiki v2.1 addresses some changes in LyricWiki page formatting.
Updated a Handful
Nothing to do with Snow Leopard--what a relief, eh? I've updated seven scripts today:
- Assimilate View Options
- Batch-Delete Playlists
- Block Party!
- Compare Two Playlists
- Export Smart Playlist Criteria
- Move Playlists to Folder
- Selected Playlists To iPod
These seem to be the most popular scripts that are affected by the "none/all" issue introduced in iTunes 8.2. There may be a few others, but I haven't gotten email feedback on those nor have I run across a problem with any other scripts I use regularly. But if you ever get a error like this:
...then let me know.
Snow Leopard's QuickTime Player Duality
Speaking of Optional Installs, to get the AppleScript goodness of QuickTime Player you may have been used to, QuickTime Player 7 will need to be installed from Snow Leopard's Optional Installs. QuickTime Player 10.0 is the default install in /Applications/, but its AppleScript innards are radically different (some would say severely lacking) from previous versions. So for legacy purposes, you'll need QTP7. If you currently have QuickTime Pro, QTP7 is installed automatically in /Applications/Utilities/. Otherwise, it's an optional install.
(Apple)Script Editor in Snow Leopard
I know I'm going to be repeating this a lot: as of Mac OS 10.6 the Script Editor application has been renamed AppleScript Editor and has been relocated from the /Applications/AppleScript/ to the /Applications/Utilities/ folder.
Also, Rosetta, which allows PowerPC-compiled applications and AppleScripts to run on Intel Macs, is an optional install. Most AppleScripts on this site are either Intel-compiled or Universal Binary, but some older scripts may not run without Rosetta (especially if you had downloaded older versions of them or those that I never got around to updating as Universal Binary). So when performing your installation of Snow Leopard it's probably a good idea to include Rosetta.
UPDATED: Music Folder Files Not Added, v1.1
Music Folder Files Not Added is an application that will list the file paths of the files in your designated "iTunes Music" folder which are not in iTunes' library. Additionally, you can select a different parent folder and its contents will be compared to the iTunes library. Includes options to Add a selection of found files to iTunes or move them to the Trash.
This latest version fixes a problem with file paths containing single-quote characters.



