Somebody on digg mentioned AppleScripting iTunes on the Mac, but it seems to be less well known that you can write Javascripts or VBScripts for iTunes for Windows.
So, here’s a bunch of scripts I’ve written for various tasks:
- Creates a playlist of all the songs in the library with no artwork: http://ottodestruct.com/itunes/NoArtPlaylist.txt
- Creates a playlist of all the songs in the library with no lyrics: http://ottodestruct.com/itunes/NoLyricsPlaylist.txt
- Creates a playlist of all the songs in the library of which you only have one of them by that artist (one hit wonders): http://ottodestruct.com/itunes/onehitwonders.txt
- Imports lyrics from EvilLyrics’ into iTunes: http://ottodestruct.com/itunes/EvilLyricsImport.txt
- Removes all lyrics from all songs in your library: http://ottodestruct.com/itunes/ClearLyrics.txt
- Reload/update all songs in the library from the file tags (useful if you use another tagging program to make changes to tags): http://ottodestruct.com/itunes/update.txt
- Finds dead tracks in your library and makes a list of them: http://ottodestruct.com/itunes/FindDeadTracks.txt
- Removes dead tracks from your library (this one was actually written by Apple originally, I’m just including it for completeness): http://ottodestruct.com/itunes/RemoveDeadTracks.txt
I’ve written more, but these are the most general purpose ones.
To use any of them, just download them, rename them to a *.js file, then run them like any other program (double click, select and press enter, type the name from a command prompt, etc). If you have all the defaults in XP or have the Windows Scripting Host installed on other Windows boxes, then the wscript.exe program actually runs the scripts, much like cmd.exe runs batch files. Same idea, anyway. The scripts connect to iTunes as a COM object and use it in that fashion. Works really well and is quite handy for scripting tasks in iTunes. Yeah, it doesn’t actually integrate or anything, but it’s still useful.