01-28-2016, 10:23 AM
ldarrambide Wrote:ok, then where to specify i want to monitor only firefox window then in code???
Macro Macro2791
int hh=SetWindowsHookEx(WH_MOUSE_LL &sub.Hook_WH_MOUSE_LL _hinst 0)
mes "Testing mouse hook. Click somewhere..."
UnhookWindowsHookEx hh
#sub Hook_WH_MOUSE_LL
function# nCode message MSLLHOOKSTRUCT&m
if(nCode<0) goto gNext
sel(message) case [WM_MOUSEMOVE,WM_MOUSEWHEEL] goto gNext
int w=win(m.pt.x m.pt.y) ;;note: this is quite slow. Avoid using it with WM_MOUSEMOVE. Faster would be int w=win
if(!WinTest(w "MozillaWindowClass")) goto gNext
OutWinMsg message 0 0 _s; out "%s at %i %i" _s m.pt.x m.pt.y
;...
;gNext
ret CallNextHookEx(0 nCode message &m)