Get Item Number of List Item Choice?
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