mui.Request -- popup a MUI system requester
r = mui.Request(title$, body$, gadgets$[, icon$])
This function pops up a standard MUI requester that displays a message (body$) and also allows the user to make a selection using one of the gadgets specified by gadgets$. Using a MUI requester instead of a standard system requester offers you the possibility to include text containing all the text engine format codes.

Separate the gadgets specified in gadgets$ by a "|". The return value tells you which gadget the user pressed. Please note that the right most gadget always has the value of False (0) because it is typically used as the "Cancel" gadget. If you have for example three gadget choices "One|Two|Three", the gadget "Three" has return value 0, "Two" returns 2, and "One" returns 1.

If you precede an entry with a '*' in gadgets$, this answer will become the active object. Pressing <Return> will terminate the requester with this response. A '_' character indicates the keyboard shortcut for this response.

The strings you specify in body$ and gadgets$ can use text formatting codes. See Text formatting codes for details.

Starting with MUI Royale 1.4 this function accepts an optional argument named icon$. This allows you to specify the icon to show in the requester window. Note that this is currently only supported by MUI 4 and up on AmigaOS 3 and AmigaOS 4. The MorphOS MUI doesn't support this feature yet. The following predefined values are accepted for icon$:

no icon

an information sign

an error sign

a warning sign

a question mark

title for the requester; pass an empty string ("") to use the default title
text to appear in the body of the requester
one or more gadgets that the user can press
optional: icon to show in the requester (defaults to "Information") (V1.4)
the gadget that was pressed by the user
mui.Request("MUI Royale", "\027c\027b\027uHello!\n\n" ..
    "\027nDo you like MUI Royale!", "*_Yes|_No")
The code above demonstrates the use of the mui.Request() function.

Show TOC