states,
This statement is incorrect. When using return index "128", if the 1st item is selected, the return is "0", 2nd is "1", and 3rd item selected returns "2". If nothing is selected the return is "-1". Which makes sense since it can't be "0" (zero) as stated since if the first item is selected the return is "0".128 = Return selected index. If nothing is selected, 0 (zero) is returned.
Edit: To make it easier to eval...
Code: Select all
$options = "One|Two|Three";
$index = inputselect("Select an option:<crlf>", "$options", "|" ,128, "None", 420, 265, "Your options");
if ($index == "0") {echo Index: $index}
if ($index == "1") {echo Index: $index}
if ($index == "2") {echo Index: $index}
if ($index == "-1") {msg "You haven't selected an option...aborting!"; end 1;}
Ken
XYplorer Beta Club