Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

trainguy77

macrumors 68040
Original poster
Nov 13, 2003
3,567
1
Code:
tell application "iTunes"
	if selection is not {} then
		my addNextSong(item 1 of selection)
	end if
end tell

on addNextSong(trackID)
	tell application "iTunes"
		set thePlaylist to playlist "Party Shuffle"
		
		duplicate trackID to thePlaylist
	end tell
	
end addNextSong

I found this, but i need to make it so it adds the whole selection not just one song. How would i do that?
 

xUKHCx

Administrator emeritus
Jan 15, 2006
12,583
9
The Kop
this work for you (?)
Code:
tell application "iTunes"
	if selection is not {} then
		my addNextSong(selection)
	end if
end tell

on addNextSong(selection)
	repeat with every_item in selection
		tell application "iTunes"
			set thePlaylist to playlist "test"
			duplicate every_item to thePlaylist
		end tell
	end repeat
end addNextSong
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.