On Jul 18, 2004, at 8:54 PM, John Delacour wrote:
At 5:24 pm -0700 18/7/04, Chris Nandor wrote:
I can't see a way. If someone can tell me how to do it in AppleScript, I
can convert it to Mac::Glue. But I can't see how to do it in AppleScript
either.
tell app "Address Book" to get the value of the first email of person "1&1 Ltd"
tell app "Address Book" to get the value of the first email of person "1&1 Ltd" whose label is "work"
etc.
It's all clear in the dictionary.
Those don't do what I'm talking about - look for a person who has a given email address. Your examples will show the email address for a person who has a given name.
If I understand the dictionary correctly, I could find an email object with a given value ($glue->obj(email => whose(value => equals => '[EMAIL PROTECTED]'))), but I don't know how I'd go from that to its parent (the person object).
Chris, I think at application startup I can build a map of lc($email) => $person. That will be faster than an app query anyway. Thanks for the suggestion.
-Ken