tell application "Safari"
set theURL to URL of front document
set theTitle to do JavaScript "document.title" in front document
end tell
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:theTitle, content:theURL}
tell newMessage
-- Default is false. Determines whether the compose window will
-- show on the screen or whether it will happen in the background.
set visible to true
set sender to "<fill in emall address to send from>"
make new to recipient at end of to recipients with properties {name:"posterous", address:"post@posterous.com"}
--send
end tell
end tell
Comments [4]
tell application "Safari"
set theURL to URL of front document
set theTitle to do JavaScript "document.title" in front document
set selecTxt to (do JavaScript "(getSelection())" in document 1)
set theBody to selecTxt & return & return & theURL
end tell
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:theTitle, content:theBody}
tell newMessage
-- Default is false. Determines whether the compose window will
-- show on the screen or whether it will happen in the background.
set visible to true
set sender to "<fill in mail to send from here>"
make new to recipient at end of to recipients with properties {name:"posterous", address:"post@posterous.com"}
--send remove comment to send
end tell
end tell
Comments [0]
tell application "Safari"
set selecTxt to (do JavaScript "(getSelection())" in document 1)
set theurl to (get URL of document 1)
set pgTitl to (do JavaScript "document.title" in document 1)
end tell
http://www.macosxhints.com/article.php?story=20080207080505152
Comments [0]
Comments [2]