There appears to be a bug when adding an entry (a person) to a group when that group resides in "On My Mac" rather than in iCloud, if "Default Account" is iCloud. However, I want to know if anyone knows the "proper way" around that?
If I do this in Lion, while "Default Account" is iCloud: tell application "Address Book" make new person at group "myGroup" with properties {first name:"aFirstName", last name:"aLastName"} save end
then it will only work ok if myGroup is in iCloud. But if the group is in "On My Mac" instead, the script will create the entry in iCloud but no linking to any group. I assume that is a bug -- it should have created the entry in "On My Mac" and linked it to the named group.
I can manually change the Default Account to "On My Mac" which makes it work correctly with groups "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 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
|