Automation Workshop includes Execute Script Action that allows elegant integration of JScript, VBScript and PowerShell scripts as well as batch files directly into the Task.
PowerShell
View PowerShell examples.
- PowerShell scripts requires PowerShell 2.0 to be installed. On older operating systems PowerShell has to be installed by using Windows update or enabled in Programs and Features in Control Panel.
- PowerShell supports Unicode. However, it has to be enabled individually in each script, by starting the script with the following code:
[Console]::OutputEncoding = [Text.Encoding]::Unicode
JScript
View JScript examples.
- JScript do not support Unicode encoding.
VBScript
View VBScript examples.
- VBScript do not support Unicode encoding.
Batch files
View Batch file examples.
- Batch file scripts do not support Unicode encoding.
- To avoid unnecessary command echoing, it is recommended to start batch file code with:
@Echo off
Few notes…
The script examples provided here will give a good insight how to use various scripts to create custom automation within the feature rich framework of Automation Workshop.
First, it must be noted that the script takes its input from Variable Wizard dynamic values. Everywhere a variable is required, a dynamic value has to be added directly to the script code.
Second, the data communication with other scripts is based on screen output. The screen output of the script can be retrieved by using Variable Wizard—it is possible to retrieve either full screen output or any of the first six output lines separately.
And finally, as the window of the script in execution is not visible, the scripting support in Execute Script Action is limited to non-interactive scripts—scripts that do not require user interference for their completion. If, however, the script will ask for user input or other interaction, the result will be undefined. When use of interactive scripts is necessary, try using Run CMD Command Action.
While the scripting support is very versatile and allows achieving almost unlimited results, due to script complexities, it is better regarded as a workaround for cases where the standard features of Automation Workshop can not yet provide a friendly and easy solution.
Discover
Automation Workshop includes many more awesome Triggers and numerous Actions to aid you to automate any repetitive computer or business task by providing state-of-the-art GUI tools.
Help at your fingertips…
If you have any questions, please do not hesitate to contact our support team.