• 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
can't delete custom dates in address book (was Re: Deleting address book fields)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

can't delete custom dates in address book (was Re: Deleting address book fields)


  • Subject: can't delete custom dates in address book (was Re: Deleting address book fields)
  • From: Timothy Bates <email@hidden>
  • Date: Wed, 7 Nov 2007 11:58:59 +0000

hmm. seems the case. I added a bugreport (5584812)

The user can create custom dates in contacts in Addressbook using applescript, but they cannot delete them tell application "Address Book" -- 1 make a custom date to play with make new custom date at end of custom dates of person 1 with properties {label:"blind date", value:current date} save addressbook --2 check that it is there tell person 1 to return properties of every custom date end tell tell application "Address Book" --3 THE BUG try and delete it delete (every custom date whose label is "anniversary") of person 1 --fails delete custom date 1 of person 1 --also fails end tell


On 28 Sep 2007, at 8:16 PM, Christopher Nebel wrote:

On Sep 26, 2007, at 9:52 PM, Rob Lewis wrote:

Many entries in my Address Book file have one or more custom date fields labeled "NC Mod Date". I want to go through the whole file and delete all these fields. The following doesn't seem to work. What am I doing wrong? 


tell application "Address Book"

set no_persons to (count every person)

repeat with p_no from 1 to no_persons

try

tell person p_no
delete (every custom date whose label is "NC Mod Date")
end tell

end try

end repeat

end tell

I'm not sure that you're doing anything wrong -- that's exactly the syntax that ought to work, and it does work with other contact info types, such as phones, emails, and addresses.  This looks like a bug in Address Book to me.


--Chris Nebel
AppleScript Engineering


 _______________________________________________
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: Re: Print-to-PDF
  • Next by Date: do shell problem
  • Previous by thread: Scripting Pages 3.0 Page Layout documents
  • Next by thread: do shell problem
  • Index(es):
    • Date
    • Thread