Action2

Properties Methods

 

The Action2 object encapsulates the actions available in AutoMate™. The Action2 object contains updated methods of the Action object, as well as extended methods and actions made available since AutoMate™ 4.06d.

 

Description

The CurrentTask object contains methods that invoke AutoMate™ actions through the AutoMate™ Task Service. Use this object to execute any of the actions that AutoMate™ supports through the AutoMate™ Step Builder.

 

When a script is started, AutoMate™ automatically instantiates an Action2 object as “Action2”.

 

The methods of Action2 take the parameters of the method and wrap them into an AutoMate™ compatible command. This command is then marshaled to the AutoMate™ Configuration Manager to be run in the context of the same task that started the script. Every method returns an integer value as a result of the step’s execution in AutoMate™:

 

Return Value

Meaning

0

The action failed. Use the LastErrorMessage Property to get the error message.

1

The action completed successfully.

2

The action told AutoMate™ to stop the task.

 

Because every method in the Action2 uses the same return codes, you can easily create more elaborate and complex tasks using AutoMate™ steps.