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

Create iTunes shuffle mode toggle shortcuts Apps
I'm using an iBook to distribute music throughout my house, and control it with an RF Remote. Most of the time, I set iTunes to shuffle mode and play songs from iTunes Library or playlists at random. But sometimes, I want to be able to return to continuous play mode or activate shuffle (i.e. to listen for an entire album/artist) from any room using the remote control. Unfortunately, the shuffle/unshuffle function pre-programmed in my remote control wasn't working on my system.

The simplest way I found to address it was to create a shortcut for shuffle/unshuffle function that could then be easily allocated to the remote's button. But it seems that no shortcuts for shuffle/unshuffle exist in iTunes. Therefore, below are two little scripts which, when used in conjunction with shortcuts created with iKey, allow me to activate shuffle/unshuffle using my remote.

To turn Shuffle on:
tell application "iTunes"
  set shuffle of playlist "Library" to true
end tell
To turn Shuffle off:

tell application "iTunes"
  set shuffle of playlist "Library" to false
end tell
In order to ensure that the scripts work correctly when listening to your whole Library, make sure you use your actual library name. This could change based on your version of iTunes, OS language, etc. (Library, My_Library, Bibliothèque (in French), etc.).

Many thanks to Vonleigh, Doug, and other anonymous users, whose contributions helped me with this problem.
    •    
  • Currently 2.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[8,371 views]  

Create iTunes shuffle mode toggle shortcuts | 6 comments | Create New Account
Click here to return to the 'Create iTunes shuffle mode toggle shortcuts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create iTunes shuffle mode toggle shortcuts
Authored by: DougAdams on Feb 25, '05 10:49:14AM
No need for two scripts. This single script will toggle shuffle to whatever it isn't:
tell application "iTunes"
	set shuffle of library playlist 1 to not (shuffle of library playlist 1)
end tell

---
Doug's AppleScripts for iTunes
http://www.malcolmadams.com/itunes/

[ Reply to This | # ]

And more so
Authored by: DougAdams on Feb 25, '05 01:11:44PM
You know, why should the main library have all the fun? This toggler will toggle shuffle for the selected playlist:
tell application "iTunes"
	set this_playlist to view of front browser window
	set shuffle of this_playlist to not (shuffle of this_playlist)
end tell
Or, for a real good shufflin':
tell application "iTunes"
	tell view of front browser window
		repeat 7 times
			set shuffle to false
			set shuffle to true
		end repeat
	end tell
end tell

---
Doug's AppleScripts for iTunes
http://www.malcolmadams.com/itunes/

[ Reply to This | # ]

Create iTunes shuffle mode toggle shortcuts
Authored by: zacht on Feb 25, '05 01:00:05PM

SizzlingKeys4iTunes now has a shuffle mode toggle hotkey.

http://yellowmug.com/sk4it/

It's free. There are other free remote-control-of-itunes programs of course, but I thought I'd mention this one.

zach

[ Reply to This | # ]

Change shuffle mode?
Authored by: pascalpp on Feb 25, '05 02:21:07PM

Anyone know of a way to change the shuffle mode? I usually shuffle by song, but every once in a while I like to change it to shuffle by album. Can't seem to find a way to script this. Cmon Doug! If you can't do it, it can't be done..



[ Reply to This | # ]
Change shuffle mode?
Authored by: DougAdams on Feb 25, '05 02:54:08PM

Can't be done :(

This setting is in iTunes Preferences and they can't be manipulated via AppleScripting, regular flavor or GUI.

It may be possible to dig into the iTunes plist and find the hex code for this, but I haven't tried it.

---
Doug's AppleScripts for iTunes
http://www.malcolmadams.com/itunes/



[ Reply to This | # ]
Create iTunes shuffle mode toggle shortcuts
Authored by: vr6racing22 on Aug 28, '10 03:22:45PM

No need to do any serious work other than opening system preferences. In leopard, go to Keyboard & Mouse, Snow Leopard Keyboard pane. Go to keyboard shortcuts and add new shortcut. Select itunes from the drop down. The name of the command is the name of the action in the iTunes menu. Make sure you spell it EXACTLY as it appears in the iTunes menu, "Turn Shuffle On". Then assign the shortcut. I used command-s as itunes does not use this shortcut. In order to toggle shuffle off, create another shortcut named "Turn Shuffle Off" using the same key combo, command-s. It should work immediately in itunes, but you may have to restart the app.

As for shuffle by album, the process is similar, but use the name of that menu item.



[ Reply to This | # ]