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 |