MailText
This script takes a selected text in BBEdit and puts it in a new Mail outgoing message. Unfortunately AppleScript Editor autoindenting facilities with strings that contain newlines are horrible. Anyway, it works.
tell application "BBEdit"
set s to selection as text
set mytext to s as string
end tell
tell application "Mail"
set mylines to {¬
"--------------------------------< Code >---------------------------------
", ¬
mytext, ¬
¬
"
--< autoinserted from BBEdit by an Apple Script by Enrico Franchi (c) >--"} ¬
as string
set n_msg to make new outgoing message with properties ¬
{content:mylines}
set visible of n_msg to true
end tell
back
All documentation is under FDL and all source code is under BSD,
unless differently stated.
Copyright Enrico Franchi © 2005
24-mar-06