Page tree
Skip to end of metadata
Go to start of metadata

Automise supports VBScript and JavaScript languages (via Active Scripting) and also Python and PowerShell scripting (via the PowerShell runtime).

PowerShell

To use PowerShell in Automise you need to have PowerShell 1.x installed on your machine.  The download at the time of writing is:

Python

Python support is included with Automise, using Microsoft's IronPython 2.0.

VBScript and JavaScript

To use VBScript and JavaScript you need to have Active Scripting installed on your machine (this should be installed by default).  If you don't have Active Scripting support installed, or you want to upgrade Active Scripting on your machine, the download for Windows Script 5.6 is:

Debugging

Active scripting based languages can be debugged using the Active Script Debugger, provided the language vendor supports debugging. To enable debugging you will need the Active Script Debugger installed, or Visual Studio.NET (which overrides the script debugger).  PowerShell and Python script debugging is not yet possible.

What can I do in the Scripts

VBScript and JavaScript scripts can make use of almost all the functionality of Active Scripting, including external COM/ActiveX calls.  PowerShell scripts can make use of all the PowerShell functionality. Python scripts can use IronPython and .NET Framework built-in functionality, as well as Python standard libraries if these are installed.

Automise Script Events are Triggered Before and After an Action Executes. See Run Script action.

Using Automise Variables in Scripts

Automise variables are available in script events as global variables. You can reference them just as you would any other identifier.  In PowerShell, you must access Automise variables with the following syntax:

$FBVariables.GetVariable(<variablename>) and $FBVariables.SetVariable(<variablename>)

Using Target Parameters in Scripts

Action List Parameters are available in script events as global variables (same as Automise variables.)

Including External Scripts

You can include external script files in your VBScript and JavaScript action scripts, by inserting a comment with "USEUNIT scriptfilename"  You cannot include external script files with PowerShell.

Example

VBScript
'USEUNIT c:\Automise\scripts\iis_stuff.vbs

Example

JavaScript
//USEUNIT c:\Automise\scripts\iis_stuff.js
The external script file must be written in the same script language as the event handler script. Automise provides sample scripts to do things such as restart IIS, shut down COM+ components, etc.

You can also use Automise variables in the path, for example :  'USEUNIT "%SCRIPTPATH%\Test.vbs"

This is the only time you would use the %variable% syntax for Automise variables in the script editor, as the useunit line is preprocessed before the script is run.

Custom Action Studio Script Actions

Entire action types can be written in Action Studio for inclusion in Automise.

See Also

Related documentation and VBScript/JavaScript languages descriptions can also be found on the Microsoft Active Scripting site:

http://msdn.microsoft.com/scripting/

PowerShell documentation can be found at the Windows PowerShell site:

http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx

Information about IronPython can be found at the IronPython home page on Codeplex:

http://www.codeplex.com/IronPython

  • No labels