Shell Commands/RequestChoice
From MorphOS Library
RequestChoice - Asks for input via a requester
TITLE/A, BODY/A, GADGETS/A/M, PUBSCREEN/K
TITLE - Title string of the requester BODY - Body string of the requester Linefeeds can be embedded using *N GADGETS - Gadgets of the requester (see below) The gadget labels are separated with spaces PUBSCREEN - Optional: name of the publicscreen to use
The number of the selected gadget is printed as a result to the console. For evaluation in a script file, you can redirect this output into an environment variable. If the requester cannot be opened, the command generates a return code of 20.
The PUBSCREEN argument allows the requester to open its window on a public screen.
Example:
MorphOS:> RequestChoice >ENV:rcnum "New Title" "This is my requester*NSelect a gadget" "OK" "Maybe" "Cancel"
ENV:rcnum contains 0, 1, or 2 after a gadget is selected. The script can use this value to control its later execution.