According to http://dougscripts.com/ setting shuffle and repeat modes via applescript is broken in iTunes 11.
According to this stackoverflow answer shuffle is now a playlist independent setting.
Thus, I tried to set the shuffle value via the UI, either by the LCD-ish display of iTunes or via the menu bar. All I could get was "unknown UI index" errors when trying to click the shuffle button/menu item, either in the LCD area or the menu bar. (I'm new to applescript).
If some of you could come up with a way to toggle shuffle mode on iTunes 11, that would be great. Also I'd prefer a solution based on the menu bar rather than the LCD display since the shuffle button is not always visible in the latter.
Ideally, I'd prefer a semantic-based solution over a UI-based solution but I'm not sure if it's possible (iTunes 11 applescript library seems to be outdate since it mention a "shuffle" property for "playlists" items).
For the new Music app, this works. If you're using iTunes still, change "Music" to "iTunes".
Repeat can be set to one or off or all.
tell application "Music"
set song repeat to off
end
Shuffle can be set to true or false.
tell application "Music"
set shuffle enabled to true
end
You can find more details at Dougscripts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With