ACtl.STOP_CHAIN
The constants ACtl.STOP_CHAIN and ACtl.STOP_FULL_SEQ are the API counterpart of the
Continue chain if action.
A script can return one of these two constants in order to signal AutoControl's action system to stop the current action chain or the entire action sequence.
Learn more about this feature at Conditional Execution.
If a script returns ACtl.STOP_CHAIN, it has the same effect as this GUI action:
If a script returns ACtl.STOP_FULL_SEQ, it has the same effect as this GUI action:
Example
Given the following action sequence:
and the Run script action containing this script:
//If the current tab contains the term "Main Example" (case-insensitive)
if( document.body.innerText.match( /\bMain Example\b/i ) )
return ; //continue normally
//Else, if the current tab contains the word "Example"
if( document.body.innerText.match( /\bExample\b/i ) )
return ACtl.STOP_CHAIN ; //Don't execute remaining actions in the chain
//Else, don't execute remaining actions in all chains
return ACtl.STOP_FULL_SEQ ;
If the current tab contains the term "Main example", then Pin tabs and Move tabs will both be executed.
Else, if the current tab contains the word "Example", only Move tabs will be executed.
Otherwise, nothing will be done.