up Inquisit Language Reference

include element

The include element lists other script files containing elements to be used in the current script.

Attributes

<include>
/ file = path
/ preCondition = { script }
</include>

Properties

include.name
include.typeName

Functions

None.

Remarks

The include element provides a convenient way to reuse elements such as stimuli or instruction pages in multiple scripts. Rather than copying the elements into every script, the elements can be defined in a separate file and referenced via the include element. All files listed in the include element are effectively pasted into the current script file when Inquisit parses the script.

Examples

The following example conditionally includes a script with an item element containing .wmv video files for Windows and .mov files for Mac.

<include>
/ preCondition={ return computer.platform == "win";}
/ file="wmv_videos.iqx"
</include>

<include>
/ preCondition={ return computer.platform == "mac";}
/ file="mov_videos.iqx"
</include>

The following includes stimuli and instruction pages defined in separate script files.

<include>
/ file = "c:\shared elements\stimuli.iqx"
/ file = "c:\shared elements\instructions.iqx"
</include>

Copyright Millisecond Software, LLC. All rights reserved.