зThere is an operator “A_TimeSincePriorHotkey” in the autohokey program. It returns the time elapsed since the last call of this function. With this operator it is very easy to work with double clicks or repeated function calls in a short period (in fact, in any period you set). In Blender I've seen descriptions of timers, but no similar operators. Can you suggest some analog for Blender please ?
#IfWinActive, ahk_class ZBrush
2::
If (A_PriorHotKey = "2" AND A_TimeSincePriorHotkey < 200)
{
print("Hello")
return
}
print("World")
return
In this short code snippet, if the user presses button "2" and less than 200 milliseconds have elapsed since the last press of that button, the word "Hello" will be printed, if more than 200 milliseconds have elapsed, the word "World" will be printed. I am looking for an analog of a mechanism that counts down between presses or function calls.