value = listbox.selected(item);
listbox.selected(item) = value;
Returns true/false if the specified item is selected or not. Set to true to select the item or to false to remove selection. You can set or clear the selection on all items if you pass -1 as the item index.
// Test get/set selected
ListBox.selected("\\Second.*") = true;
if (!ListBox.selected("Second list item"))
Env.LogError("Could not set current selection");
listbox Overview | listbox.selectedItems