An AppleScript to help with 'last played' in iTunes
Jun 26, '06 07:30:03AM
Contributed by: Anonymous
I like iTunes, since it gives you the chance to listen to your songs in almost every way. I rated all my songs, and I like to play 5-star songs more often, 4-star songs less often, and I like to listen to songs which are the least recently played ones. But what if you want to listen to all 5-star songs which are not played already today?
Party shuffle goes into the picture here:
- Create a smart playlist with the following parameters: 'My rating' 'is' 5-star and 'Last played' 'is not in the last' 1 'days'
- Set the 'Display n upcoming songs' to 0.
- Set the Party shuffle to this playlist.
But there seem to be a slight problem with the handling of the "Last played" field in iTunes: It is set after iTunes chooses the next song, so you might have duplicates! This is very annoying, so I figured out a little AppleScript to handle this. Run it alongside with iTunes. It sets the last played field 10 seconds before the end of the song. Note that it has slight limitations, which might be fixed by others:
- It assumes that you don't fast forward in the songs (rewind is allowed, though). If you often do this, then replace the delay time_to_enter with delay my min_delay. (you even eliminate the if from there). I did not do this, since the original version eats less CPU power.
- When you start this script, iTunes has to be running.
I hope this helps!
Comments (3)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060622161827548