Show Message Box

Verb: messageBox

Displays a message box to the user with an error, warning, information or question.


messageBox --title(String) --text(String) --icon(Nullable<MessageBoxIconWrapper>) --buttons(Nullable<MessageBoxButtonsWrapper>) --defaultbutton(Nullable<DefaultMessageBoxButton>) (String)=value


Script Designer Required AcceptedTypes Description
--title Title Required Text Message box title.
--text Text Required Text Message box contents.
--icon Icon Required MessageBoxIconWrapper Icons that are displayed in the message box, representing a question, error, warning or information. The icon options are the following:
  • Error
  • Information
  • Question
  • Warning
  • --buttons Buttons Required MessageBoxButtonsWrapper Button sets that appear in the message box. The button options are the following:
  • Abort/Retry/Ignore
  • OK
  • OK/Cancel
  • Retry/Cancel
  • Yes/No
  • Yes/No/Cancel
  • --defaultbutton Default button Required DefaultMessageBoxButton This option is used to choose one of the buttons set in Buttons to be preselected by default. The following options are available:
  • First button
  • Second button
  • Third button

  • The above options refer to which button should be highlighted (preselected) relative to the selected button set.


    Script Designer AcceptedTypes Description
    value Result Text Name of the button that was pressed.


    Displays a message box with an information and two options provided: "Ok" and "Cancel".

    defVar --name titleMessage --type String --value "Message Title!!"
    defVar --name textMessage --type String --value "Message text!"
    defVar --name buttonSelected --type String
    messageBox --title "${titleMessage}" --text "${textMessage}" --icon "Information" --buttons "OKCancel" --defaultbutton "SecondButton" buttonSelected=value
    //Displays a message box with two options.
    logMessage --message "${buttonSelected}" --type "Info"
    The result varies according to the button selected by the user.


    The defined Default button is pre-selected and highlighted, demonstrating that it is the default button in the message box.

    When the Show Message Box command is executed by the IBM RPA Launcher, a window is displayed in the foreground.

    See Also

  • Await Wait Cursor
  • Close Progress Window
  • Input Box
  • Minimize or Maximize Windows
  • Open Save As Dialog Box
  • Select File
  • Select Folder
  • Show Progress Window
  • Take a Screenshot