Aborts the script.
<script>
none
Name | Type | Description |
---|---|---|
abortbatch | boolean | Optional. If true, the entire batch is aborted. If false, only the current script is aborted. |
If the optional abortbatch parameter is true (default), the abort function immediately ends the current script and any subsequent scripts in the batch. If the optional parameter 'abortbatch' is false, the abort function quits the current script but continues running any subsequent scripts in the batch. It can be used, for example, with informed consent procedures to end a script if a respondent indicates they do not consent.
The following aborts the script at the end of an informed consent trial:
<trial consent>
/ onTrialEnd= {if ( trail.consent.response == 57 ) script.abort();}
</trial>
The following aborts the script if performance dips below threshold:
<trial myTrial>
/ onTrialEnd= {if ( trial.myTrial.percentCorrect <= 50% ) script.abort();}
</trial>