Re: Coordinating lists
Re: Coordinating lists
- Subject: Re: Coordinating lists
- From: Mr Tea <email@hidden>
- Date: Tue, 02 Apr 2002 22:32:31 +0100
This from Fraser - dated 2/4/02 08:17 pm:
>
I need to get an item's position and value based on a choice from another
>
list. The values in lines 4 and 5 are placeholders. Any pointers?
How 'bout this:
set list1 to {"Apple", "Banana", "Grape", "Orange"}
set list2 to {34, 56, 56, 8}
set theItem to choose from list list1
set counter to 1
repeat until theItem as string = item counter of list1
set counter to counter + 1
end repeat
set theNum to counter
set theCode to item counter of list2
display dialog ("You chose " & theItem & ", Item " & theNum & ", Code " &
theCode) as string
(Tested with OS 9.2.2/AS 1.8.2b3)
Mr Tea
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.