Re: Entourage Rules & AppleScript
Re: Entourage Rules & AppleScript
- Subject: Re: Entourage Rules & AppleScript
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 30 Nov 2004 11:56:27 -0800
On 11/30/04 11:33 AM, "Martin Orpen" <email@hidden> wrote:
> on 30/11/04 1:55 am, Gnarlodious wrote:
>
>> item 1 of (get current messages) ?
>
> <kicking myself> Bloody plurals! I kept trying "current message" and kept
> getting: 'Expected ³, ² but found class name'. Didn't think that it would
> need to be plural as I assumed that rules would only be applied to one
> message at a time...</kicking myself>
It's rather that there's no such term as 'current', or 'current message'. If
you look in the 'application' class in Standard Suite, you'll see that
'current messages' - a list - is a property of the application. It can refer
to any number of messages selected in a list of messages in a folder in the
UI, or the {message} being filtered by a rule, when run from a rule. It's
obvious why it has to be plural in the first case. I suppose they could have
implemented a separate 'filtered message' property - singular - representing
a single message for rules, since a rule can never be acting on more than
one message at a time. But this way they got "two for the price of one"
which is actually very useful in writing scripts that can run either from a
rule ort directly on message(s) from the Script menu. The latter lets it act
on many messages at once. So, in order to also enable 'current messages' to
run form a rule, it has to treat the filtered message as the item of a
single-item list.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden