I am trying to get rid of duplicate names in my address book, based on first names. This is the script I wrote. It runs, but does not seem to do anything. Anyone know why?
tell application "Address Book"
set y to {}
set x to name of every person in group "search"
repeat with p in x
if p is not in y then
set end of y to p
else
delete person p
save addressbook
end if
end repeat
end tell