tell application "Address Book" to set N to name of every person
set D to {}
set NT to {}
repeat with I in N
if contents of I is not in NT then
set NT's end to contents of I
else
set D's end to contents of I
end if
end repeat
end
Now search for the names in D and choose one, deleting the other.
Wow, thanks you both, I guess there is no what to just open the contacts up in new windows for someone to manually review them with out having to search them out and flip back and forth between them ?
Address Book doesn’t have a “New Window” command. You can only see one at a time. The possibilities for what you might want to know are large too, so a nice presentation of all the data for two would be quite messy to construct. Besides, running my version, I’ve eliminated the two dupes that showed up
so heres what I ended up doing and don’t get me wrong I don’t like to GUI script
tell application "Address Book"
set firstName to "Joe"
set lsatname to "Shmoe"
set listOfContacts to every person whose first name is firstName and last name is lastName
if (count of listOfContacts) is greater than 1 then
activate
delay 1
tell application "System Events"
tell process "Address Book"
keystroke "f" using command down
keystroke firstName & space & lastName
keystroke tab
delay 1
keystroke tab
delay 1
keystroke tab
delay 1
keystroke "a" using command down
keystroke return
end tell
end tell
end if
end tell