I have the following applescript to add contacts from the command line
on run {firstName, lastName, workPhone, mobilePhone, workstreet, workzip, workcity, snr}
tell application "Contacts"
set theDate to current date
if theDate is not missing value then
set theDate to current date
else
set theDate to current date
end if
set thePerson to make new person with properties {first name:firstName, last name:lastName}
tell thePerson
make new phone at end of phones with properties {label:"Work", value:workPhone}
make new phone at end of phones with properties {label:"Mobile", value:mobilePhone}
make new address at end of addresses with properties {label:"Work", street:workstreet, city:workcity, zip:workzip}
make new custom date at end of custom dates with properties {label:"Aufnahme", value:theDate}
make new social profile at end of social profiles with properties {service name:"Schadennummer", user name:snr}
end tell
save
end tell
end run
if I run
osascript kontakt.scpt Donald Duck 0133333 012345678999 Gansweg 11111 Entenhausen 120-RS-16-831222-2
i get the following
missing value