Tech Tips

Keyboard Maestro – Star current track in Spotify

I was exploring my options for starring the current track in spotify, but was coming up short. There is some work on some alfred workflows, but they either required a premium membership, or didn’t seem solid. It’d be nice to just use Applescript with a hotkey to star the track, but that’s not an action you can do with their library.

I realized that I now have Keyboard Maestro, and this is just the tool I need to accomplish my goal (hit CTRL-CMD-ALT-S to star the current track). The macro is a combination of Applescript (to get current track details and whether or not it’s starred), mouse clicks (as clean as possible, should work for everyone), if-then-else logic, application activation and notifications.

Like any other macro, this is subject to change and improvement, but it should give you a starting point. For example, I’ve already thought of a few things since posting…

  1. I realized I could actually check if the track was starred successfully before showing a notification that it was. I’ll leave that up to you to figure out.
  2. You’ll want to click the “Reopen initial windows” checkbox on the Activate Spotify action if you tend to leave the Spotify window closed. If you do, you may want to also add an action to re-minimize/close the window. Possibilities are endless!
  3. For this to work, I realized the right-click menu has to be all below the cursor so that the position is the same each time. I’ll find a way around this, but for now I just make sure my Spotify window is at the top of the screen.

And here’s what the macro looks like in edit mode:

star-current-track

Leave a Reply

Your email address will not be published.