It's an iTunes AppleScript to process newly-imported music videos. Among other things, it: marks the track as being a "Music Video"; sets the "Comments" field to the resolution in pixels of the video; sets the "Volume Adjustment" based on the video's overall audio volume; copies the year, genre, rating, and capitalization from older versions of this same track; and adds this new track to all of the playlists of an old track that it appears to be intended to replace.
It's pretty hairy, and it's a really good reason to hate AppleScript. I'd appreciate code critiques from anyone who thinks they actually understand this bagbiting language.
PS: If anyone can tell me how to add a track to a playlist at a particular position, e.g., "add track B after track A in playlist X", that would be swell.