1
votes

I like having my middle mouse button be a double click, so I have an .ahk script to make that happen, but a lot of programs I use (particular ones involving a 3D environment like Autodesk stuff) need the middle mouse button to function normally, so I have this script:

#SetTitleMatchMode,  2
#IfWinNotActive, Autodesk 
MButton::send, {LButton}{LButton}

All this does is make the double click work constantly. As if it's ignoring the WinNotActive completly. I have no idea why this doesn't work. I've tried a few things to see if I could fix it myself, but I made no progress.

Please remember that kind and respectful responces are greatly appreciated.

1
can you please elaborate on "doesn't work"? Is MButtons functionality overridden everywhere?phil294
Sorry I was going to add more details, but I forgot. It's fixed now. There is another MButton function mentioned, but it only activates under specific conditions and shouldn't interfere with anything.Caleb
it might interfere.. try finishing the code snippet with a plain #ifwinnotactive so the condition is "reset" after the MButton Hotkeyphil294
I added the #IfWinNotActive at the end and worked, @Blauhirn! Thanks. You should add that as an answer.Caleb

1 Answers

2
votes

Context-sensitive directives apply to all following hotstrings and hotkeys. Thus, you have to "reset" this behaviour and limit the scope with another #ifWinNotActive:

#SetTitleMatchMode,  2
#IfWinNotActive, Autodesk 
MButton::send, {LButton}{LButton}
#IfWinNotActive

(see https://autohotkey.com/docs/commands/_IfWinActive.htm#Basic_Operation for details)