notepad++autohotkeyhotkeys

How can I make AutoHotKey intercept hotkeys before other programs?


I have a fairly simple autohotkey script that starts and stops music playback when I press one of the XButtons on my mouse: XButton1::Send {Media_Play_Pause}. The program works just perfectly and I have no problems with it. However, when I'm using Notepad++, it intercepts the mouse button hotkey before AutoHotKey does and switches tabs. This forces me to switch away from Notepad++ when I want to use this hotkey.

Is there any way I can change the order in which programs intercept hotkeys so that AutoHotKey always gets first dibs on any entered keystrokes or mouse buttons?

Or, is there a setting I can change in Notepadd++ to turn off the XButton functionality. I looked through all the settings, but I couldn't find anyway to stop this.


Solution

  • Okay. I think I managed to figure it out. The problem was that I was running Notepad++ as an administrator, so I guess it got higher precedence in the hotkey selection. Running AHK as an admin as well solved the problem.