Forum Moderators: travelin cat
But AppleScript can provide a lot of patches.
I snagged this somewere, shhht :
Paste the following in a new AppleScript document :
set myData to ""
tell application "Safari"
activate
set myURL to URL of document 1
set myData to do JavaScript "getSelection();" in document 1
if myData is "" then
set myData to text of document 1 as text
end if
end tell
set myDate to current date
set fPath to path to desktop
set fName to (do shell script "date \"+%Y-%m-%d\"") & ".txt"
set myFile to open for access file ((fPath as string) & fName) with
write permission
write "=== " & return & "Date: " & myDate & return & "Text from: " &
myURL & return & return & myData & return & return to myFile starting at
eof
close access myFile
Then save it in ~/Library/Scripts/Applications/Safari
You can then launch the script from the menu in the Finder toolbar.
I did not try it yet. Does it work?