Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Browser hook function
#1
Hi Gintaras, hi all

as i don't know how to program extensions for firefox, i wonder if it is possible for QM to set a hook for the browser to manage actions for it, to remove as many extensions I can and lighten it, it becomes boring to use the more it changes versions, i'd like to rely on minimal extensions if possible.

I plan to switch to chrome, would it be possible to hook it too?
#2
To inject QM macros into browser process and access browser DOM etc like in javascript or Firefox extensions?
No, QM cannot do it, for Chrome too.
#3
nope, just a hook to intercept mouse click and firefox main window behavior.....a general hook...i'll take care in inner code for actions depending on firefox actions/clicks
#4
Mouse hook - search forum for SetWindowsHookEx WH_MOUSE_LL.
Window events hook - search forum for SetWinEventHook.
#5
Thanks for the infos...
#6
int hh=SetWindowsHookEx(WH_MOUSE_LL &Function5 _hinst 0)
mes "Testing mouse hook. Click somewhere..."
UnhookWindowsHookEx hh


using a mes for keeping the function running is not very convenient..

Have you propositions for making it "stealth"? attach to a window, QM main toolbar, etc etc???
#7
Replace mes to

opt waitmsg 1
wait -1
#8
ok, then where to specify i want to monitor only firefox window then in code???
#9
and is it possible to alter a firefox right menu to add custom item in it by code?
#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)
#11
ldarrambide Wrote:and is it possible to alter a firefox right menu to add custom item in it by code?
impossible with QM, maybe possible with a Firefox extensioon
#12
asked because of the shellmenu trigger of QM in windows...


Forum Jump:


Users browsing this thread: 4 Guest(s)