Millisecond Forums

using batch to branch to other scripts non randomly

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

By troyh - 2/8/2021

Hello, I found an old script that did this like so

<parameters>
/ id = 0
</parameters>

<values>
/ id_selected = 0
</values>

<batch select>
/ file = "pracprac.iqx"
/ file = "1.2_5d62ecf0163.iqx"
/ file = "1.2_5e0fe5cc2fc.iqx"
/ file = "1.2_5ca616e03.iqx"
/ file = "1.2_5923e1de6944f.iqx"
/ file = "1.2_5f47f430ebf.iqx"
/ file = "1.2_5c3fa8e18c.iqx"
/ file = "1.2_5feb9213e14.iqx"
/ file = "1.2_59f110d1be.iqx"
/ file = "1.2_5efb35574b.iqx"
/ file = "1.2_59daaf5de5.iqx"
/ file = "1.2_5e23164bff2.iqx"



/ onscriptend = [
  if (batch.select.currentscript == "pracprac.iqx")
  {
   parameters.id = values.id_selected;
  }
]
</batch>


but Inquisit says my /onexptbegin = [ if (parameters.id != 1) script.abort(false) is an invalid identifier.

By troyh - 2/8/2021

troyh - 2/9/2021
Hello, I found an old script that did this like so

<parameters>
/ id = 0
</parameters>

<values>
/ id_selected = 0
</values>

<batch select>
/ file = "pracprac.iqx"
/ file = "1.2_5d62ecf0163.iqx"
/ file = "1.2_5e0fe5cc2fc.iqx"
/ file = "1.2_5ca616e03.iqx"
/ file = "1.2_5923e1de6944f.iqx"
/ file = "1.2_5f47f430ebf.iqx"
/ file = "1.2_5c3fa8e18c.iqx"
/ file = "1.2_5feb9213e14.iqx"
/ file = "1.2_59f110d1be.iqx"
/ file = "1.2_5efb35574b.iqx"
/ file = "1.2_59daaf5de5.iqx"
/ file = "1.2_5e23164bff2.iqx"



/ onscriptend = [
  if (batch.select.currentscript == "pracprac.iqx")
  {
   parameters.id = values.id_selected;
  }
]
</batch>


but Inquisit says my /onexptbegin = [ if (parameters.id != 1) script.abort(false) is an invalid identifier.


By troyh - 2/8/2021

Sorry, i thought I would be able to upload the rest of the files in this comment, but I am receiving a message that I have exceeded my space. Here is the thread i was referring to:https://www.millisecond.com/forums/Topic23921.aspx#23934 . Any help would be great!
By Dave - 2/8/2021

troyh - 2/9/2021
troyh - 2/9/2021
Hello, I found an old script that did this like so

<parameters>
/ id = 0
</parameters>

<values>
/ id_selected = 0
</values>

<batch select>
/ file = "pracprac.iqx"
/ file = "1.2_5d62ecf0163.iqx"
/ file = "1.2_5e0fe5cc2fc.iqx"
/ file = "1.2_5ca616e03.iqx"
/ file = "1.2_5923e1de6944f.iqx"
/ file = "1.2_5f47f430ebf.iqx"
/ file = "1.2_5c3fa8e18c.iqx"
/ file = "1.2_5feb9213e14.iqx"
/ file = "1.2_59f110d1be.iqx"
/ file = "1.2_5efb35574b.iqx"
/ file = "1.2_59daaf5de5.iqx"
/ file = "1.2_5e23164bff2.iqx"



/ onscriptend = [
  if (batch.select.currentscript == "pracprac.iqx")
  {
   parameters.id = values.id_selected;
  }
]
</batch>


but Inquisit says my /onexptbegin = [ if (parameters.id != 1) script.abort(false) is an invalid identifier.



The scripts run by the batch need to have the proper logic specified to interface with the batch. The script you plugged in there is missing all of that.

https://www.millisecond.com/support/docs/v6/html/howto/batchparameters.htm


By Dave - 2/8/2021

troyh - 2/9/2021
Sorry, i thought I would be able to upload the rest of the files in this comment, but I am receiving a message that I have exceeded my space. Here is the thread i was referring to:https://www.millisecond.com/forums/Topic23921.aspx#23934 . Any help would be great!

There is a ZIP attached to the post you linked. Look at each script to see how it's set up to interface with the batch parameters and other logic.
By troyh - 2/8/2021

Got it! Thanks for your guidance!