MessageBox on DM Scripting stops the running script until OK is pressed
search cancel

MessageBox on DM Scripting stops the running script until OK is pressed

book

Article ID: 246435

calendar_today

Updated On: 10-09-2023

Products

CA Client Automation - IT Client Manager CA Client Automation

Issue/Introduction

While using DM Scripting it's possible to show a message to the user who is running the script (or if it's deployed to an Agent, the end user using that machine). The function is something like this:

MessageBox("Warning test!")

This will show the following message:

The problem with this is that the script will stop running until the user clicks on 'OK'.

Environment

Client Automation 14.x

Resolution

If it's required that a message is shown to the End User, but the script continues without user interaction, the following script can be used:

ProgressText("This is a TEST message")
Print ("The TEST script is being executed in the background")
Sleep(5000) 'Wait 5 seconds

Using the above example, 2 messages will be shown as seen here:

And this windows will remain open for 5 seconds, then it will close and the script will continue.