Hi all, I would like to show a person in the Address Book application. I know the ID of the person, and so far I can show Address Book with the person selected, but *only* if the person is in the group the user currently has selected in Address Book.
Here's my code:
tell application "Address Book" to activate
tell application "Address Book"
set thePerson to first person whose id is "3ED8E6A0-5AF3-4BE5-8713-C4D82C9A7174:ABPerson"
set selection to thePerson
end tell
How do I get Address Book to select the "All Contacts" group first, or switch to the card only view so that I am sure it will be able to show the person? Or is there another way to accomplish this?
Note: this is part of a commercial application, and as such I don't want to have to get people to turn on UI scripting, just to use this feature.
Thanks