Show Message Box
ActionStep Reference » Programming » General » Show Message Box
The Show Message Box ActionStep displays a pop-up message dialog with action buttons.
- Open the Programming node in the Workspace Explorer.
- In the General node, select the Show Message Box ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
Text |
Specifies the string value to be displayed.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Title
|
The title of the message box.
If the title is missing, the name of the software is automatically used.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Buttons |
The buttons of the message box.
Allowed Context Scope [Fixed] Allowed Values [Ok, Ok - Cancel, Abort - Retry - Ignore, Yes - No - Cancel, Yes - No, Retry - Cancel] |
Icons |
The displayed icon on the message box.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] Allowed Values [Information, Question, Warning, Error] |
Default Button Index |
The specified index value of the focused button.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Auto Close Delay |
The time in milliseconds before the message box automatically closes.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Results:
The ActionStep returns the following results:
name
|
description
|
---|---|
Result |
Contains the selected dialog response from the message box.
Possible values: [Ok, Cancel, Abort, Retry, Ignore, Yes, No, Cancel]. Allowed Context Scopes [Fixed, Local, Global]Allowed Context Types [Variable, Parameter] |
The Message Box can be used to confirm information, ask a question, or show a warning or error message to the user. |
Example 1 (Show a message about the dictionary's content count):
This example displays a dialog box about the local dictionary named Employees. The Count is then passed to the Text parameter with a placeholder and then creates an output via Message Box.
Example 2 (Warns the user on deleting the contents of a CSV file):
This example displays a warning message box for a CSV file named Items.csv before deleting all its contents. The message box button is focused on the Cancel button and automatically closes after 5000 milliseconds. The user's response is then stored in Result of the result list and decides an action to be taken using the If control statement.
See other General ActionSteps:
Region of Actions
Write Text
Write System Message
Comment
Comment Line
Show Workspace Information
Show Execution Information