Passing a Variable to a VB Script
- Última atualização2020/05/06
Passing a Variable to a VB Script
In conjunction with Automation Anywhere, running VB scripts can be very powerful.
Sometimes, people prefer to run VB (Visual Basic) scripts to perform a task or process. These scripts can be automated, using the Run Script command.
Sample Use Cases:
- Obtain data from a file on a website
- Calculate dates and times
Use the Run Script command to pass values in a variable to the Parameter field. You can then obtain the output from the Return Value field.
Commands that are required to pass values to a VB script and obtain the results include:
1. Pass values in the VB script: WScript.Arguments.Item(0)
2. Return values in VB script: WScript.StdOut.WriteLine "Variable"
For "Variable", the double quotes are not required for Return values.
Separate the values with a space.