Rate songs in iTunes via an AppleScript

Oct 09, '06 07:30:01AM

Contributed by: Anonymous

I think song rating feature of iTunes is underrated and underused feature, because rating is a long task to do, and above all, it changes over time as your feelings can evolve. So I came up with this idea of having a process that would automatically rate songs as you listen to them.

First I don't know if you listen to music as I do, which is I put iTunes in random mode and if it plays a song I don't really want to hear at that time, I skip to the next one. And of course if I like a song, I listen carefully until its end and I wait for the next one and so on. So a while ago, I wrote a little AppleScript that watches to see if a song is skipped or "fully played." If the song is skipped, then the script will decrease its rating. If the song is played in full, then increase its rating.

Since the iTunes 7 release, I realized that I'm definitely not the only one who skips songs, as there is a counter for the number of times a song has been skipped. So that's why I decided to share this hint. But the cool thing with my hint is it definitely works with previous versions of iTunes 7, because it just uses the "number of plays" counter.

Here's the AppleScript. You need to paste it into the AppleScript Editor, and save it into user's Library -> iTunes -> Scripts folder. The script name will appear in the Script menu of iTunes. You just need to open it from iTunes, and the automatic rating will start to work.

[robg adds: I haven't tested this one.]

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060930104137758