Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A way to review duplicates in Contacts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A way to review duplicates in Contacts
Authored by: peterpk on Mar 18, '13 11:03:46AM

The poster asked for a way to eliminate the manual copy/paste. This Applescript ought to do it. It can be saved to a file, such as "listgroup.script", and then called from the command line as osascript listgroup.script >dupe_search.txt. Note that the group name is hardcoded right now, because this was done quickly.

tell application "Contacts"
        set myNames to name of every person in group "SomeGroup"
        set myEmails to value of first email of every person in group "SomeGroup"
        set mylist to {}

        repeat with m from 1 to count of myNames
                set end of mylist to ((item m of myNames & " <" &amp; item m of myEmails &amp; ">") as string)
        end repeat

        set tid to Applescript's text item delimiters
        set Applescript's text item delimiters to ASCII character 10
        get mylist as string
        set Applescript's text item delimiters to tid
end tell

Edited on Mar 18, '13 11:04:41AM by peterpk


[ Reply to This | # ]
A way to review duplicates in Contacts
Authored by: robleach on Mar 18, '13 11:37:05AM

Perhaps a droplet would be in order that creates the text file using the dropped contacts... or a script that gets selected contacts and exports the email addresses to a file. I like your scripting solution.



[ Reply to This | # ]