• 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
Re: a bit of Help on Contacts (addressBook)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a bit of Help on Contacts (addressBook)


  • Subject: Re: a bit of Help on Contacts (addressBook)
  • From: TS Kamath <email@hidden>
  • Date: Sun, 18 Jan 2015 08:49:52 +0530

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.


On 17-Jan-2015, at 1:59 pm, TS Kamath <email@hidden> wrote:

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




 _______________________________________________
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

  • Follow-Ups:
    • Re: a bit of Help on Contacts (addressBook)
      • From: TS Kamath <email@hidden>
References: 
 >a bit of Help on Contacts (addressBook) (From: TS Kamath <email@hidden>)

  • Prev by Date: Re: Yosemite and activate failures
  • Next by Date: Re: Script libraries
  • Previous by thread: a bit of Help on Contacts (addressBook)
  • Next by thread: Re: a bit of Help on Contacts (addressBook)
  • Index(es):
    • Date
    • Thread