I think I would be able to do this by modifying iTunes' launch services. Any idea how to go about that?
Would editing its info.plist file in a manner similar to below do what I'm looking for?
<key>LSOpenApplication</key>
<string>?</string>
EDIT: Would http://developer.apple.com/library/mac/#documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html%23//apple_ref/c/func/LSOpenApplication provide any hints?
EDIT2: Last.fm's official Mac Scrobbler (http://www.last.fm/download) is a perfect example of the functionality that I'm looking for.