New Card in Address Book?

Hi… I don’t know how I’m missing this, but I’m looking for the AppleScript command that will generate a new card in Apple’s Address book. I’ve tried make new card, make new person, make new document, etc. but to no avail.
Anybody know this one? Thanks.

I’m not positive on this, but try this:

Tell app "Address Book"
Add Contact Info
End Tell

Of course, you’ll have to add in the actual info for the person.

“Add” is for adding objects to existing cards:

From the Address Book Dictionary:
add: Add a child object.
add entry – object to add.
to reference – where to add this child to.

I’m looking to make an entirely new card.

The trick with “make” is you usually have to tell AppleScript where to make it. You’re probably leaving out the “at end of people” part…

try this:


tell application "Address Book"
	set newPerson to make new person at end of people with properties {first name:"John", middle name:"Clifford", last name:"Doe", suffix:"Jr"}
	tell newPerson
		make new email at end of emails with properties {value:"john@doe.com"}
	end tell
end tell

And in the future, it’s more helpful to post a snippet of what you are trying rather than just describing it. Otherwise people don’t know what you’re really trying to do.