[X4U] Entourage: Export msg body to text file
Charles Howse
chowse at charter.net
Tue Jan 24 08:36:24 PST 2006
> On 1/20/06 2:22 PM, Charles Howse <chowse at charter.net> wrote:
>
>> Can anyone give me a place to start looking for a way to take the body of an
>> Entourage message, and programmatically *append* it to a text file? I would
>> also like to insert a blank line at the beginning of the text to be appended.
>>
>> I'm thinking AppleScript
>
> Yes, AppleScript indeed! It's a simple enough script, Charles, and I'll be
> happy to throw it together for you. A couple questions: do you already have
> a preexisting file, or should the script create one? And do you want to
> append just the message you're viewing or a group of messages you've
> selected?
>
> --Bill
Yeaaaaa! Thanks Bill!
The 'perfect' script will take the bodies of the selected message or
messages, append them to the existing file
/Users/Charles/Sites/TVWB/buddies.html, with a blank line between each, then
mark the messages as read.
Just to make things harder, if we could ignore any messages other than plain
text, that would help. I can handle that if necessary.
In the spirit of "You scratch my back...", here is a little bash script that
I use inside an Applescript application to generate the signature below.
It's just a 'do shell script <path-to-file>', you must have fortune-mod
installed (Fink).
#!/bin/sh
file=fort_sig.txt
echo > $file
echo >> $file
echo "--" >> $file
echo "Charles" >> $file
echo >> $file
/sw/bin/fortune -s >> $file
pbcopy < $file
rm $file
--
Charles
It would be illogical to assume that all conditions remain stable.
-- Spock, "The Enterprise" Incident", stardate 5027.3
More information about the X4U
mailing list