John Gruber has posted a very useful script for Mac OS X Snow Leopard users that allows easy URL opening in blocks of text using Safari, global services, Perl, and some regular expressions. Here’s an excerpt:
“I’ve written a bunch that I use personally. One of my most-used is called “Open URLs in Safari Tabs”. Here’s how it works:
- Select some text in any application.
- Invoke the Open URLs in Safari Tabs service. (I usually do this via the control-click contextual menu.
- The service passes the selected text to a script I wrote. The script finds all the URLs in the selected text, opens a new Safari window, and creates a tab in that new window for each of the URLs.”
Services are something not a lot of Mac users use. I know I don’t, but they have always been intriguing to me. I’ve tried to use Automator in the past, but I’ve never been successful.
Check out John’s Twitter here.