Millisecond Forums

Batch script control

https://forums.millisecond.com/Topic36865.aspx

By raven - 2/11/2025

Hi Dave,

Is it possible to stop a batch script after a particular response is given in one of the scripts it calls?

For example, in the following batch script, if a particular response (i.e., "0") is given to a question in script1, then the batch should stop and not run script2 and script3.

<batch>
/ file="script1.iqx"
/ file="script2.iqx"
/ file="script3.iqx"
</batch>


Thanks!

By Dave - 2/11/2025

raven - 2/11/2025
Hi Dave,

Is it possible to stop a batch script after a particular response is given in one of the scripts it calls?

For example, in the following batch script, if a particular response (i.e., "0") is given to a question in script1, then the batch should stop and not run script2 and script3.

<batch>
/ file="script1.iqx"
/ file="script2.iqx"
/ file="script3.iqx"
</batch>


Thanks!


You use the script.abort() function in script 1 to do this.

https://www.millisecond.com/support/docs/v6/html/language/functions/abort.htm

By raven - 2/11/2025

Dave - 2/11/2025
raven - 2/11/2025
Hi Dave,

Is it possible to stop a batch script after a particular response is given in one of the scripts it calls?

For example, in the following batch script, if a particular response (i.e., "0") is given to a question in script1, then the batch should stop and not run script2 and script3.

<batch>
/ file="script1.iqx"
/ file="script2.iqx"
/ file="script3.iqx"
</batch>


Thanks!


You use the script.abort() function in script 1 to do this.

https://www.millisecond.com/support/docs/v6/html/language/functions/abort.htm


Perfect, thanks Dave! :)