As it happens, the silly little iTunes alarm thing is an application my wife wanted - she was interested in having iTunes play music in the morning. I'm sure there are other solutions to that problem around, but it was simple enough to do. First, I created this UI:

That serves as a way to specify settings for an AppleScript that gets generated and executed at the appropriate time. Here's what that looks like:
#!/usr/bin/osascript
tell application "System Events" to set volume without output muted
set volume 2
tell application "iTunes"
activate
play playlist "casts"
end tell
I had to do some googling to figure out how to unmute and set the volume, but that's it - works nicely. If you're curious, the Smalltalk code that does this is in the public Store - ITunesAlarmClock.
Technorati Tags:
iTunes, applescript