AutoControl Control your browser your way Forum               Install now from theChrome Web Store

ACtl.STOP_FULL_SEQ


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.
Scripting API Script Isolation Asynchronicity Backgrnd Scripts GUI vs API ACtl.include ACtl.import ACtl.getFile ACtl.saveFile ACtl.saveURL ACtl.openURL ACtl.closeTab ACtl.runInTab ACtl.runInFrames ACtl.runInPageCtx ACtl.getTabInfo ACtl.getTabIds ACtl.TAB_ID ACtl.setTabState ACtl.captureTab ACtl.execAction ACtl.runCommand ACtl.getClipboard ACtl.setClipboard ACtl.expand ACtl.switchState ACtl.var ACtl.pubVar ACtl.on ACtl.off ACtl.sleep ACtl.STOP_CHAIN ACtl.STOP_FULL_SEQ