• 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: Address Book scripting bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Address Book scripting bug


  • Subject: Re: Address Book scripting bug
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 27 May 2004 11:45:27 -0700

On 5/27/04 9:45 AM, "Michelle Steiner" <email@hidden> wrote:

> I just reported the following bug to Apple:
>
> The applscript expression "date string of creation date of person 1"
> results in "NSCannotCreateScriptCommandError"
>
> However, the following works:
> set foo to (creation date of person 1)
> date string of foo
>
> This means that you can't have this construct:
>
> tell Application "Address Book"
> set TodaysPeople to the people whose (date string of creation date)
> is date string of (current date)
> end tell

It's just how Address Book and other Cocoa apps work. There are about a
million "bugs" like this, if you want to consider it a bug.

Just do

date string of (get creation date of person 1)

for the first.

It's true you can't do whose clauses when a property of a property is
required like this. That's not a bug, just a limitation. As a workaround:



set today to date (date string of (current date))

tell application "Address Book"
set TodaysPeople to the people whose creation date > today
end tell


--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Address Book scripting bug
      • From: Michelle Steiner <email@hidden>
References: 
 >Address Book scripting bug (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Finder script to move files
  • Next by Date: Re: Process whose frontmost *was* true?
  • Previous by thread: Address Book scripting bug
  • Next by thread: Re: Address Book scripting bug
  • Index(es):
    • Date
    • Thread