
新しい Windows 8 マシンで Visual Studio 2012 がアクティブ ウィンドウの場合 (Visual Studio がアクティブ ウィンドウの場合のみ)、AutoHotkey はキーストロークをキャプチャしません。Windows 7 の VS2010 ではこの問題は発生しませんでした。
AutoHotkey を VS2012 よりも優先させるにはどうすればよいですか?
以下は .ahk ファイルのスクリプトです。
;;;; Spotify! ;;;;
SetTitleMatchMode 2
; "WindowKey + F11" for previous
#F11::
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Left}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
; "WindowKey + F12" for next
#F12::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, ^{Right}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
; "WindowKey + F10" for pause
#F10::
{
DetectHiddenWindows, On
ControlSend, ahk_parent, {space}, ahk_class SpotifyMainWindow
DetectHiddenWindows, Off
return
}
答え1
これは、Visual Studio と AutoHotKey を異なる権限レベルで実行しているためです。VS は管理者として実行していますが、AHK はログインしているユーザーとして実行している可能性があります。両方を同じ権限レベルで実行することをお勧めします。そうすれば、問題は解決します。