iTunes: name of playing tune, artist, album to file?

I’ve been listening to a LOT of netradio lately on iTunes, and liking the music I hear. I’m writing down the names of the music and the artists on a piece of paper. But this requires that I have iTunes open, and look at its info display.

Is there a way to cause iTunes to append this info to a file?

I’d like to press a button or hit a key-combination when I hear something I like, and have iTunes tell some program or script the information, and the script would log it to a text-based logfile: plain text or CSV or XML. If iTunes could already do this, and just needed a signal, even better.

Can I do this on the Mac? Does it need Automator? AppleScript?

Man, it must have been ten years since I messed with AppleScript.

Anyhoo, I whipped up a simple Applescript app that will log the current track’s artist, album and song name to a file on your desktop called iTunes Log.txt.

Just put it in your dock, and whenever something interesting is playing, click it, and it will append a line to the log file.

Oops. I only tested that when playing stuff in my iTunes library; it looks like getting the track information for a streaming song is not as easy and my AppleScript doesn’t really work for that. Maybe I’ll have some time tomorrow to mess with it some more.

Thanks, friedo! I played around with Automator after making the OP and had no success, so clearly more research is needed.

I’m listening to Space Station Soma right now on iTunes, and I tried your script. The output was "list

Thanks, friedo! I played around with Automator after making the OP and had no success, so clearly more research is needed.

I’m listening to Space Station Soma right now on iTunes, and I tried your script. The output was…

Hmm. Shows up in a text file, but this window won’t accept it. Interesting.