• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Telling iCloud from OnMyMac in Contacts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Adding a person to a group in Contacts
  • Next by Date: Re: Adding a person to a group in Contacts
  • Previous by thread: Re: Adding a person to a group in Contacts
  • Next by thread: How to tell Window Class/Type in Outlook 2011
  • Index(es):
    • Date
    • Thread