MsgBox - function of language VBScript

Displays a message in the window, waits for the user to click a button.
In the PROMOTIC system it is better to use the Pm.MessageBox method.
String MsgBox(String prompt, [Integer buttons], [String title], [String helpfile], [Integer context])
prompt(String) Text presented as the message in the window. The maximum length of text is approximately 1024 characters, depending on the width of the characters used. If prompt consists of more than one line, then you can separate the lines using the vbCr, vbLf or vbCrLf constants between each line.
buttons[optional] (Integer) Numeric expression that is the sum of values specifying the number and type of buttons to show, the icon style to use, the identity of the default button, and the modality of the message box.
If not set, then the default value is vbOKOnly.
vbOKOnly - Display the "OK" button only
vbOKCancel - Display OK and Cancel buttons
vbAbortRetryIgnore - Display ABORT, RETRY and IGNORE buttons
vbYesNoCancel - Display YES, NO and Cancel buttons
vbYesNo - Display YES and NO buttons
vbRetryCancel - Display RETRY and Cancel buttons
vbCritical - Display "Critical Message" icon
vbQuestion - Display "Warning Query" icon
vbExclamation - Display "Warning Message" icon
vbInformation - Display "Warning Message" icon
vbDefaultButton1 - 1st button is default
vbDefaultButton2 - 2nd button is default
vbDefaultButton3 - 3rd button is default
vbDefaultButton4 - 4th button is default
vbApplicationModal - Application modal mode. The user must respond to the message box before continuing work in the current application.
vbSystemModal - System modal mode. All applications are suspended until the user responds to the message box.
title[optional] (String) Text string presented in the window title bar.
If not set, then the application name is placed in the window title bar.
helpfile[optional] (String) Path to the Help file to use to provide context-sensitive Help for the window. If set, then the context parameter must also be provided.
context[optional] (Integer) The Help context number assigned by the Help author to the appropriate Help topic. If set, then the helpfile parameter must also be provided.
Return value:
Returns a value indicating which button the user clicked. The values corresponds to following constants:
vbOK - the "OK" button was clicked
vbCancel - the "Cancel" button was clicked
vbAbort - the "ABORT" button was clicked.
vbRetry - the "RETRY" button was clicked.
vbIgnore - the "IGNORE" button was clicked.
vbYes - the "YES" button was clicked.
vbNo - the "NO" button was clicked.
If both helpfile and context are provided, then the user can press F1 to view the Help topic corresponding to the context.
If the window shows the "Cancel" button, then pressing the Esc key has the same effect as clicking the "Cancel" button.
The example displays an information window with buttons OK and Cancel. The function returns the value of vbOK or vbCancel based on the key pressed.
VBScriptSelect and copy to clipboard

If vbOK = MsgBox("Hello World!", vbOKCancel+vbInformation, "MsgBox Example") Then
' ...
End If
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.