• 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: find a list item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find a list item


  • Subject: Re: find a list item
  • From: Steve Thompson <email@hidden>
  • Date: Wed, 01 Apr 2009 17:17:06 +0100


On 1 Apr 2009, at 16:34, Yvan KOENIG wrote:


Le 1 avr. 2009 à 17:03, Ronald Hofmann a écrit :

Hi,
I have a list with a few items and I want to find all items with "iso"
My attempts do not work.

Any clues?

set theListe to {"Iso", "not", "Iso", "not", "Iso"}
get items in theListe where it contains "iso"

set theListe to {"Iso", "not", "Isocele", "not", "Isotope"}
set available to {}
repeat with i from 1 to count of theListe
if item i of theListe contains "Iso" then copy i to end of available
end repeat
available

Will return {1,3,5}. You need either

set theListe to {"Iso", "not", "Isocele", "not", "Isotope"}
set available to {}
repeat with anItem in theListe
if anItem contains "Iso" then copy anItem as string to end of available
end repeat

or

set theListe to {"Iso", "not", "Isocele", "not", "Isotope"}
set available to {}
repeat with i from 1 to count of theListe
if item i of theListe contains "Iso" then copy item i of theListe to end of available
end repeat

Steve
 _______________________________________________
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: find a list item
      • From: Yvan KOENIG <email@hidden>
References: 
 >Re: Moving large PDF files with Applescript (From: "John C. Welch" <email@hidden>)
 >find a list item (From: Ronald Hofmann <email@hidden>)
 >Re: find a list item (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: find a list item
  • Next by Date: Re: Moving large PDF files with Applescript
  • Previous by thread: Re: find a list item
  • Next by thread: Re: find a list item
  • Index(es):
    • Date
    • Thread