Page 1 of 1

How to open all hyperlinks in a document

Posted: 2012-05-13 00:21:44
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

Re: How to open all hyperlinks in a document

Posted: 2012-05-13 02:37:36
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/

Re: How to open all hyperlinks in a document

Posted: 2012-05-13 04:27:03
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

Re: How to open all hyperlinks in a document

Posted: 2012-06-02 00:56:34
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

Re: How to open all hyperlinks in a document

Posted: 2012-06-02 01:05:02
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. ???

Re: How to open all hyperlinks in a document

Posted: 2012-06-02 01:57:07
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.