Re: help in scripting Address book
Re: help in scripting Address book
- Subject: Re: help in scripting Address book
- From: Michael Terry <email@hidden>
- Date: Wed, 26 Nov 2003 15:58:42 -0800
On Nov 26, 2003, at 1:36 PM, Gordon Beckhart wrote:
want to read the phone numbers in Applescript. How does one get the
home or work or other phone numbers?
frustrated in Jersey
gordon Beckhart
Here's one way:
tell application "Address Book"
set friendToFind to first person whose name is "BJ" and last name
isn't "Smith"
set hisNumbers to value of every phone of friendToFind
end tell
It can be a little confusing reading application dictionaries. Under
the 'Address Book Script Suite' you can find the relevant classes. You
might naturally think that (the only slightly oddly named) 'phone'
class is what you're looking for, and you'd be right. But make sure you
understand that where it lists 'contact info' next to '<inheritance>',
what it's saying is that you need to check the 'contact info' class to
find inherited properties which also apply to this class. So, when the
script above references 'value', it is asking for a property of the
'phone' class which was inherited from 'contact info'. Make sense?
Cheers,
Mike
_______________________________________________
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.