

PLAN: I want to make this star the current song if it's unstarred Spotify = ahk_class SpotifyMainWindow Set variable for Spotify Window NameĬontrolSend, ahk_parent, ^, ahk_class SpotifyMainWindow

#IfWinExist ahk_class SpotifyMainWindow Only do the following if Spotify is running SetWorkingDir %A_ScriptDir% Ensures a consistent starting directory.ĭetectHiddenWindows, On Detect Spotify even if it's minimized SendMode Input Recommended for new scripts due to its superior speed and reliability. #NoEnv Recommended for performance and compatibility with future AutoHotkey releases. Depending on the game that can be a pain, but it's the best I can do without fancy DLL calls and stuff. Unfortunately the context menu means that it will minimize full-screen applications like games for a split second. So I've come up with a reasonably solution, it opens up a context menu even when the program is minimized and does everything including not unstarring songs. I want all this to happen when the Application is in the tray, without opening the window. If it's already starred then just leave it alone. To make matters even harder, I only want the Autohotkey script to star the song if it's not already starred. So I have an Autohotkey script that gives me global hotkeys for playback control, volume and copying the song title (including em dash fixing) but I've hit a brick wall trying to figure out how to star the current song. Frustratingly 'starring' the song that is currently playing does not have a keyboard shortcut, even when the window is active. Okay so the Spotify application on Windows does not have inbuilt support for global hotkeys, and very basic hotkeys even when the application window is currently active. How to star a Spotify song while it's minimized?
