Use the VBScript package to run VBScript files or inline scripts from a task, execute specific functions, and capture return values in variables.
Before you start
- Verify that the device on which you want to run the VBScript has Windows operating system installed.
- Open a VBScript file, or input the script you want to run
using the Open
action.
Enter a session name in the Open action to identify this script session. Use this session name in all other VBScript actions.
- Use the Run function action to execute a function within the script or execute the entire script. You must use the VBScript session name you established in the previous step.
- After executing the script, close the VBScript session.
To review the bot launcher logs, navigate to C:\ProgramData\AutomationAnywhere\BotRunner\Logs\<current month>\Bot_Launcher-<today's date>.log.zip. Each zipped folder contains a file with data on the code execution, which is useful for debugging.
Actions in the VBScript package
The VBScript package includes the following actions:
| Action | Description |
|---|---|
| Open | Opens a VBScript file or accepts manual script input, and associates it with a session name. Must be the first action in the task. See Open action in VBScript. |
| Run function | Runs a named function within the VBScript, or executes the entire script. Optionally captures a return value in a variable. See Run function action in VBScript. |
| Close | Closes the VBScript session. Specify the same session name used in the Open action. See Close action in VBScript. |
Note: The Open
action must be the first action used in a VBScript task.