There are currently 962 people in my Address Book, of which 231 of them have accompanying images. It’s very time-consuming to:
- Find the next entry without a photo
- Locate an image of the person
- Attach the photo to the entry
To make things go a little faster, I wrote an AppleScript that deals with step one.
property groupName : “No Image”
tell application “Address Book”
set theGroup to group named groupName
repeat with aPerson in people
if not image of aPerson then
on error errMsg number errNum
if errNum is -2763 then add aPerson to theGroup
Make sure that you have a group named
groupName before running this script. Error number -2763 occurs when the image does not exist in the person. The script then adds that entry into the selected group. As you add photos to entries, remove all the people from the group and run the script again to repopulate the group.
My next step will be to write an AppleScript that searches through my image catalog for the person’s name. That will be for another day, however.
1 thought on “Address Book and Images”
useful script, thanx!
SIDE DISH: i was stunned to see that you cant make nested smart folders in AB. awright, so i managed to get the nopic group as advised by adam, but then i dont want to take time with all the ppl in my AB, but just those that are on my cell phone (of course i have a smart group for that). now imagine i would like to “merge” the nopic group and my cell phone group by creating a third, so called “smart” group. you guessed it – its not possible to create a smart group based on two other groups. now how smart is that?