// 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 the number of items in a List or Choice element.
Syntax
int num = gui.getItemCount(name);
Parameters
String name
The name of the List or Choice element.
Returns
The number of items in the element if the element can be found and is either a Choice or a List. -1 otherwise.