Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

VBScript package

  • Updated: 7/16/2021
    • Automation 360 v.x
    • Build
    • RPA Workspace

VBScript package

The VBScript package contains actions that enable VBScript functions in a task.

Before you start

  1. Verify that the device on which you want to run the VBScript has Windows operating system installed.
  2. Open a VBScript file, or input the script you want to run using the Open action. You must associate the details of the file or script you want to run with a session name. Use this same session name for other VBScript actions.
  3. 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.
  4. After you have executed 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:

Note: The Open action must be the first action to use the VBScript in a task.
Action Description
Close Closes the session.

Specify the same session name from the Open action.

Run function Runs a function within the VBScript.
  • In the VBScript session field, specify a session name. Use the same session name from the Open action.
  • Optional: Specify the function name to run and the arguments to pass to the function.
    Note: You can pass only a list variable as an argument for the function. You can use the list variable to pass multiple arguments of different data types such as Boolean, datetime, number, and string.
  • Optional: If the specified function returns a value, specify the variable to store that value in the Assign the output to variable field. The Control Room shows a descriptive default variable name. If you create several output variables, subsequent variable names are appended with a -1, -2, -3, and so on to avoid duplication.
    Note: In VBScript, stand alone scripts do not return a value.
Open Opens a VBScript file.
  • In the VBScript session field, specify a session name. Use this same session name for other VBScript actions.
  • In the VBScript, choose one of the following options:
    • In the Import existing file option, select an existing VBScript file.
      Note: If you are uploading a script from a file on your desktop, the file and any dependencies must be in a standalone folder. When you select a file for upload, all files and folders at the same folder level are uploaded.
    • In the Manual input option, enter the VBScript.

Resources

To learn more, access the course titled Did You Know that You can Write Inline Scripts Inside a Bot? course in Automation Anywhere University: RPA Training and Certification (A-People login required). This course introduces you to writing inline scripts within a command.

Send Feedback