Created
October 1, 2013 21:21
-
-
Save blockloop/6785291 to your computer and use it in GitHub Desktop.
Control Spotify with key combinations using autohotkey.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance force | |
SetTitleMatchMode 2 | |
RControl & UP:: | |
Send {Volume_Up} | |
return | |
RControl & DOWN:: | |
Send {Volume_Down} | |
return | |
RControl & Left:: | |
{ | |
DetectHiddenWindows, On | |
IfWinExist Spotify | |
{ | |
ControlSend, ahk_parent, ^{Left}, ahk_class SpotifyMainWindow | |
} | |
else | |
{ | |
Send {Media_Prev} | |
} | |
DetectHiddenWindows, Off | |
return | |
} | |
RControl & Right:: | |
{ | |
DetectHiddenWindows, On | |
IfWinExist Spotify | |
{ | |
ControlSend, ahk_parent, ^{Right}, ahk_class SpotifyMainWindow | |
} | |
else | |
{ | |
Send {Media_Next} | |
} | |
DetectHiddenWindows, Off | |
return | |
} | |
RControl & Enter:: | |
{ | |
DetectHiddenWindows, On | |
IfWinExist Spotify | |
{ | |
ControlSend, ahk_parent, {space}, ahk_class SpotifyMainWindow | |
} | |
else | |
{ | |
Send {Media_Play_Pause} | |
} | |
DetectHiddenWindows, Off | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment