Code: Select all
#IfWinActive, ahk_class ThunderRT6FormDC
*LButton::
*RButton::
*MButton::
*XButton1::
*XButton2::
Mouse_ProcessClick(A_ThisHotkey)
return
#IfWinActive
Each different click type can lead to a different action that is performed afterwards!
I logically press the captured mouse button + it's keyboard modifier and in most cases send a script to XYplorer (a file manager) via WM_COPYDATA afterwards.
My problem: While the WM_COPYDATA script sending is in process, I can't logically release the mouse button in the Mouse_ProcessClick() function any more so
XYplorer e.g. displays an (internal) menu on the screen as a result of the script sent via WM_COPYDATA but the mouse button isn't released yet inside my AHK script and therefore I can't
click on any of these menu items.
But I can't release the mouse button before I invoke the WM_COPYDATA send because for a right click XYplorer would immediately display the normal shell context menu instead of the menu
that the script should display instead.
Is there a way to logically release a mouse button inside a function without triggering a "physical" action to work around this problem?
I was using a timer before instead of hotkeys where I didn't had this problem but capturing fast double clicks (which can execute a WM_COPYDATA send as well) doesn't really work well with timers...