How can I determine whether or not a contact with a given e-mail address exists in the Address Book?
问题 I'm attempting to create a script that "walks" through a mailbox, checks the Address Book to see if the e-mail's sender is already there, and adds the contact to an Address Book group if found. If the e-mail's sender isn't found, a new contact would be created before it was added to the group. So far, I've got this for the group adding part: on addPersonToGroup(person) tell application "Address Book" add person to group "wedding guests" end tell save addressbook end addPersonToGroup and this