ET00880
December 24, 2007, 1:31am
#1
I just started working with Applescript and I’ve been searching for a script that will remove duplicate contacts, but not just based on first and last name. Thanks! ET
Model: Mac Mini
AppleScript: 1.10.7
Browser: Safari 523.12
Operating System: Mac OS X (10.4)
StefanK
December 24, 2007, 8:15am
#2
Hi,
the built-in function (menu card) in Address Book isn’t sufficient?
ET00880
December 24, 2007, 3:32pm
#3
Im sorry but Im not familiar with a built-in Menu Card.
Thanks in advance!
Model: Mac Mini
AppleScript: 1.10.7
Browser: Safari 523.12
Operating System: Mac OS X (10.4)
StefanK
December 24, 2007, 3:36pm
#4
In the menu “card” of the main menu is an item “Look for duplicates.”, have you seen this?
ET00880
December 24, 2007, 10:07pm
#5
This is the first time I’ve ever seen that tool but I discovered with a test that it is case sensitive. Which will be a big draw back since Im looking at about 2000+ contacts. Thanks!
Model: Mac Mini
AppleScript: 1.10.7
Browser: Safari 523.12
Operating System: Mac OS X (10.4)
You could probably work something out from this script
(*
The script will Find the duplicate Entries in Your AddressBook.app and put them into a New Group Called "Duplicate Entries" Allowing you to easly compare and edit them.) ***NOTE: The script will ADD a NEW GROUP IN YOUR ADDRESS BOOK : NAMED "Duplicate Entries" if it does not exist:
Details found at - http://www.macosxhints.com/comment.php?sid=20060322202753429
or
http://bbs.applescript.net/viewtopic.php?id=16646
Written by © Mark Hunte - 2006 *)
tell application "Address Book"
set biglist to {}
if not (exists (group "Duplicate Entries")) then
make new group with properties {name:"Duplicate Entries"}
end if
set the_names to the name of every person as list
repeat with i from 1 to number of items in the_names
set this_Name to item i of the_names
set theName to name of person this_Name as string
if this_Name is not in biglist then
copy this_Name to end of biglist
else
add (people whose name is theName) to group "Duplicate Entries"
end if
end repeat
save addressbook
end tell
ET00880
December 28, 2007, 11:57pm
#7
Thanks! I figured out a way to make it so only one stays and it removes the duplicate!
Model: Mac Mini
AppleScript: 1.10.7
Browser: Safari 523.12
Operating System: Mac OS X (10.4)