get-choice

string ( get-choice string message multifield choices optional long centre-message)

Given a message string and a multifield comprising a number of choice strings, pops up a menu for the user to select one item. Returns one of the supplied strings if the user pressed Ok, or the null string if the user pressed Cancel.

A multifield can be created with the CLIPS function mv-append, for example:

  (bind ?choice (get-choice "Choose please"
                            (mv-append "One" "Two" "Three")))
If centre-message is 1 (the default), the message will be centred on the dialog box. If it is 0, the message will be left-justified. New lines are allowed in the message.