I occasionally find myself wanting to save some text from a browser window. Usually I want to know where the text came from as well, so just dragging out a text clipping to the desktop is not a good solution.
I wrote two AppleScripts (one for Safari and one for Firefox) to make saving a selected text, URL, and page title from browser windows easier. The scripts write the browser's selected text and other info to a text file that it creates on the user's desktop. (I don't like clutter on the desktop, so on my Mac, this file gets created in another folder. However, I wanted to provide example scripts that worked, so I chose the desktop).
Below is an example of the script's output with the date, the URL, the page title and some text from a selection:
Wednesday, February 6, 2008 8:40:11 PM
http://some-url.com
Photo of the Day
-------------------
A deep-blue sky sets off a mass of yellow wildflower blooms along ... [snip] ... magazine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Further use of the script will append data to the same file, and keep the text neatly formatted and properly separated.
Here are the scripts; first, Safari:
And Firefox: These could be Script Menu scripts, but I use them as applications and position them on my desktop at the extreme top left. A double click just to the left of my browser window gives me a shorter mouse trip to activate them.Mac OS X Hints
http://hints.macworld.com/article.php?story=20080207080505152