I'm currently trying to achieve the following but somehow struggling hard:
Whenever I have key "Left Alt" pressed down and once the left mouse button is pressed (by myself) - while LAlt is still down - there should be only one left mouse button click event - for a certain amount of time. Once that time has passed, a new left mouse click event is allowed to be processed. Button "Left Alt" keeps being pressed all the time.
My try looks like the following:
Code: Select all
LButton::
if (GetKeyState("LAlt", "P"))
{
Send {LButton}
Sleep 100
}
else
{
Send {LButton}
}
return
Would be awesome if you can tell me what I'm currently doing wrong. Thing is, it somehow is working, though the opposite i.e. whenever I press LAlt, it's doing what should be done if LAlt isn't pressed.
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]