Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wait for Mouse Movement OR Key/MB Up/Down?
#3
With hook.

Function WaitForMouseAction
Code:
Copy      Help
;/
function [^waitMaxS]

;Waits for mouse movement or click or wheel.

;waitMaxS - max number of seconds to wait. Default or 0 is infinite. Error on timeout.


int- __wfma_hook
__wfma_hook=SetWindowsHookEx(WH_MOUSE_LL &__WFMA_MouseProc _hinst 0)
opt waitmsg 1
wait waitMaxS -V __wfma_hook
err
,UnhookWindowsHookEx __wfma_hook
,end _error

Function __WFMA_MouseProc
Code:
Copy      Help
;/
function nCode wParam MSLLHOOKSTRUCT*h

int- __wfma_hook
int r=CallNextHookEx(__wfma_hook nCode wParam h)

UnhookWindowsHookEx __wfma_hook
__wfma_hook=0
ret r


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)