Can Autohotkey add songs to Spotify favorites when minimized?

Spotify favorites with Autohotkey: possible when minimized?

I’m trying to use Autohotkey to add songs to my Spotify favorites when the app is minimized. Right now, I can control playback and volume, but I’m stuck on the favorites part.

The tricky thing is I only want to add a song if it’s not already favorited. And I want to do all this without opening the Spotify window.

I’ve tried a few things:

  1. Using context menus, but it minimizes full-screen apps
  2. Looking into PostMessage/SendMessage, but I’m not sure how to chain them

Has anyone figured out how to do this? Or have any ideas on how to approach it? I’m open to other solutions too if Autohotkey isn’t the best tool for this.

Thanks for any help!

i’ve been messing with this too! tried using ahk’s wingettext to grab song info from spotify’s tooltip, but it’s hit or miss. maybe look into spotify’s web api? could be a workaround for the minimized issue. not sure bout the favorite status tho. good luck!