index = listbox.selectedItems;
collection = listbox.selectedItems;
If the control is a single selection listbox then this property returns the index of the current selection. If the listbox allows multiple selections the property returns a collection object which contains indices of all selected items.
// Print the indices of all selected items
for (i=0; i<listbox.selectedItems.count; i++)
Env.LogInfo(listbox.selectedItems(i));
listbox Overview | listbox.selected | collection Overview