Re: Existing Entourage Message
Re: Existing Entourage Message
- Subject: Re: Existing Entourage Message
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 14 Sep 2001 11:01:00 -0700
On 9/14/01 10:36 AM, "Jolly Roger" <email@hidden> wrote:
>
On 9/14/2001 12:23 PM, "Jamie Jordan" <email@hidden> wrote:
>
>
> How do I refer to the existing outgoing message that is open in Entourage? I
>
> want to attach a file to it which people kindly helped me with yesterday but
>
> the variable theMsg is undefined and I don9t know how to define it as the
>
> message that is created when you reply to a message.
>
>
>
> The process is that someone replys to a message and then selects a script
>
> from the AppleScript menu in Entourage/Outlook Express that inserts some
>
> text and attaches 2 documents. Thanks
>
>
set theMsg to the current message
>
No, that's not correct, JR.
If Jamie wanted to refer to either the incoming message being filtered by a
rule, or to a saved outgoing message which he has selected in a folder and
perhaps opened up on the screen, then this:
set theMsg to item 1 of (get current messages)
would work. If it were the latter, then
set theMsg to displayed message of window 1
would also work.
But I suspect that what Jamie may have in the front is not a message at all,
but an unsaved draft window. If that were the case, then
if class of window 1 is draft window then
set theMsg to window 1
end if
This will take care of both situations:
if class of window 1 is draft window then
set theMsg to window 1
else if class of window 1 is outgoing message then
set theMsg to displayed message of window 1
end if
Either one can have attachments added.
If Jamie is trying to do an automatic reply to incoming messages being
filtered by a rule, then this might work best, but will only work in
Entourage, not OE:
set origMsg to item 1 of (get current messages)
set theMsg to reply to origMsg without opening window
In OE, it's MUCH more complicated since there's no 'reply' command.
Jamie assured us in his first post that he knew how to make the message, so
I didn't add any of this info at the time. Is there anything else you're not
clear on, Jamie?
--
Paul Berkowitz