Name
SystemRequest -- pop up a choice requester
Synopsis
res = SystemRequest(title$, body$, buttons$[, icon])
Function
This function pops up a standard system requester that displays a message (body$) and also allows the user to make a selection using one of the buttons specified by buttons$. Separate the buttons specified in buttons$ by a "|". The return value tells you which button the user has pressed. Please note that the right most button always has the value of False (0) because it is typically used as the "Cancel" button. For example, if you have three buttons "One|Two|Three", button "Three" has a return value of 0, "Two" returns 2, and "One" returns 1.

New in Hollywood 4.0: You can use the optional argument icon to add a little icon to the requester. The following icons are possible:

#REQICON_NONE:
No icon

#REQICON_INFORMATION:
An information sign

#REQICON_ERROR:
An error sign

#REQICON_WARNING:
A warning sign

#REQICON_QUESTION:
A question mark

Please note that currently requester icons are not supported on every platform that Hollywood runs on.

Starting with Hollywood 6.0, SystemRequest() might map the following button specifications to certain system-specific buttons: "OK", "OK|Cancel", "Yes|No" and "Yes|No|Cancel". This means that it could happen that the buttons suddenly appear in the user's language instead of the English versions you passed to SystemRequest(). It can also mean that the order of the buttons is changed, e.g. on macOS the "OK" button is typically placed to the right of the "Cancel" button whereas on other systems it is the other way round. Nevertheless, the return values will always be consistent, i.e. "OK" or "Yes" will always have a return value of 1 whereas "Cancel" or "No" has a return value of 0 the only exception being "Yes|No|Cancel" where "No" has a return value of 2 because there is also a "Cancel" button which has a return value of 0.

Also, it is possible to pass an empty string ("") in the first parameter since Hollywood 6.0. In that case, the requester will use the title specified in the @APPTITLE preprocessor command.

Inputs
title$
title for the requester
body$
text to appear in the body of the requester
buttons$
one or more buttons that the user can press
icon
optional: icon to show in the requester (defaults to #REQICON_NONE) (V4.0)
Results
res
the button that was pressed by the user
Example
sel = SystemRequest("Pizza Service", "Select your pizza!",
                    "Prosciutto e funghi|Calzone|Margerita|Hawaii")
Switch sel
Case 1:
  Print("1x Prosciutto e funghi = 8 Euro")
Case 2:
  Print("1x Calzone = 10 Euro")
Case 3:
  Print("1x Margerita = 9 Euro")
Case 0:
  Print("1x Hawaii = 12 Euro")
EndSwitch
The above code asks the user for a pizza and displays the price of that pizza.

Show TOC