Posts: 795
Threads: 136
Joined: Feb 2009
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?
Posts: 12,072
Threads: 140
Joined: Dec 2002
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.
Posts: 795
Threads: 136
Joined: Feb 2009
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
Posts: 12,072
Threads: 140
Joined: Dec 2002
Mouse hook - search forum for SetWindowsHookEx WH_MOUSE_LL.
Window events hook - search forum for SetWinEventHook.
Posts: 795
Threads: 136
Joined: Feb 2009
Posts: 795
Threads: 136
Joined: Feb 2009
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???
Posts: 12,072
Threads: 140
Joined: Dec 2002
Replace mes to
opt waitmsg 1
wait -1
Posts: 795
Threads: 136
Joined: Feb 2009
ok, then where to specify i want to monitor only firefox window then in code???
Posts: 795
Threads: 136
Joined: Feb 2009
and is it possible to alter a firefox right menu to add custom item in it by code?
Posts: 12,072
Threads: 140
Joined: Dec 2002
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)
Posts: 12,072
Threads: 140
Joined: Dec 2002
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
Posts: 795
Threads: 136
Joined: Feb 2009
asked because of the shellmenu trigger of QM in windows...