XenoGuard Documentation


Actions » Programming » Action Script » Cancel 

The action Cancel aborts the execution of an action script that was previously started asynchronously in the workspace.

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Action Script node, select the Cancel action.


The action has the following input parameters:

name Description
The reference to the action that started the action script asynchronously before.

Allowed Context Scope

Example 1 (Terminate an asynchronous script based on a condition):

In this example, the master action script starts a child action script asynchronously that reads the contents of a specified directory in the C:\ drive and displays the Result in Message Box. If it takes more than 10 seconds to read all contents, the child action script is canceled and a text message is displayed in Message Box in the Then branch, otherwise the action in the Else branch is performed. 

The master action script:

This is the child action script that will be called by the master action script:

See other action script operations:

Write Error
Write Result
Append Result