Displays a list box, and ask an item to user. (version 4.78 or later)
listbox <message> <title> <string array> [<selected>]
The listbox macro command shows all selected items of the <string array> array.
If the <string array> is defined as bigger entries than selected numbers as follows,
the empty string will be shown at last.
strdim msg 4 msg[0] = 'Banana' msg[1] = 'Apple' msg[2] = 'Orange' listbox 'Select your favorite food.' 'Confirmation' msg ; displays 4 items Banana Apple Orange [Empty string]
(version 4.89 or later)
When the <selected> parameter is specified, an item of the list box can be selected at first.
If the parameter is omitted, the default value is 0.
strdim msg 3 msg[0] = 'Banana' msg[1] = 'Apple' msg[2] = 'Orange' listbox 'Select your favorite food.' 'Confirmation' msg sprintf2 var "%d" result messagebox var "result" ; result ; -1: Cancel ; 0: Banana ; 1: Apple ; 2: Orange
strdim msg 7 msg[0] = 'Sunny' msg[1] = 'Cloudy' msg[2] = 'Rainy' msg[3] = 'Windy' msg[4] = 'Snowy' msg[5] = 'Foggy' msg[6] = 'Unknown' ; The seventh entry is selected by default. listbox "How's today's weather?" 'Confirmation' msg 6 sprintf2 var "%d" result messagebox var "result"