I think I have a basic idea of how to do this, maybe, but not a foolproof one - which is kinda what I need.
I have a program, and in that program is a button. Identifying the button's class or even hwnd if needed is easy. What I want to do is trigger a certain action any time that button is pressed - no matter HOW it is pressed. Left click, Alt + underlined letter, tab to it and press Enter, or even triggered with ControlClick, ideally. Any time that button gets pushed, I want my script to trigger.
The only way I can think to do this is to hotkey LButton and check every mouse click to see if the button was clicked on, then do the same thing with Alt+M and Enter. I'm not sure how reliable that would be, or how likely it would be to mess other things up. Is there a cleaner solution?
Get help with using AutoHotkey and its commands and hotkeys
3 posts • Page 1 of 1
You could check if the button is changing its appearance (looking flat if pushed). Probably
OnMessagewould be of help?
OnMessage looked promising, but it only monitors messages received by the script; I can't intercept messages to other programs. Sadly the button doesn't change appearance if it is activated with alt + underlined letter...