Batch script control


Author
Message
raven
raven
Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)
Group: Forum Members
Posts: 54, Visits: 114
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!


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 106K
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


raven
raven
Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)Partner Member (747 reputation)
Group: Forum Members
Posts: 54, Visits: 114
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! :)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search