Script to choose song with Salling Clicker

Hi!
I’m actually trying to write this for use in Salling Clicker. Basically, I want my actionscript to play a specific song in my iTunes Library. I got this applescript from Salling’s scripts; it’s for playing a random track:

tell application “iTunes”
try
set this_track to some track of (first library playlist of first source)
set the_name to name of this_track
set this_artist to artist of this_track
tell application “SEC Helper”
show screen message (the_name & " - " & this_artist) icon play
end tell
play this_track
on error
beep
end try
return
end tell

I figured that somehow I could modify this to play a specfic song, lets say its called The Song by Alok… how would I mod this to do what I want it to do?

Try this:

tell application “iTunes”
play track “The Song by Alok” in library playlist 1
end tell

It will play the track if it’s in your “master” song library.

  • jonas

You’re awesome!
Thanks!