<< Click to Display Table of Contents >> Navigation: 3. Script Language > Input- and Output commands > Input and Output Commands |
MiniRobotLanguage (MRL)
MBX. Command
MessageBoX
Intention
Display a message box containing a text string and optional title. The easiest usage is:
MBX.Hello world
And this is the result:
Next you can add a window title like this:
MBX.Hello world||Question
which looks like this:
Next you can change the number of button or the appearance of the messagebox.
MBX.Hello world|64
MBX. can also be used for Debugging. If you want to see the value of a variable at some place, you can just write:
' Check variable content
MBX.$$TXT
Important note: Robot-Messageboxes are always TopMost. They will be in front of all non TopMost windows. This is necessary, because the Editor can be set to TopMost, and in this case the Messageboxes must be shown on Top of the Editor to be seen.
Syntax
MBX.P1[|P2][|P3][|P4]
Parameter Explanation
P1 - (optional) Text may contain systemvariables, like
for example $crlf$, which will force a newline.
P2 - (optional) numeric Value, see below.
Values for P2 change the number and Text of the displayed buttons:
00 Display OK button (default)
01 OK and Cancel
02 Abort, Retry and Ignore
03 YES, NO and CANCEL
04 YES and NO
05 Retry and Cancel
06 Cancel, Retry and Continue
Add this to get a additional Help-Button:
12288 Help-Button
Add this values to change the Graphic displayed:
16 Serious problem
32 Question mark
48 Exclamation mark
64 Information (default)
Add this value to set the default button:
0 Default Button is Button Nr. 1
256 Default Button is Button Nr. 2
512 Default Button is Button Nr. 3
768 Default Button is Button Nr. 4
Add this value to change the Screen-Arrangement of the Messagebox:
0 Application Modal
4096 System-Modal
8192 Taskmodal
262144 TopMost (default and always set.)
524288 Right align Window-Text
1048576 Right align Window-Title
Add this numbers to change Focus:
32768 No Focus
65536 Set Foreground Window
131072 Desktop
P3 - (optional) - Window-Title Text. If omitted,
"Message/Nachricht" is used.
P4 - (optional) - Variable that will contain the result of
the User--Input. If omitted, TOS is used.
The returned values are:
OK - 1
Cancel - 2
Abort - 3
Retry - 4
Ignore - 5
Yes - 6
No - 7
TimeOut - 0
Example
' A Messagebox will appear, Text is "Hallo"
' Title is Default Title
MBX.Hallo
' A Messagebox will appear, Text is "Hallo"
' Title is "MyTitel"
MBX.Hallo||MyTitle
' Example using Variables
' Global Variable
: $$TXT=Number is
' Local Variable
: §§NUM=12
MBX.$$TXT§§NUM|Number is ...
Remarks
there are 3 Versions, depending on the Number of Parameters:
1. MBX.[Variable(s) or Text]
2. MBX.[Variable(s) or Text]|Variable or Value
3. MBX.[Variable(s) or Text]|Variable or Value|[Variable(s) or Text]
The Result will be put on TOS.
Limitations:
The Parameters may not have the "|" inside as it is used a Separator.
See also: