Re: Address Book: Getting a reference to email by ID
Re: Address Book: Getting a reference to email by ID
- Subject: Re: Address Book: Getting a reference to email by ID
- From: Matthew Smith <email@hidden>
- Date: Sat, 12 Apr 2008 00:27:02 +1000
- Thread-topic: Address Book: Getting a reference to email by ID
on 12/04/2008 00:12 , Michelle Steiner at email@hidden wrote:
> On Apr 11, 2008, at 6:29 AM, Timothy Bates wrote:
>
>> tell application "Address Book"
>> set myGuy to item 1 of (every person whose id is
>> "E28F0E618-55D1-4E37-BC2A-A1D6FCB2B3AE:ABPerson")
>> set x to every email of myGuy whose label is "work"
>> return value of item 1 of x
>> end tell
>
> Observation about scripting style: I would have written it like this:
>
> tell application "Address Book"
> set myGuy to item 1 of (people whose id is "E28F0E618-55D1-4E37-BC2A-
> A1D6FCB2B3AE:ABPerson")
> return item 1 of (every email of myGuy whose label is "work")
> end tell
Couldn't you say that as:
tell application "Address Book"
set myGuy to person id "E28F0E618-55D1-4E37-BC2A-A1D6FCB2B3AE:ABPerson"
return item 1 of (every email of myGuy whose label is "work")
end tell
Why would you say "whose id is..." when you can just refer to the person by
the id?
--
Matthew Smith
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden