04-07-2007, 02:16 AM
thanks to:
I want to use mouse event..
Code to disable both keyboard and mouse temporarily
I am using this code that i take from your hook posts.
function:
WE_CreatedWindowInstall
function:
WE_CreatedWindowProc
out lParam.pt.x will return the x mouse cordinates and wParam the action.
thanks for your previous posts.
I want to use mouse event..
Code to disable both keyboard and mouse temporarily
I am using this code that i take from your hook posts.
function:
WE_CreatedWindowInstall
function [off]
dll user32 #SetWindowsHookEx idHook lpfn hmod dwThreadId
dll user32 #UnhookWindowsHookEx hHook
dll user32 #CallNextHookEx hHook ncode wParam !*lParam
def WH_MOUSE_LL 14
;Installs/uninstalls hooks that will call WE_CreatedWindowProc whenever an object is created.
;This function does not need to be modified.
int+ hook
if(off) if(hook) UnhookWindowsHookEx(hook); hook=0
else
if(getopt(nthreads)>1) mes "Already running. If in QM, use Threads dialog to end thread. If in exe, thread will end automatically." "" "i"; ret
hook=SetWindowsHookEx(WH_MOUSE_LL &WE_CreatedWindowProc _hinst 0)
atend WE_CreatedWindowInstall 1
opt waitmsg 1
wait -1
function:
WE_CreatedWindowProc
;/WE_Main
function nCode wParam MSLLHOOKSTRUCT*lParam
out lParam.pt.x
ret CallNextHookEx(hook nCode wParam lParam)
out lParam.pt.x will return the x mouse cordinates and wParam the action.
thanks for your previous posts.