• 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: where and whose (what and why?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: where and whose (what and why?)


  • Subject: Re: where and whose (what and why?)
  • From: Jon Pugh <email@hidden>
  • Date: Sun, 25 May 2003 22:21:23 -0700

At 1:37 PM +0930 5/26/03, Nathan Day wrote:
>I have never been able to work out the where or whose filter, they sometimes work and sometimes don't, can someone explain to me why this is, for example the follow script work
>
> tell application "Finder"
> every item of folder (choose folder) where its name begins with "a"
> end tell

The Finder implements this one.


>but none of the following do
>
> set theText to "aa bb cc dd ab bc cd de"
> every word of theText whose first character is "a"
>
> set theText to {"aa", "bb", "cc", "dd", "ab", "bc", "cd", "de"}
> every item of theText whose first character is "a"
>
> set theText to "aa bb cc dd ab bc cd de"
> every word of theText where it begins with "a"
>
> set theText to "aa bb cc dd ab bc cd de"
> every word of theText where it is in {"ab", "aa"}
>
> tell application "Finder"
> set theList to every item of folder (choose folder)
> every item of theList where its name begins with "a"
> end tell

These are all whose clauses on lists. AppleScript should implement all of these, but it doesn't. This is near the number one feature request these past 10 years.

Note that the Finder doesn't implement whose clauses with respect to lists either.

Jon
_______________________________________________
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.

References: 
 >where and whose (what and why?) (From: Nathan Day <email@hidden>)

  • Prev by Date: where and whose (what and why?)
  • Next by Date: Re: URL Access/IE5.x download question...
  • Previous by thread: where and whose (what and why?)
  • Next by thread: Re: where and whose (what and why?)
  • Index(es):
    • Date
    • Thread