我曾经将AutoHotKey脚本用于Spotify快捷方式(内置的快捷方式是有限的,并且仅在应用程序处于焦点状态时才起作用,我通常在工作时将其保留在后台)。
无论如何,它已经更新了一百万次了,没有问题..但是我下载了最新的Spotify更新,它不再起作用。知道为什么吗?
这是脚本。
#z::Run www.autohotkey.com
SetTitleMatchMode 2
; "CTRL + LEFT" for previous
^Left::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Left}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
; "CTRL + RIGHT" for next
^Right::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Right}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
; "CTRL + UP" for pause
^UP::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, {space}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
; "CTRL + DOWN" for info
^Down::
{
DetectHiddenWindows, On
SetTitleMatchMode 2
WinGetTitle, now_playing, ahk_class SpotifyMainWindow
StringTrimLeft, playing, now_playing, 10
DetectHiddenWindows, Off
clipboard = %playing%`r`n
return
}
; "CTRL + PAGE UP" for volume up
^PgUP::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Up}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
; "CTRL + PAGE DOWN" for volume down
^PgDn::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Down}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
; "CTRL + END" for mute
^End::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^+{Down}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
最佳答案
看到以下问题:Hotkey for next song in Spotify-包括来自Spotify开发人员的声明,以及将在即将发布的版本中修复的声明,以及目前的解决方法:
^Left::Media_Prev
关于autohotkey - 最新的Spotify更新: Autohotkeys script broke,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29040543/