Mar 21, '03 09:50:00AM • Contributed by: Anonymous
I've been trying to use Mail/Safari rather than Mozilla. One of the (many) things I miss is the ability to select "send link" when viewing a page, to have a new message created with the page title as the subject and the URL as the body. (I know Mail service has a "send selection" but that's not quite what I want). AppleScript and the AppleScript Menu to the rescue!
[robg adds: Save this script as a compiled script in your user's Library -> Scripts folder, and then just activate it using the ScriptMenu icon when you need it. Very handy! As an aside, activate the ScriptMenu by double-clicking ScriptMenu.menu in the Applications -> AppleScript folder.]
tell application "Safari" ignoring case set theURL to URL of front document set theSource to source of front document set AppleScript's text item delimiters to "title>" set theSource to second text item of theSource set AppleScript's text item delimiters to "</" set theTitle to first text item of theSource end ignoring end tell tell application "Mail" set accountAddresses to (email addresses of first account) set fromAddress to first item of accountAddresses set theMessage to make new outgoing message set visible of theMessage to true set subject of theMessage to theTitle set content of theMessage to theURL activate end tell