Inquisit Language Reference
The onprepare attribute specifies expressions to evaluated before a given stimulus is prepared for presentation.
<button> <clock> <html> <picture> <port> <shape> <sound> <text> <video> <xid>
|expression||One or more expressions, delimited by semi-colons. See help with expression syntax for more information.|
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.
The following text increments a value called "hitcount" by 1 before the value on the screen:
/ items=("<% values.hitcount %>")
/ onprepare=[ values.hitcount = values.hitcount + 1]