How to open all hyperlinks in a document

Everything related to our flagship word processor.
Post Reply
User avatar
Matze
Posts: 170
Joined: 2004-12-14 07:54:49
Location: Düsseldorf Germany
Contact:

How to open all hyperlinks in a document

Post by Matze »

Hi

I have got loads of links in one document, divided by \n. How can I open these all at once, so that my browser shows them in tabs (Omniweb, Firefox, Safari)

Thanks for any hint, Matze

User avatar
Hamid
Posts: 749
Joined: 2007-01-17 03:25:42

Re: How to open all hyperlinks in a document

Post by Hamid »

One way to do this is to export the document as HTML and then open the exported document in Firefox and use the extension Multi Links:
http://www.grizzlyape.com/addons/multi-links/

Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: How to open all hyperlinks in a document

Post by Kino »

I think the following macro will do the job. Whether links will be opened in new tabs or in new windows depends on your preferences settings in the browser.

Code: Select all

 ## Open All Links in the Current Document

# Links will be opened by the default web browser

$doc = Document.active
if $doc == undefined
	exit 'No document is open, exiting...'
end
Select Document Start
While Select Next Link
	Open URL $doc.selectedSubtext.attributesAtIndex(0).link
	Document.setActive $doc
end

### end of macro ###
Oup! I seem to have misunderstood what you mean. Are links plain text? If so, please try this one.

Code: Select all

 $doc = Document.active
if $doc == undefined
	exit 'No document is open, exiting...'
end
Select Document Start
While Find Next 'https?://\S+', 'E-W'
	Open URL $doc.selectedSubstring
	Document.setActive $doc
end

User avatar
Matze
Posts: 170
Joined: 2004-12-14 07:54:49
Location: Düsseldorf Germany
Contact:

Re: How to open all hyperlinks in a document

Post by Matze »

Dear Kino,

please forgive my late reply - I completley forgot, that I have started this topic and only rememberd it, when I needed to open a few hyperlinks again.
The macro works fine and it is a blessing in connection with Omniweb, because now I can create OW-workspaces from link-collections I grabbed from the web.

Best regards and many thanks, Matze

User avatar
Matze
Posts: 170
Joined: 2004-12-14 07:54:49
Location: Düsseldorf Germany
Contact:

Re: How to open all hyperlinks in a document

Post by Matze »

Hamid wrote:One way to do this is to export the document as HTML and then open the exported document in Firefox and use the extension Multi Links:
http://www.grizzlyape.com/addons/multi-links/
Hamid, this seems to be handy, but I can not install it on my mac.
Klicking on the link downloads a .xpi-file. Doubleclicking on this file directs me to the AppStore. ???

User avatar
Hamid
Posts: 749
Joined: 2007-01-17 03:25:42

Re: How to open all hyperlinks in a document

Post by Hamid »

Use Firefox to go to that site. Then, instead of the 'Download Now' button you will get '+ Add to Firefox' button. Click that button, and he add-on will be installed automatically to Firefox.

You can also install the add-on from within Firefox by using the Tools:Add-ons menu (⌘⇧A).
Then tab to Get Add-ons.
In the Search toolbar at the top right, enter 'Multi Links' or go straight to this link:

https://addons.mozilla.org/en-US/firefo ... lti-links/

to get the '+ Add to Firefox' button.

Post Reply