up Inquisit Language Reference

onPrepare attribute

The onPrepare attribute specifies expressions to evaluated before a given stimulus is prepared for presentation.

Member of

<button> <clock> <html> <picture> <port> <shape> <sound> <text> <video> <xid>

Syntax

/ onPrepare = { script }

Parameters

Name Type Description
script script One or more expressions, delimited by semi-colons. See help with expression syntax for more information.

Remarks

This parameter executes a set of expressions just before a stimulus is readied for presentation. The expressions can read and conditionally update the various properties in the script. This is useful for dynamically configuring properties of a stimulus (e.g., font, size, screen position, item content) whenever it is presented.

Examples

The following text increments a value called "hitcount" by 1 before the value on the screen:

<text myText>
/ items=("<% values.hitcount %>")
/ onPrepare={
  values.hitcount++;
}
</text>

Copyright Millisecond Software, LLC. All rights reserved.