Spotify control script for AHK

I found it rather annoying to reopen Spotify whenever I wanted to change tracks or increase the volume… Using Autohotkey, it’s no longer a problem (I found some great examples via Google).

Enjoy

~ab

;
; Spotify volume and track controls.
;

#persistent

^!Space::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, {Space}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off

}
return

^!Right::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Right}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off

}
return

^!Left::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Left}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
}
return

^!Down::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Down}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
}
return

^!Up::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Up}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
}
return

This entry was posted in Autohotkey. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">