Posts: 795
Threads: 136
Joined: Feb 2009
Hi Gintaras, hi all
i'd like in firefox to be able to get the url of a HTTP link using mouse click (this part is implemented)
I can do it , but not using Acc functions. i need to select the text link to get it.
when being over a link with the mouse (with no selection done, only hovering it), i can't.
If I do Acc r.fromMouse, I get the TEXT acc object, not the LINK related object.
Any hint?
Thanks
Posts: 12,074
Threads: 141
Joined: Dec 2002
Member function
Acc.FromMouseLink
;Gets object from mouse, and initializes this variable.
;If it is TEXT, STATICTEXT or GRAPHIC and its parent object is LINK, gets the parent object.
;Returns 1 if the object finally is LINK, 0 if not.
this=acc(mouse)
err end ERR_OBJECTGET
sel Role
,case ROLE_SYSTEM_LINK
,ret 1
,
,case [ROLE_SYSTEM_TEXT,ROLE_SYSTEM_STATICTEXT,ROLE_SYSTEM_GRAPHIC]
,Acc b; Navigate("parent" b)
,if b.Role=ROLE_SYSTEM_LINK
,,this=b
,,ret 1
,else ;;support 2 levels, eg youtube right-side list
,,b.Navigate("parent")
,,if b.Role=ROLE_SYSTEM_LINK
,,,this=b
,,,ret 1
err+
Posts: 795
Threads: 136
Joined: Feb 2009
Perfection, as usual...thanks...
Must I keep this member function or will you implement it in next QM?
Posts: 12,074
Threads: 141
Joined: Dec 2002
Posts: 795
Threads: 136
Joined: Feb 2009
ok, good framework for customisation..
Posts: 12,074
Threads: 141
Joined: Dec 2002
Acc.FromMouseLink code updated.
In next QM it will be FromMouse flag 1.
Posts: 795
Threads: 136
Joined: Feb 2009
to extend this, a question.
I manage many things in Firefox from a function whose trigger is mouse middle click.
Framework:
Middle click -> Is windows active Firefox -> Yes -> Function to determine what Acc is under caret -> Action depending on PAGETAB, LINK etc. The middle button is "eaten" (configured in the trigger dialog) do to that, but i'd like the default action to be done after middle click on a link (= open link in background tab). This would be done after processing the link content (url target, url text etc).
How to do that?
Thanks
Posts: 12,074
Threads: 141
Joined: Dec 2002
mid ;;middle click the link
or
run url ;;open the URL in new tab
Posts: 795
Threads: 136
Joined: Feb 2009
run url always open tab in forground, not wanted
thanks