Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LINK, TEXT Acc role infirefox
#1
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
#2
Member function Acc.FromMouseLink
Code:
Copy      Help
;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+
#3
Perfection, as usual...thanks...

Must I keep this member function or will you implement it in next QM?
#4
Keep it.
#5
ok, good framework for customisation..
#6
Acc.FromMouseLink code updated.

In next QM it will be FromMouse flag 1.
#7
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
#8
mid ;;middle click the link

or

run url ;;open the URL in new tab
#9
run url always open tab in forground, not wanted

thanks


Forum Jump:


Users browsing this thread: 1 Guest(s)