• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Simple Entourage AS Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple Entourage AS Question


  • Subject: Re: Simple Entourage AS Question
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 12 Apr 2004 10:52:47 -0700

On 4/12/04 10:21 AM, "Dennis Wurster" <email@hidden> wrote:

>
> What's the proper syntax for referring to a message that is being
> processed by Entourage's mail rules?

tell app "Microsoft Entourage"
set theMsg to item 1 of (get current messages)
-- do whatever you want with theMsg
end tell

You need the explicit 'get' to do it in one line. Or else use a variable in
two lines:

set currMsgs to current messages
set theMsg to item 1 of currMsgs

When processing a rule, there is only one item of this list (item 1).
'current messages' can also be used for the selected messages in the Message
list pane of the main window - so there could be several. The Dictionary is
not overly loqacious on the matter, but does say, in the 'application' etery
of Standard Suite (always check 'application' first):

current messages -list of reference [r/o] -- the current messages
depending on context, including message currently being filtered

'filtered' means 'by a mail rule'.

>
> I'm interested in filtering incoming email with a given static subject,
> and running an applescript as part of the filter.
>
> I'd like the applescript to:
>
> put the sender's email address into a variable as text
> put the contents of the body into another variable as text.
>
> That's it.
>
> The thing is, I'm not sure how to refer to 'the message' which
> Entourage is processing with the filter. Can I just use the 'of me' or
> 'my' identifier, or will that refer to the AS itself?

tell app "Microsoft Entourage"
set theMsg to item 1 of (get current messages)
set theAddress to address of sender of theMsg
set theContent to content of theMsg
end tell



You can also get the display name of the sender if you wish.

--
Paul Berkowitz

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Simple Entourage AS Question (From: Dennis Wurster <email@hidden>)

  • Prev by Date: Simple Entourage AS Question
  • Next by Date: Re: Simple Entourage AS Question
  • Previous by thread: Simple Entourage AS Question
  • Next by thread: Re: Simple Entourage AS Question
  • Index(es):
    • Date
    • Thread