The item element defines a set of stimulus items.
item.name.appendItem
item.name.clearItems
item.name.insertItem
item.name.item
item.name.removeItem
item.name.reset
item.name.setItem
Stimulus items can be defined using the item element or the items attribute. If multiple stimuli have the same set of items, the item element allows you to specify the items in a single place and reuse them with the different stimuli rather than repeating them inline within each stimulus.
The content of the items depends on the type of stimulus that is using the items. For text stimuli, the items represent the text to display on the screen. Picture, sound, and video interpret each item as a path to a picture, sound, or video file. If relative file paths are specified, the path is interpreted relative to the folder containing the script file.
For port stimuli, the items must be an 8 character string of zeros and ones representing an 8-bit signal to send through the port (e.g., "00001111", "11111111", ... ).
Stimulus items may also contain embedded performance variables. The current value of a given measure for a given trial or block can be inserted anywhere within the text of a stimulus item by specifying the type of element, element's name, and the name of the measure as follows:
<% type.name.property %>
The following item set consists of 5 statically defined items for use by a text element.
<item shoppinglist>
/ 1="bread"
/ 2="beer"
/ 3="eggs"
/ 4="butter"
/ 5="milk"
</item>
The following item set consists of 2 statically defined items containing variables for use by a text element.
<item shoppinglist>
/ 1="mean latency = <% trial.critical.meanLatency %>"
/ 2="percent correct = <% trial.critical.percentCorrect %>"
</item>
The following item set consists of 4 statically defined images for use by a picture element. The image files are in the same folder as the script.
<item monuments>
/ 1="mountrushmore.jpg"
/ 2="washington.gif"
/ 3="lincoln.bmp"
/ 4="statueofliberty.jpg"
</item>