I thought it'd be great to shop for new music on the iTunes Music Store (iTMS) while working. If I hear a song I like, I can switch over to iTunes and add the song to my cart. But, to my surprise the iTMS greys out the repeat/shuffle icons, effectively limiting you to playing only one sample at a time.
I found that by using the OS's idle handler, one can effectivley tell iTunes to "play the next track" from a list -- as long as it's before the currently-playing sample has finished. The script itself is stupid easy, but there is a catch to making it work, so keep your eyes peeled.
First, open Applications: AppleScript: Script Editor, and paste the following into it:
on idle
tell application "iTunes"
next track
end tell
return 29
end idle
I'm not a programmer, so feel free to correct my assertion here: Using the idle handler in this manner allows the AppleScript to release hold of its CPU cycles until the command is explicitly called (every 29 seconds in this case, so as not to let the sample reach its end). So, it's not like having this script running constantly adversely affects system performance.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050217131021778