www.buildautomator.com  Build Automator Documentation

TerminateScript

Previous  Top  Next  


This action terminates the script execution immediately.  No Action Items after this action will be executed and the script is aborted.  This action has a condition that is evaluated at runtime to determine if the script will be terminated or not.  If no condition is specified the script is terminated unconditionally.  You can use constants or variables in the condition.

 

By using the action property you can also set a condition for this action, like any other action.  The action condition has priority over the termination condition, i.e. the termination condition is never evaluated if the action condition is false and the action is not executed.  For example if you have a condition on the action item that looks like 1=2 and a condition on the termination that looks like 1=1, then the action will not execute because of the 1=2 condition which will always be false. 

 

TerminateScript_no_condition

 

Properties

Explanation

Condition  ROMx116_dblisttable

Condition for termination of the script.  This entry can contain constant values such as 1=2 if you want to temporarily disable the termination action or 1=1 if you want it to run always.  You can also use variables and the contents will be evaluated at runtime.  This could be used for example with the Message action to terminate the script if the user presses a certain button. 

 

The screenshot above shows the window without any condition in which case the terminate is unconditional, i.e. it will always trigger a termination of the script.

 

TerminateScript_literal_condition

This screenshot shows a literal condition, such as 1=2 which would always be false so the termination would never occur.  This can be useful when you are debugging or testing  a script and you want it to terminate at a certain point.  Then you could use condition like 1=2 to disable the termination temporarily.

 

TerminateScript_variable_condition

This screenshot shows a variable condition that is evaluated based on the values of those variables.  In this case the %MSGRESULT% variable contains what button was pressed on a previously executed Message action and the condition compares it to the $BUTTON_YES$ constant.  If the user pressed the Yes button in the previous Message action then it would trigger the Terminate Script action to execute and terminate the script. 

 

 



Direct link to this page: http://www.buildautomator.com/onlinemanual/terminatescript.htm