Windows – AutoHotkey does not capture keystrokes when VS2012 is active window

autohotkeyvisual studio 2012windows 8

When Visual Studio 2012 is active window (and only when Visual Studio is the active window) on my new Windows 8 machine, AutoHotkey does not capture keystrokes. I did not have this problem with VS2010 on Windows 7.

How can I have AutoHotkey take precedence over VS2012?

Here is the script from the .ahk file:

;;;; 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 
} 

Best Answer

It is because your running Visual Studio and AutoHotKey on different permission levels. You are most likely running VS as Admin but running AHK as you (the logged in user). I suggest running them both at the same permission level, and your problem will be fixed.

Related Question