Error Directive, Alerting & Logging Commands
OnError
Controls the processing of a script in the event of a runtime error.
Multiple OnError commands may be used to control behaviour at different points in the script.
Parameters
Terminate - stop script execution
Continue - continue script execution after error
AlertUser - Inform the user of the error
Example
OnError Terminate AlertUser
AlertInfo / AlertError
Displays a message box to the user in the notification panel.
Parameters
alertCaption (Optional)
A caption above the message body.
Example
AlertInfo "Username is " bmUsername, bmTitle
If bmUsername
is “ksmith” and bmTitle
is “Acme CMS” then, on Windows 7, this will show
Windows 10 messages are similar, but include the name of the application that created the message. In this case “My1Login Desktop Agent”.
AlertInfo "Hello from " bmTemplateName, "My1Login Desktop Message"
LogInfo / LogError
Writes a message to the desktop agent’s log file with a log level of Info or Error.
Examples
LogInfo "Starting " bmTitle " as " bmUserName
LogError "Some error"
Related Articles
Desktop Client Commands
Table of Script Commands Command Description AlertInfo / AlertError Commands to show text messages to users. BringToForeground Attempt to force the main app window to desktop’s foreground. InteractiveSelectBookmark Allows manual intervention when ...
Main Window Commands
Main window commands are responsible for interacting with the primary window of an application, or the application itself rather than the current child window. BringToForeground The BringToForeground command is used to bring the main application into ...
App Control Commands
App control commands are commands that emulate user interaction with a desktop application. I.e. they select controls, press buttons, type text or click the mouse. LeftClick Performs a mouse left click at the provided co-ordinates. The mouse cursor ...
Desktop Scripting
Structure of a Script A Desktop DSL Script has the following functional sections (not all are required for all apps): Error Directive Determines the impact of errors on the script run. Process Start and Identification Ensures the correct windows ...
Script Example - Using Notepad
Script Example - Using Notepad This section introduces a basic script that interacts with the windows Notepad application. The script does three things: It inserts some text in the Notepad window when Notepad starts. It shows a message to the user ...