• 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: Best Method to Filter Lists?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Method to Filter Lists?


  • Subject: Re: Best Method to Filter Lists?
  • From: Christopher Stone <email@hidden>
  • Date: Fri, 10 Jun 2016 04:43:03 -0500

On Jun 09, 2016, at 21:52, Jim Underwood <email@hidden> wrote:
Maybe I missed it (after much searching), but I haven't found a good, generic, handler to filter lists, using native AppleScript.
______________________________________________________________________

Hey Jim,

Many have been written over the years.

Your handler looks pretty good.

Yvan's method of transforming a list in place works well.

Another handy tool is to use filter-forms that list-objects do understand.

-------------------------------------------------------------------------------------------

set the name_list to {"Rob", "Sal", "Wanda", "Sue", "Robert"}

repeat with i in name_list
   if i contains "rob" then set contents of i to 0
end repeat

set name_list to text of name_list

name_list

-------------------------------------------------------------------------------------------

set the name_list to {"Rob", "Sal", "Wanda", "Sue", "Robert", 1, 2, 3, 1.5, 2.7, {x:"Xval", y:"yVal"}}

text of name_list
reals of name_list
integers of name_list
records of name_list

-------------------------------------------------------------------------------------------

--
Take Care,
Chris

 _______________________________________________
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: Best Method to Filter Lists?
      • From: Jim Underwood <email@hidden>
References: 
 >Best Method to Filter Lists? (From: Jim Underwood <email@hidden>)

  • Prev by Date: Getting Individual Metadata Items with ASObjC
  • Next by Date: Re: HTML parsing--need to be able to click on parsed elements
  • Previous by thread: Re: Best Method to Filter Lists?
  • Next by thread: Re: Best Method to Filter Lists?
  • Index(es):
    • Date
    • Thread