• 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: Custom Dates in Address Book
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Dates in Address Book


  • Subject: Re: Custom Dates in Address Book
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 09 May 2005 12:17:21 -0700

On 5/9/05 11:42 AM, "Todd Geist" <email@hidden> wrote:

> I somehow got a bunch of meaningless dates in my Custom Dates.  I
> would like to scrap the lot of them and start over.
>
> I can't seem to figure out how to do this for custom dates.  I wrote
> a script to do it for birth days, but the same structure doesn't work
> for dates.
>
>
> here is what I have for birth days:
>
> tell application "Address Book"
>
>      set the_contacts to every person
>      repeat with i from 1 to number of items in the_contacts
>          set this_contact to item i of the_contacts
>
>          tell this_contact to delete birth date
>          --    tell this_contact to delete custom date 1
>          --    this doesn't work
>      end repeat
>
> end tell

You should only be able to delete elements, not properties. Custom dates are
elements, birth date is a property. I'm surprised (and impressed, sort of)
that selecting birth date works. I would have thought you'd have to

    set birth date of this_contact to missing value

I don't have time to test just now, but you ought to be able to

    repeat with i from (count custom dates of this_contact)
        delete custom date i of this_contact
    end repeat

Always delete in backwards order when using the index. Just possibly that's
the problem here. Also trry:

    repeat with i from (count custom dates of this_contact)
        set cd to item i of (custom dates of this_contact)
        delete cd
    end repeat

But there were delete errors of AIM Handles, etc. in Jaguar's Address Book
(fixed in Panther, I seem to recall). So maybe something similar is
happening with custom dates. I'll test when I can and see if I get the same.


--
Paul Berkowitz


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Custom Dates in Address Book (From: Todd Geist <email@hidden>)

  • Prev by Date: Another Display dialog question
  • Next by Date: Re: [OT] When will Apple learn?
  • Previous by thread: Custom Dates in Address Book
  • Next by thread: Another Display dialog question
  • Index(es):
    • Date
    • Thread