Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Browser hook function
#10
ldarrambide Wrote:ok, then where to specify i want to monitor only firefox window then in code???

Macro Macro2791
Code:
Copy      Help
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)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)