add contact to carddav with applescript
add contact to carddav with applescript
- Subject: add contact to carddav with applescript
- From: Shoddy <email@hidden>
- Date: Mon, 24 Jun 2013 09:08:20 +1000
Hi all,
Im fairly new to applescript, although i have successfully added a new contact to the contacts app locally however i can not get it to add the contact to the carddav account or in the group of the carddav account.
My code so far is
tell application "Contacts"
set thePerson to make new person with properties{first name:"Joe", last name:"Bloe"}
make new phone at end of phones of thePerson with properties{label:"mobile", value: "0422123456"}
make new email at end of emails of thePerson with properties{label:"Work", value: "
email@hidden"}
save
end tell
If i try to do
add thePerson to group "TestGroup"
With TestGroup being a group in the carddav account the error i get is
Contacts got an error: You can only add a person to a group.
The machine i am using is the carddav server as well.
I am also using the latest version of os x. 10.8.4 with all software updates completed.
With Thanks
Brendon Schodel
--
Shoddy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden