// removes all items from a List.
int num = gui.getItemCount("myList");
for (int i=0; i<num; i++) {
// get the first item in the List
String item = gui.getItemByIndex("myList",0);
gui.removeItem("myList", item); // remove it.
}
Description
Returns an item in a List or Choice element by its index.
Syntax
String item = gui.getItemByIndex(name, index);
Parameters
String name
The name of the List or Choice element.
int index
The index of the item.
Returns
The name of the item if the element can be found and is either a Choice or a List element, and the index is within the number of items in the element. null otherwise.