         ;   APPCOMMAND_MEDIA_PREVIOUSTRACK = 12 = 0xC0000 somehow
         PostMessage, 0x319, , 0xE0000, , ahk_exe Spotify.exe
 
-        ; Doesn't work with latest spotify update
-        ; ControlSend, ahk_parent, {Space}, ahk_class SpotifyMainWindow ; Pause/Unpause
         Tooltip, Spotify Play/Pause
     }
     else


; ctrl + shift + p = play/pause in Spotify
$^+p::
If (!Active2Flag) ; If the flag is not active do this
{
    ; IfWinExist ahk_class SpotifyMainWindow
    IfWinExist ahk_exe Spotify.exe
    {
        ; Play/Pause via clicking with the SendControl is busted
        ; spotify = ahk_class SpotifyMainWindow
        ; CoordMode, Mouse, Screen
        ; MouseGetPos, OrigX, OrigY
        ; WinActivate, %spotify%
        ; WinGetPos, X, Y, Width, Height, %spotify%
        ; MouseClick, Left, X+81, Y+1377
        ; WinMinimize, %spotify%
        ; MouseMove, OrigX, OrigY

        ; Activate Spotify window, send hotkey, minimize and activate previous window
        ; WinGetTitle, wintit
        ; WinActivate, ahk_exe spotify.exe
        ; Sleep, 50
        ; Send, {Space}, ahk_exe spotify.exe
        ; WinMinimize, ahk_exe spotify.exe
        ; WinActivate, wintit

        ; Syntax:
        ;   PostMessage, Msg, wParam,  lParam, Control, WinTitle
        ;

    ; IfWinExist ahk_class ahk_class SpotifyMainWindow
    IfWinExist ahk_exe Spotify.exe
    {
        PostMessage, 0x319, , 0xC0000, , ahk_exe Spotify.exe ; Previous track

        Tooltip, Spotify Previous Song
