up Inquisit Language Reference

onScriptEnd attribute

The onScriptEnd attribute specifies commands to be run at the end of a script. One or more expressions used in batch elements, delimited by semi-colons.

Member of

<batch>

Syntax

/ onScriptEnd = { script }

Parameters

Name Type Description
script script

Remarks

This attribute is useful to share information amongst different batch scripts.

Examples

The following example shows how to transfer information (here: total points earned in script1) from one script to the next. Parameters contain information to be handed from the batch 'into' a task script; Values contain information that is handed from a task script back to the batch. Both parameters as well as values have to be declared in the batch as well as the respective task scripts. In this example, the winnings from script1 are transferred to script2, so that the running total can be continued when script2 is run (Note: 'this' represents 'batch.main' in this context).

<parameters>
/ script2TotalStart = null
</parameters>

<values>
/ script1Total = null
</values>

<batch main>
/ file = "script1.iqjs"
/ file = "script2.iqjs"
/ onScriptEnd = {
  if (this.currentScript == "script1.iqjs"){
    parameters.script2TotalStart = values.script1Total;
  }
}
</batch>

Copyright Millisecond Software, LLC. All rights reserved.