While trying to use my function, mouse double click, that has worked in the passed, it no longer works. My only guess is that at some point, a patch changed how variables work in functions. So do variables within functions retain their values after every call, or are they always reset? Because this USED TO WORK!
REM Returns 1 if the user has double clicked the mouse, otherwise returns 0.
REM clickDelay must be of type integer and represents the delay between
REM clicks in milliseconds.
REM The following can be used to get the delay the user has set for Windows.
REM
REM load dll "user32.dll",1
REM clickDelay=call dll(1,"GetDoubleClickTime")
function _double_click(clickDelay)
_d_c=0
if mouseclick() = 0 then flag=0
if mouseclick() and NOC=0 and flag=0 then NOC=1:clickOne#=timer():flag=1
if mouseclick() and NOC=1 and flag=0 then _d_c=1:flag=1:NOC=0
if timer() > clickOne#+clickDelay then NOC=0
endfunction _d_c