[Feature Request]: Action to set Apple Music shuffle mode

Right now it seems that to enable shuffle and change the shuffle mode ("songs", "albums" or "groupings") you need to resort to Execute AppleScript action:

tell application "Music"
        set shuffle enabled to true
	set shuffle mode to songs
end tell

I would love to see actions for

  • "Shuffle songs" action: with dropdown for "enable", "disable", "toggle"
  • "Set Shuffle Mode" action: with a dropdown menu to select "songs", "albums" or "groupings"
1 Like

Noted. Although it's so easy to do with AppleScript, adding native actions that do exactly the same thing is sometimes hard to justify.

I see three other options that you may not have considered. You may not like any of my ideas, but I like to come up with new ideas.

  1. KM has the ability for users to create custom actions.

https://wiki.keyboardmaestro.com/manual/Plug_In_Actions

I'm not skilled enough to write custom actions yet, however.

  1. A KM programmer could place the AppleScript inside a Macro, so that the programmer could simply call the macro, rather than resorting to AppleScript.

  2. MacOS has a feature called "Type to Siri". If Siri has the ability to shuffle songs, then it would be very easy to write a KM macro that sends a text string to Siri. I'm not actually sure if Siri understands words like "shuffle music" but if it does, this idea will work. I know it responds to commands like, "Turn off all lights." I've done this as a way to get KM to manipulate my Apple HomeKit devices.

Notice the Siri icon in the system tray next to the date/time. Clicking on it will get you the prompt below it.

Come to think of it, I would like to see a KM action called "Type to Siri" which simply passes a string to Siri as if it were a spoken command.

It's "easy" to do if

  • if you know that AppleScript exists and it occurs to you that you can use. I think the natural thing for a user is to search for actions the "Music" group inside Keyboard Maestro

  • if you already know AppleScript, and know that you can use Script Editor to try it, etc, Or if you are willing to learn it.

Just finding that the values for set shuffle mode are songs, albums and grouping requires some familiarity with Script Editor > Window > Library > Music.

I guess, if the user is motivated enough he will google and will find in posts like this and get the idea of using "Execute AppleScript" action and the

tell application "Music"
	set shuffle enabled to true
	set shuffle mode to songs
end tell
1 Like

Yes. Which is why I noted it down.

I'm not saying it isn't a good thing to do, just that it's always a choice which of the many good things to do I do.

1 Like