"Message Box" activity

Created by akaBot Support, Modified on Thu, 21 Nov, 2024 at 3:15 PM by akaBot Support

1. Activity Program Name

RCA.Activities.Core.MessageBox


2. Description:

  • Studio Version until 2.0.2.0:
    Quick Access: Toolbox > Core > Message Box

  • Studio Version from 2.0.3.0:
    Quick Access: Toolbox > Core > Dialog > Message Box

This activity displays a message box with the specified text and buttons. The message box can automatically close after a set number of milliseconds, and it can also be set to always appear in the foreground.

3. Properties

Property field

Property name

Input field

Description

Other

Public

Checkbox

Logs the variables and arguments in the activity to the log file and pushes them to the Center. (For more details, refer to "About the Public Property.")

Foreground

Checkbox


When checked, the message box is always displayed in the foreground.

Display Name

String Input


The name of the activity as it appears in the designer panel.

Output

Selected Button

String Input

Stores which button was clicked, as specified in the "Buttons" property.

Input

Caption

String Input

Displays the text as the title of the message box.

Text

String Input


Displays the text inside the message box.

Buttons

Dropdown


Displays buttons as per the chosen option: Ok, OkCancel, YesNoCancel, YesNo.

Display Time

Int32 Input


If a value greater than 500 is specified, the message box will automatically close after the given milliseconds. If no value is specified or a value less than 500 is provided, the message box will remain open until a button is pressed or the box is manually closed.


4. Usage

The buttons displayed in the message box vary depending on the value specified in the "Buttons" property.

Value Specified in "Buttons" Property

Displayed Buttons

Ok

"OK"

OkCancel

"OK""Cancel"

YesNoCancel

"Yes""No""Cancel"

YesNo

"Yes""No"


Example Usage:

Drag and drop the Core > Message Box activity from the toolbox into the designer panel.

Input the desired values into the Caption and Text properties, and select the appropriate buttons from the Buttons dropdown. In this example:

  • Caption: "Title"

  • Text: "Message"

  • ButtonsYesNoCancel

To log which button was clicked, set a variable called SelectedButton in the Output > Selected Button option. (For details on setting up variables, refer to "Creating Variables.")

Drag and drop the Core > Log Message activity from the toolbox into the designer panel.

Set the SelectedButton variable in the Input > Message property.

Click Home > Start or press F5 to run the workflow, and the message box will appear.

In this example, when you click Yes, the log in Studio's Output will record that "Yes" was clicked.


Auto-Close Feature:

  1. Now, let's add the Display Time property. Set it to 1000 milliseconds (1 second).

  2. Click Home > Start or press F5 to run the workflow. The message box will appear but will automatically close after 1000 milliseconds (1 second).

  1. Since no button was clicked, the log will show "Timeout" in the output.

5. Cautions

When the "Buttons" property is set to Ok, there is a specific behavior to be aware of. Regardless of how the message box is closed, the log will always display "OK" in the following scenarios:

  1. Clicking the "OK" button

  2. Clicking the "X" to close the message box

  3. If no action is taken within the time specified in the Display Time property



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article