Currently trying to make a hotkey play/pause Spotify, and Spotify is not cooperating.
What I've tried:
The obvious approach is just to send a space to the window like:
Code: Select all
ControlSend, ahk_parent, {Space}, ahk_class SpotifyMainWindow
The other approach, which kinda works, is using WinMenuSelectItem to select the Playback -> Play/Pause item like:
Code: Select all
WinMenuSelectItem, ahk_class SpotifyMainWindow, Chrome Legacy Window, Playback, Pause
WinMenuSelectItem, ahk_class SpotifyMainWindow, Chrome Legacy Window, Playback, Play
Before you mention that I can just use Media_Play_Pause, no. I need the hotkey to be context specific to only Spotify. Media_Next_Pause is "grabbed" by the active window if it's listening for it.
So, have anyone got this to work? I'm using the windows Spotify client (version 1.0.53.758.gde3fc4b2)
Thanks in advance.
o/
RUNIE