On 8/9/03 3:04 PM, "Allen Watson" <[EMAIL PROTECTED]> wrote:
> What you probably want to look at is "default email address", not "email
> address." "Email address" is really an element, not a property, and a
> contact can (as you no doubt know) have several.
I think the problem there is that not every contact has an email address, so
then 'default email address' errors for those contacts.
Thus
set ourStaff to every contact whose default email address contains
"@acme.com.au"
might have caused your crash - there's no sort of 'try' block that can
protect against the errors, aside from getting nothing at all.
A repeat loop is the only way to go. There's one way that might speed things
up:
set emailList to (every email address of aContact) as string
if emailList contains "@acme.com.au" then...
That should do it, without even having to worry about the text item
delimiters. And 'contains' operating on a string is MUCH MUCH faster than
operating on a list, or a second nested repeat loop for each element of the
main repeat loop.
--
Paul Berkowitz
--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>