I have a special mouse button that serves as a double click. It doesn't have any special key, it's just sending two LButton signals.
I have introduced the #InstallMouseHook into my script to be able to track mouse clicks. I have gotten this after pressing the double button multiple times:
VK SC Type Up/Dn Elapsed Key
---------------------------------------------------------------------------------------
04 000 d 2.78 MButton
04 000 u 0.19 MButton
01 000 d 0.65 LButton <- Manual DC
01 000 u 0.17 LButton
01 000 d 0.11 LButton
01 000 u 0.14 LButton
04 000 d 0.75 MButton
04 000 u 0.19 MButton
01 000 d 0.45 LButton <- Special button DC
01 000 u 0.00 LButton
01 000 d 0.00 LButton
01 000 u 0.00 LButton
From what I assume The elapsed key is key to determining what is a double click (DC) by the DC mouse button and which one by me manually pressing left click two times. I want to remap the former scenario, not the latter (DC button::something else like middle click and my manual double left click to remain the same). So far it seems that the elapsed time for the DC button is <2.0 and manual DC >2.0.
The idea would be to have something like this (not in AHK language):
loop
if (LButton == 1) //pressed
{
t=StartElapseTimer;
if (t<2 && LButton == 1) //how to check it went down and up before down the 2nd time?
LButton::MButton; //the remapping I want
else // t>2
Nothing //let me do a regular DC
}
end
Could you help me on how to start the timer and what environment variables need to be set?
Thanks.