Skip to content

Instantly share code, notes, and snippets.

@deasmi
Created January 7, 2012 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deasmi/1574406 to your computer and use it in GitHub Desktop.
Save deasmi/1574406 to your computer and use it in GitHub Desktop.
Create group of contacts with pictures in Mac address book
tell application "Address Book"
try
set picGroup to group "Contacts with Pictures"
on error
set picGroup to make new group with properties {name:"Contacts with Pictures"}
end try
repeat with ThisOne in people
if (count of image of ThisOne) > 0 then
add ThisOne to picGroup
end if
end repeat
save
"Done"
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment