Re: Selecting messages in Outlook Express
Re: Selecting messages in Outlook Express
- Subject: Re: Selecting messages in Outlook Express
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 05 Mar 2003 18:39:14 -0800
On 3/5/03 5:28 PM, "John Delacour" <email@hidden> wrote:
>
If you consider that in order to get the address you need to write all this
>
>
>
tell application "Microsoft Entourage" -- read OE
>
set ls to messages in folder "inbox"
>
get display name of address of item 1 of recipients of item 1 of ls
>
--> "New Microsoft Entourage User "
>
end tell
>
>
then it's not surprising you re having trouble, because you've got to
>
twist all that round into a whose clause.
>
>
Paul Berkowitz is your man. He loves this new-age Dan Crevier stuff :-)
It's not "new-age Dan Crevier stuff". It's old-age (OS 7) Mail Suite stuff
which Apple said should be used by email clients wanting to implement
AppleScript. Dan has always followed Apple protocols (if only Apple did the
same...) So he had to implement all this stuff, which he did first in Claris
Emailer, then in OE, then in Entourage. It doesn't mean he likes it, nor
that I do. The 'address of address of recipient' business is ridiculous for
a start. It's idiotic that there should be an 'address' class of type record
which has an 'address' property of type string. But that's what it says in
the Mail Suite. (I guess Cal never was asked to advise on that Suite...
Things weren't all roses in the "good old days".) But Dan in fact
implemented lots of simple coercions to let new scripters bypass a lot of
this stuff in simple cases.
For example, the Mail Suite stipulates that you make a recipient of an
outgoing message this way:
make new outgoing message with properties {subject:"foo", content:"bar",
recipient:{recipient type:(to recipient),
address:{address:"email@hidden", display name:"Joe Blow"}}
That always works in OE and Entourage. But, for the usual default of just
one 'to recipient', Dan has implemented this shortcut:
make new outgoing message with properties {subject:"foo",
content:"bar", recipient:"Joe Blow <email@hidden>"}
Now what's wrong with that? it makes everything simple, uses the format
everyone knows and is used in draft windows. The only problem is it's not
documented anywhere, and so far no one has commissioned me to write the
book. So you read it here. I think Dan id to be commended for both
implementing the recommended Mail Suite and also simplifications that work.
There are quite a few other similar coercions cutting through the verbiage
of the Mail Suite.
>
>
Here's the sort of thing you'll be up against:
>
>
get every item in (get messages in folder "inbox") where the display
>
name of the address of its first item is "New Microsoft Entourage
>
User "
Nah. See my last post. (You don't need the explicit 'get' here, BTW.) And
you can't use 'whose' clauses with AppleScript lists - as we all know -
since they've still not been implemented by Apple, just with application
objects in applications that implement them. I think your lack of
familiarity with whose clauses in applications may be showing here? (Since
Eudora doesn't have them. Or are they there now?)
get every message of folder "inbox" where the display name of the
address of its first recipient is "New Entourage User"
>
>
You can tell how often I've used Entourage :-)
>
But I've noted that you've been pasting in 'tell application "Microsoft
Entourage"' recently rather than OE. Maybe the new standalone price (where
you don't have to buy Word and Excel and PPT) has caused a "Delacour
effect"?
--
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.