I have a need to select multiple items from a list (sometimes lists of hundreds of items).
After getting the selection, I need the index into the list of each item selected. Is there an easy way to do this?
An example:
set ListOfSelections to {"String 1", "String 2", "String 3", ..., "String n"}
set r to choose from list ListOfSelections with prompt "Pick one or more:" with multiple selections allowed
Assuming I select "String 2", "String 3" and "String n", r contains a list {"String 2", "String 3", "String n"}
I need to know that the first string of the selection is item 2 of the original list, the second string of the selection is item 3 of the original list and the third string of the selection is item n of the original list. Is there a way to return the item number of the original list instead of the selections themselves, or do I now need to search the original list to pick out the positions?
TIA,
Jim Brandt
|