For obvious reason the “Contact" are using Default Account “iCloud” to sync all the iPads, iPhones & Mac’s..
Unfortunately because the contacts are added via the iPhone and the sync is for iCloud Only (default Account > Contact Preference).. "On My Mac” contacts go out of sync.. hence an attempt to find & fix the sync between “All iCloud” and “All on My Mac" using AppleScript..
on my working Mac I use the "On My Mac" to Create groups locally for myself for specific jobs.. and do not want these on iCloud because they will sync with all the devices..
tell application "Contacts" set myGroup to name of groups -- "All iCloud" the default Group created by Contacts.. is not Scriptable hence -- make a group in iCloud --> ""my iCloud"" and add all contacts from "All iCloud" to it set myPeople_iCloud to people of group "my iCloud" -- "All on My Mac" the default Group created by Contacts.. is not Scriptable hence -- make a group in On My Mac --> ""my Mac"" and add all contacts from "All on My Mac" to it set myPeople_Mac to people of group "__my Mac" if (count of myPeople_iCloud) is not equal to (count of myPeople_Mac) then -- find the missing card display alert "People in Mac : " & (count of myPeople_Mac) & return & "People in iCloud : " & (count of myPeople_iCloud) end if -- > People in Mac : 1914 -- > People in iCloud : 1917 end tell
because I cannot get the contents of default groups “All iCloud” nor “All on My Mac, The workaround of creating my own group as above but this defeats the purpose of automation, because every-time I would still have to update the groups manually with the default groups.
If the Guru can guide on this….
Srikanth Kamath PS: I thank Yvan KOENIG for helping me out to learn AppleScript, 6 years back.
Hi,
with Contacts Now have two Groups “iCloud” and “On My Mac”, how do we get contacts only in “iCloud”
tell application "Contacts" set rawName to name of people
end tell
rawName contains people's from “iCloud” & “On My Mac”…. am a bit lost lost..?
Regards & Thanks Srikanth Kamath |