Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking State of Mouse button
#3
Function WaitForMouseButtonDown
Code:
Copy      Help
;/
function ^waitmax button ;;waitmax: 0 is infinite.  button: 1 left, 2 right, 4 middle, 5 6 X


if(waitmax<0 or waitmax>2000000) end ES_BADARG
opt waitmsg -1

int wt(waitmax*1000) t1(GetTickCount)
rep
,0.01
,
,ifk((button)) ret
,
,if(wt>0 and GetTickCount-t1>=wt) end "wait timeout"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)