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


Click here to return to the 'Queue songs into iTunes' Party Shuffle from the Library' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Queue songs into iTunes' Party Shuffle from the Library
Authored by: DougAdams on Aug 31, '04 04:26:38PM
For what it's worth: here is an AppleScript routine sent to me from our friend J Nicholas Jitkoff of Blacktree, Inc that will send a track reference as the next to play in Party Shuffle.
tell application "iTunes"
	if selection is not {} then
		my ps_play_next_ref(item 1 of selection)
	end if
end tell

-- Append Ref to Party Shuffle after current song
on ps_play_next_ref(theTrackReference)
	tell application "iTunes"
		set thePlaylist to playlist "Party Shuffle"
		try
			play thePlaylist
			set isPlaying to container of current track is thePlaylist
			if (isPlaying) then set startIndex to index of current track
		on error
			set isPlaying to false
			set startIndex to 0
		end try
		tell thePlaylist
			set oldTracks to a reference to (every track whose ¬
				index > startIndex and ¬
				index is less than or equal to (count tracks))
			duplicate theTrackReference to thePlaylist
			duplicate oldTracks
			delete oldTracks
		end tell
	end tell
end ps_play_next_ref
In this snippet I've sent it a ref to the selected track. It ain't glamorous, but it woiks.

[ Reply to This | # ]