"Set Rating" in Apple Music

Using KM 10.0.2 in Mac OS 12.2.1. None of my "Set rating" shortcuts seem to work. They're in a macro group that's set to be available in the Music app; each contains only the "Set Rating" action with a specified star level, and can be triggered either by the status menu or by a keyboard shortcut. But regardless of trigger, none of the shortcuts works when a track is selected in Music.

I originally created these shortcuts for iTunes, so I double-checked that they are set to work with Music, and I even deleted the Set Rating action and selected it again from the Actions palette, without success. Any ideas?

Independently from you, I just tried all three of the Rating actions in KM and none of them worked, although any of the other music macros that I tried did work. Let's see if a real wizard will respond.

Hey John,

The action says it works it iTunes...

“There are 3 actions to change ratings of the current iTunes track:”

action:Set Rating [Keyboard Maestro Wiki]

Keyboard Maestro uses AppleScript behind the scenes to do this, so I reckon your best bet is to learn how to do script the Music.app to do this.


That's a workaround, I suppose. But the relevant KM actions are in a section called "Music Control," not "iTunes Control," so if they don't work with Music, it would seem to represent a broken feature.


On my system (Mojave) it's iTunes Control, so it looks like Peter has that covered.

Check and see if AppleScript works with ratings on your system.

What version of macOS are you using?

There's an example AppleScript that should work with Apple Music here:

I'm using KM 10.0.2 under Mac OS 12.3 (Monterey). I've no doubt that AppleScript would work unless it's broken itself and is the root of the problem. But my spending time experimenting with AppleScript would fly in the face of my point in creating these KM macros—which was to create something even easier than rating a track using the mouse...not something that hard in the first place. I'm mainly sending up a flare to Peter that these KM actions may have broken.

@Sleepy, it took me a while, but I was able to figure out what's going on. The KM action — and the AppleScript behind the action — only works when a track is playing or paused. Contrary to my expectations, it does not work when a track is selected (highlighted) in Music, but doesn't appear in the control pane at the top of the Music window.

@ccstone, thanks for pointing me to AppleScript.

1 Like