Telling iCloud from OnMyMac in Contacts
Telling iCloud from OnMyMac in Contacts
- Subject: Telling iCloud from OnMyMac in Contacts
- From: Gil Dawson <email@hidden>
- Date: Sat, 27 Feb 2016 13:06:56 -0800
From some experimenting, I *think* I may have found a way to discriminate between people in iCloud vs OnMyMac. In my experiments so far, iCloud people are in an invisible group called "card"; people On My Mac are not:
tell application "Contacts"
set theJasons to people whose name begins with "Jason" log "#Jasons = " & (count of theJasons)
repeat with somePerson in theJasons tell somePerson -- log "" & name & " id=" & id set hisGroups to (name of groups as list) log "hisGroups=" & hisGroups if hisGroups contains "card" then log "iCloud" else log "on my Mac" end if end tell end repeat end tell
--> (*#Jasons = 4*) (*hisGroups=card*) (*iCloud*) (*hisGroups=card*) (*iCloud*) (*hisGroups=RUAS*) (*on my Mac*) (*hisGroups=*) (*on my Mac*)
My Contacts -> Preferences -> General -> default account had been iCloud and all the names and the groups were in both categories.
I changed the default to On My Mac and deleted the first Jason from the iCloud group RUAS.
The second Jason was never in any group.
Then I ran the script.
Can this be trusted to discriminate these categories?
--Gil
|
_______________________________________________
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