Help files

Run VBScript Action

Description:

This Action executes some custom VBScript code and retrieves its output into a Variable.

Although WinAutomation offers a vast number of Actions that will cover almost all your automating needs, there may be times that you want to inject some VBScript code into your Process. Maybe you already have a script in VBScript that you want to use, maybe you need some really advanced features such as manipulating a COM object. Whatever the need may be, this is the Action you can use to include VBScript code into your Process.

vbscript.png
Properties:

VBScript to run:

Enter here the VBScript code you want to execute. TIP: Within the script, you may include WinAutomation Variables, since they will be evaluated prior to the VBScript code's execution. For example:

vbscript1.png

If the %ExcelFile% Variable holds the value, say, "c:\myexcel.xlsx", the last command in line 8 will equal to

objExcel.ActiveWorkBook.Save "c:\myexcel.xlsx"

Store Output into:

Enter the name for the Variable to hold the script's output. A script may write some text to the windows console during its execution. In this case, all the text written by the script is stored into this Variable so that it can be processed by later Actions.

Store Error Output into:

Enter the name for the Variable to hold any errors that may occur during the execution of the VBScript code.

NOTE:

Commands in VBScript will be highlighted accordingly so that you can read your script easily. Also, this Action's window can be resized.