• 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: How to retrieve items from list?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to retrieve items from list?


  • Subject: Re: How to retrieve items from list?
  • From: Paul Skinner <email@hidden>
  • Date: Tue, 05 Dec 2000 17:00:14 -0500

> I bought Danny Goodman's book (GREAT!), and am reading and learning
> as
> fast as I can -- but mastering this one feat is harder than I
> imagined.\
I know when I started, it all seemed whacked.

the most basic way...

set thelist to {"one", "two", "three"}
repeat with x from 1 to the length of thelist
set itemname to item x of thelist
end repeat

or neater...

repeat with thisitem in thelist
set thisitem to thisitem as text
--this converts a reference (item 1 of thelist of +script;) to "one"
end

--
Paul Skinner
Ron Chapple Studios

> Assuming I have a list containing say, 15 items:
>
> set itemList to {"one", "two", "three", "four", "five"...} -- and
> so on to "fifteen"
>
> How can I structure a repeat loop that will retrieve, incrementally,
>
> left to right, one item with each repetition and make it the value
> of
> a variable (itemName)?
> Michael


References: 
 >How to retrieve items from list? (From: Michael Sidoric <email@hidden>)

  • Prev by Date: Re: How to retrieve items from list?
  • Next by Date: Re: Name of Finder
  • Previous by thread: Re: How to retrieve items from list?
  • Next by thread: Re: How to retrieve items from list?
  • Index(es):
    • Date
    • Thread