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 = [expression; expression; expression; ...]

Parameters

expression 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 = values.hitcount + 1]
</text>

Send comments on this topic:
Copyright Millisecond Software, LLC. All rights reserved.