Re: Entourage, Mailing List Manager, & AS
Re: Entourage, Mailing List Manager, & AS
- Subject: Re: Entourage, Mailing List Manager, & AS
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 13 Jun 2002 00:16:28 -0700
On 6/12/02 11:57 PM, "garrett" <email@hidden> wrote:
>
> The MLM, uniquely, has a checkbox that says "Do not apply Rules to list
>
> messages" on the Advanced tab. It is checked by default. Uncheck it. Then
>
> set up a regular rule with the criteria you want (which can include "Any To
>
> Recipient contains <mailing list address>" if you need to exclude non-list
>
> messages which share the other criteria you're about to enter), and set the
>
> action to run the applescript. The MLM will actually both run the script
>
> _and_ move the message to the folder you've specified in the MLM. That's why
>
> I said "uniquely: regular rules can't do that on their own.
>
>
Understood. However, where I am still not clear what exactly do I say in the
>
script to identify the messages that the rule just handled... for instance I
>
can say
>
>
set myMessages to selection
>
>
or
>
>
set myMessages to every message of folder ID 26 whose read status is
>
untouched
>
Look at the 'application' entry in the Entourage Dictionary, at this
property:
current messages -- list of reference [r/o] -- the current messaged
depending on context, including message currently being filtered
Any message being filtered by a rule (including an MLM rule) is always:
set theMsg to item 1 of (get current messages)
[You need the explicit 'get' or a variable set to 'current messages'.]
Rules, including MLM rules, work on one message at a time, so it's always
'item 1' of a single-item list, when you run a script from a rule. Don't
worry, it's all orderly when there are a lot of messages.
>
what I guess I'm getting at is:
>
>
1) check mail
>
2) rules look at it - this message applies to me
>
3) set the category and move it to folder X
>
4) run the applescript on THAT message
>
>
my question is how do I tell the applescript to run on that message short of
>
having the rule move the message to a temp folder then running the script on
>
every entry in the temp folder.
No, have the MLM run the AppleScript, and include category and
message-moving in the same script if it makes more sense than letting MLM do
it (i.e. if you want some messages to go one place, some another). But, as I
said before, unlike other rules, you can actually have your cake and eat it
too - you can run the script as well as do the other things if you want.
It's very easy to add setting the category an/or moving the message to a
folder if you want to. (Note, category property of a object is also a list
of categories.)
--
Paul Berkowitz
_______________________________________________
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.