There are actually a few different ways to do this depending on what you want the UI to look like.
Podolsky is correct; first you need to set the parameter with the list of values in the master script (or parameter script but master is better).
Then you have options in the UI of:
USE the "ui_infield" command as you have done, which is probably the worst way (sorry, harsh but true).
or
USE the "ui_radiobutton" command, which I think is purpose built for exactly what you are trying to do. your UI script would look like this:
ui_radiobutton "existing", e1, e1, xPOS, yPOS, 20, 16: xPOS = xPOS +20
ui_radiobutton "existing", e2, e2, xPOS, yPOS, 20, 16: xPOS = xPOS +20
ui_radiobutton "existing", e3, e3, xPOS, yPOS, 20, 16: xPOS = xPOS +20
of
If you want a really nice UI with picture button that change based on the chosen button then USE
Use the "ui_button" command with the "ui_function" setting and assign a GLOB_UI_BUTTON_ID at the end:
ui_button ui_function, e1, xPOS, yPOS, 20, 16, 101: xPOS = xPOS +20
ui_button ui_function, e2, xPOS, yPOS, 20, 16, 102: xPOS = xPOS +20
ui_button ui_function, e3, xPOS, yPOS, 20, 16, 103: xPOS = xPOS +20
and then in the parameter script write the response to this button being clicked like:
if GLOB_UI_BUTTON_ID = 101 then parameters "existing" = e1
if GLOB_UI_BUTTON_ID = 102 then parameters "existing" = e2
if GLOB_UI_BUTTON_ID = 103 then parameters "existing" = e3
I hope that helps and doesn't confuse things further as having options often does. Basically, if you just need a check box for each option then use the "ui_radiobutton" as it is simple and fast to set up. If you want buttons with images or text then you need to use the last option.
Enjoy,
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website:
https://cadswift.com.au/
YouTube:
https://www.youtube.com/user/CADSwift/playlists