Use A_TickCount as a quick and easy way of measuring the passing of time.
(TESTED)
LButton::
StartTime := A_Tickcount
WaitTimeInMilliSeconds = 1000
tooltip trying
while(StartTime+WaitTimeInMilliSeconds > A_Tickcount)
{
if(!GetKeyState("LButton","P"))
{
click ;send the click anyway if it's not held.
return
}
}
tooltip this happens after 1000 milli second of continuously holding left mouse button
return
If you put this inside a left mouse button hotkey it will reset itself automatically. If you want it looping all the time, you can put the entire thing in an endless loop and reset the starttime instead of return