Running the following AppleScript loop to remove all entries from Mac Contacts...
tell application "Contacts"
set countPeopleBefore to count of people
repeat while (count of people) is greater than 0
set thisPerson to person 1
delete thisPerson
end repeat
set countPeopleAfter to count of people
end tell
Two curious things...
countPeopleBefore
is greater than 0 andcountPeopleAfter
= 0, suggesting everything worked fine.- Nonetheless all the entries remain in Contacts -- undeleted -- after this script completes.
Questions:
- Why?
- Is that a bug?
- Is there a more effective way to delete all entries in Contacts?