This is exactly the same problem I asked about on this list in 2012-05-01, but I never got any reply, and the problem is the same in ML as in Lion. Therefore I "bump" the question now with a new subject line, in the hope that either Contacts or some inhabitant of this list has become "smarter" the last few months...
There is a bug when adding an entry (a person) to a group when that group resides in "On My Mac" rather than in iCloud while "Default Account" is iCloud. I want to know if anyone knows a way around that problem?
Consider this in Lion (Address Book) or ML (Contacts), while "Default Account" is iCloud, but the group "myGroup" is in "On My Mac":
tell application "Contacts" make new person at group "myGroup" with properties {first name:"aFirstName", last name:"aLastName"} save end
The result is that the script will create the entry in iCloud but no linking to any group. That is a bug -- it should have created the entry in "On My Mac" and linked it to the named group, since the group resides in "On My Mac".
If myGroup is in iCloud, however, then it works.
I can manually change the Default Account to "On My Mac" which makes it work correctly with the group residing in "On My Mac", but the dictionary does not specify any terms related to "Default Account", or where a group is stored, so the thing is not scriptable.
FYI: the reason I have some groups in iCloud and some other groups On My Mac is pretty obvious: There are some large groups I simply do not want to be seen on the iPhone, and this way of structuring the groups appears to be the only way to make this happen.
Solutions?
--heb
|