Apr 20, '07 07:30:00AM • Contributed by: itrebax
tell application "iTunes"
if not (exists playlist "Queue") then
set queuePlaylist to (make new user playlist ¬
with properties {name:"Queue", shuffle:false})
else
set queuePlaylist to playlist "Queue"
end if
if current playlist is not queuePlaylist then
set curtrack to (duplicate current track to queuePlaylist)
else
set curtrack to {}
end if
if selection is not {} then
set sel to a reference to selection
duplicate sel to queuePlaylist
end if
if curtrack is not {} then
set playPosition to player position
play curtrack
set player position to playPosition
end if
end tell
This helps out a lot when I forget to make a playlist. If the playlist is already being used, then the script just adds the selected track to the end of the queue playlist. I have this script assigned to a Quicksilver trigger and it works great, but there is a small skip in the audio when the currently playing track is resumed in the playlist.
