Encapsulates the AutoMate™ action in the “Flow Control” group, “Prompt.” The method shows a dialog box specified text and a selection of buttons and performs variable defined actions based on their selection.
Declaration
function PromptUser (varText As Variant,
intType As Integer,
intActionOnOK As Integer,
intFailOnCancel As Integer,
intFailOnNo As Integer,
varTaskToStart As Variant) As Integer
Parameters
varText
The text to display inside the dialog box.
intType
Specifies which buttons are to be available on the dialog box:
Value |
Meaning |
0 |
OK only |
1 |
OK and Cancel |
2 |
Yes and No |
3 |
Yes, No, and Cancel |
intActionOnOK
Specifies the action AutoMate™ should take if the user clicks the OK or Yes button:
Value |
Meaning |
0 |
Start another task (specified by varTaskToStart) |
1 |
Stop the task (method returns 2) |
2 |
Continue the task (method returns 0) |
intFailOnCancel
Specifies whether the method should return a “1”, indicating a step failure, if the user clicks the Cancel button (applicable only if the intType parameter is 1 or 3)
intFailOnNo
Specifies whether the method should return a “1”, indicating a step failure, if the user clicks the No button (applicable only if the intType parameter is 2 or 3)
varTaskToStart
The name of the task AutoMate™ should start if the user clicks the OK or Yes button, and intActionOnOK is set to “0.”
Description
The PromptUser method displays a user interactive dialog bog with the text varText and waits for the user to make a selection. The return value of the method depends on the intActionOnOK, intFailOnCancel and intFailOnNo parameters.
Use the PromptUser method to allow a user to interactively select the flow of a running task.