• 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
Get Item Number of List Item Choice?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get Item Number of List Item Choice?


  • Subject: Get Item Number of List Item Choice?
  • From: Johnny AppleScript <email@hidden>
  • Date: Tue, 12 Oct 2004 12:10:52 -0600

Title: Get Item Number of List Item Choice?
Is there a better way to do this?

set theList to {"A", "B", "C", "D"}
set theChoice to (choose from list theList) as string
set n to 0
repeat with i from 1 to number of items in theList
    
set x to item i of theList
    
set n to n + 1
   
if x is theChoice then exit repeat
end
repeat
return
n

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Get Item Number of List Item Choice?
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: String to sum
  • Next by Date: Test image properties?
  • Previous by thread: Mail.app plugin based on email address
  • Next by thread: Re: Get Item Number of List Item Choice?
  • Index(es):
    • Date
    • Thread