Re: Coordinating lists
Re: Coordinating lists
- Subject: Re: Coordinating lists
- From: Arthur J Knapp <email@hidden>
- Date: Tue, 02 Apr 2002 18:17:01 -0500
>
Date: Tue, 02 Apr 2002 14:17:30 -0500
>
Subject: Coordinating lists
>
From: Fraser <email@hidden>
>
set list1 to {"Apple", "Banana", "Grape", "Orange"}
>
set list2 to {34, 56, 56, 8}
>
set theItem to choose from list list1
>
set theNum to 0
>
set theCode to 0
>
display dialog ("You chose " & theItem & ", Item " & theNum & ", Code " &
>
theCode) as string
set list1 to {"Apple", "Banana", "Grape", "Orange"}
set list2 to {34, 56, 56, 8}
set theItem to choose from list list1
set theItem to theItem's item 1 --> cfl returns a list
repeat with i from 1 to list1's length
if (list1's item i = theItem) then
set theNum to i
exit repeat
end if
end repeat
set theCode to list2's item theNum
"You chose " & theItem & ", Item " & theNum & ", Code " & theCode
--
--> "You chose Grape, Item 3, Code 56"
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
<
mailto:email@hidden>
try
<
http://www.VivaLaData.com/>
on error number -128
end try
}
_______________________________________________
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.