I was just playing around with 'PostMessage' and found something cool. This commands works in Spotify even when it is Minimized
For now it can toggle play, change tracks and other things. I will mess with it later to find other things
Code: Select all
; PostMessage, 0x111, 114, 0, , ahk_class SpotifyMainWindow ; toggle play
; PostMessage, 0x111, 115, 0, , ahk_class SpotifyMainWindow ; next song
; PostMessage, 0x111, 116, 0, , ahk_class SpotifyMainWindow ; last song or replay
; PostMessage, 0x111, 117, 0, , ahk_class SpotifyMainWindow ; forward 7 seconds
; PostMessage, 0x111, 118, 0, , ahk_class SpotifyMainWindow ; backward 7 seconds
; PostMessage, 0x111, 119, 0, , ahk_class SpotifyMainWindow ; toggle shuffle
; PostMessage, 0x111, 120, 0, , ahk_class SpotifyMainWindow ; toggle repeat
; -----------------------------------------
; PostMessage, 0x111, 121, 0, , ahk_class SpotifyMainWindow ; increase volume
; PostMessage, 0x111, 122, 0, , ahk_class SpotifyMainWindow ; decrease volume
; -----------------------------------------
; PostMessage, 0x111, 129, 0, , ahk_class SpotifyMainWindow ; toggle private session
; PostMessage, 0x111, 130, 0, , ahk_class SpotifyMainWindow ; change to offline
; PostMessage, 0x111, 138, 0, , ahk_class SpotifyMainWindow ; restart spotify
; PostMessage, 0x111, 139, 0, , ahk_class SpotifyMainWindow ; toggle friend activity
; PostMessage, 0x111, 140, 0, , ahk_class SpotifyMainWindow ; create playlist
; PostMessage, 0x111, 141, 0, , ahk_class SpotifyMainWindow ; create playlist '2'
; -----------------------------------------
; PostMessage, 0x111, 32006, 0, , ahk_class SpotifyMainWindow ; last song or replay
; PostMessage, 0x111, 32007, 0, , ahk_class SpotifyMainWindow ; toggle play
; PostMessage, 0x111, 32008, 0, , ahk_class SpotifyMainWindow ; next song
; -----------------------------------------
; PostMessage, 0x111, 103, 0, , ahk_class SpotifyMainWindow ; about sptofy
; PostMessage, 0x111, 104, 0, , ahk_class SpotifyMainWindow ; close
; PostMessage, 0x111, 105, 0, , ahk_class SpotifyMainWindow ; settings
; PostMessage, 0x111, 110, 0, , ahk_class SpotifyMainWindow ; third party license
; PostMessage, 0x111, 111, 0, , ahk_class SpotifyMainWindow ; zoom in
; PostMessage, 0x111, 112, 0, , ahk_class SpotifyMainWindow ; zoom out
; -----------------------------------------
; PostMessage, 0x111, 65639, 0, , ahk_class SpotifyMainWindow ; about sptofy
; PostMessage, 0x111, 65640, 0, , ahk_class SpotifyMainWindow ; close
; PostMessage, 0x111, 65641, 0, , ahk_class SpotifyMainWindow ; log off
; PostMessage, 0x111, 65646, 0, , ahk_class SpotifyMainWindow ; third party license