I've recently become so embedded in the Salling Clicker/iTunes/AirTunes combination that I wanted to try to find an easy way to add comments (to serve as meta-data for smart playlists) to the current track that's playing in iTunes. In doing this, I modified the Salling Clicker "iTunes Remote.scpt" in the following way.
This mod allows me to add comments like "Mellow," "Dinner Music," etc. to the current track playing in iTunes, so that I can easily build better, more dynamic smart playlists. This is how I organize most of my playlists, and it's pretty clear the advantage of doing so. Now it's even easier to cram in more information on the fly.
I'm relatively bad at writing AppleScript (still), so suggestions are welcome. First, under the Salling Clicker preference pane, edit the iTunes Remote Script. You should, of course, make a backup before you start chaing things -- this should be a no-brainer!
else if keyCode is ("6" as Unicode text) then
set thisCommentAddition to "Mellow"
my addCommentData(thisCommentAddition)
else if keyCode is ("7" as Unicode text) then
set thisCommentAddition to "Dinner Music"
my addCommentData(thisCommentAddition)
else if keyCode is ("8" as Unicode text) then
set thisCommentAddition to "Joe Only"
my addCommentData(thisCommentAddition)
else if keyCode is ("9" as Unicode text) then
set thisCommentAddition to "Deb Only"
my addCommentData(thisCommentAddition)
else if keyCode is ("*" as Unicode text) then
set thisCommentAddition to "Re-rip"
my addCommentData(thisCommentAddition)
else if keyCode is ("#" as Unicode text) then
set thisCommentAddition to "Needs Artwork"
my addCommentData(thisCommentAddition)
else if keyCode is ("0" as Unicode text) then
set thisCommentAddition to "Relevant"
my addCommentData(thisCommentAddition)
on addCommentData(commentAddition)
tell application "iTunes"
set thisComment to comment of current track
if thisComment is equal to "" then
set thisDelimiter to ""
else
set thisDelimiter to ", "
end if
ignoring case, punctuation, hyphens and white space
if thisComment contains commentAddition then
tell application "SEC Helper"
show screen message my currentOSDTrackInfo() ¬
& return & "Already has " & commentAddition ¬
& " Tag, skipping track"
end tell
else
set thisComment to thisComment & thisDelimiter ¬
& commentAddition
set comment of current track to thisComment
tell application "SEC Helper"
show screen message my currentOSDTrackInfo() ¬
& return & "Added '" & commentAddition & "' Tag"
end tell
end if
end ignoring
end tell
end addCommentData
Mac OS X Hints
http://hints.macworld.com/article.php?story=2005091121172247