In a Macro , I differentiate one click and two clicks
Turns well first time. But , often , second time it is as if there was a remanence of the macro : the macro triggers before the click
Of course I can take care of it by pressing x

I put it hereafter very simple as one click detect
What is wrong in closing the Macro ?
Regards
//Detect left mouse click
wait>0.5
Message>Test it! 1 Click
wait>0.3
let>a=1
let>t=1
Label>DéclicLoop
let>t=1+t
LibFunc>user32,GetAsyncKeyState,KeyState,1
wait>0.1
If>KeyState0
//
// a=a+1*
let>a=a+1
endif
if>a=2,Déclic1
Goto>DéclicLoop
wait>0.05
Label>Déclic1
Message>1 Click
wait>0.4
// gives approx "time" of click ; must of course wait for the click ! !
MessageModal>t
Exit>
*line to delete in a test ; the post writes it wrong