Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add comments to iTunes tracks via Salling Clicker Apps
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!

  1. You'll need to modify the large else if statement under the block associated with the ratings (in the key_was_depressed function). My additions happened to look like:
    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)
  2. You'll need to add the addCommentData function to the end of the script file:
    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
    
  3. If you want to have keys like 0, *, and # work, then you'll need to disable their default functions in the key_was_depressed and/or get_keymap functions where appropriate.
I think that's all ... I hope I didn't forget anything. Good luck.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[7,448 views]  

Add comments to iTunes tracks via Salling Clicker | 2 comments | Create New Account
Click here to return to the 'Add comments to iTunes tracks via Salling Clicker' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add comments to iTunes tracks via Salling Clicker
Authored by: loren_ryter on Sep 14, '05 10:48:40AM

Modifying the Salling default iTunes Remote script is not a terribly basic thing to do--but I trust you it works. The recommended way to add additions, I think, would be to write another script and make it a menu command that can be linked to iTunes Remote via a script ID.

There is a good user forum for salling, btw:

http://206.169.164.153/salling/forums/

also, note, Salling Clicker 3 is due out shortly.



[ Reply to This | # ]
Add comments to iTunes tracks via Salling Clicker
Authored by: Krioni on Sep 15, '05 05:21:04PM
I don't know a lot about Salling Clicker (don't have a compatible phone), but there may be some way to interface in a longer list of tags. I wrote an application that allows you to add tags to songs - maybe it could be linked as a Salling Clicker add-on? Check out TuneTags for more info.

[ Reply to This | # ]