Scripters Tip - Selected with Shuffle Off

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR
Joined
Jul 1, 2003
Messages
705
Points
0
Location
Providence, RI, USA
Website
dougscripts.com
Here's something I hadn't realized: if you are using selection, check beforehand to make sure shuffle of view of front window is off, otherwise, your selected tracks will also be shuffled. This may not be what you had in mind, especially if you are doing a "repeat with i from 1 to (count of items of selection)". You know?

Code:
[SIZE=1]tell application "iTunes"
	if shuffle of view of front window is false then
		if selection is not {} then
			-- do stuff with selection
		else
			-- no selection...
		end if
	else
		-- shuffle is on...
	end if
end tell[/SIZE]
If you don't care about the order of tracks in the selection, then you needn't bother checking on shuffle.
 
Top