Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 895
vividn Avatar asked Feb 12 '14 23:02

vividn


People also ask

What is mouse button 4 in AutoHotkey?

4th mouse button. Typically performs the same function as Browser_Back.

How do I pause an AutoHotkey script?

To pause or resume the entire script at the press of a key, assign a hotkey to the Pause function as in this example: ^! p::Pause ; Press Ctrl+Alt+P to pause. Press it again to resume.


1 Answers

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.

like image 87
vividn Avatar answered Oct 21 '22 02:10

vividn