• 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: List filtering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List filtering


  • Subject: Re: List filtering
  • From: "Mark J. Reed" <email@hidden>
  • Date: Thu, 2 Sep 2010 00:00:29 -0400

AFAIK, nope, you can't do that.  The "whose"/"where" filtering is not
a general feature of the language; it's special and only shows up in
some places.

Your best bet is probably a loop.

You could always call out to the shell:

set myFileList to text items of myFiles
set text item delimiters to linefeed
set myPNGs to paragraphs of (do shell script "grep '\\.png$' <<<" &
quoted form of (myFileList as text))

But even I think that's silly in this case. :)



On Wed, Sep 1, 2010 at 11:51 PM, Alex Zavatone <email@hidden> wrote:
> I've got a list of file aliases and I can do this just fine:
> set myList to (every text item of myFiles) as list
> But I'm trying to see if I can filter the text items as I get them like
> this:
> set myList to (every text item of myFiles whose text ends with "png") as
> list
> Of course that throws an error.  I've been working at this for a few hours.
>  Does anyone know if I can do this in one line?
> Thanks
> - Alex
>  _______________________________________________
> 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
>



--
Mark J. Reed <email@hidden>
 _______________________________________________
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: List filtering
      • From: Alex Zavatone <email@hidden>
References: 
 >List filtering (From: Alex Zavatone <email@hidden>)

  • Prev by Date: List filtering
  • Next by Date: Re: List filtering
  • Previous by thread: List filtering
  • Next by thread: Re: List filtering
  • Index(es):
    • Date
    • Thread