Inquisit 6 Help

Welcome to Inquisit 6 Help. You can browse through the table of contents for categories of help, or you can search for help based on keywords using the Index or the Search tabs. In addition, the Inquisit script editor supports context sensitive help - just put the cursor inside any script element and press F1, and the help topic for that element will open. For more information about Inquisit, you may want to join the Millisecond Online Forums , a virtual community where Inquisit users can post questions and share information about Inquisit. In addition, you may visit our web site at https://www.millisecond.com or email us at

Getting Started

Introduction - an overview of Inquisit and how it works.

Inquisit Tutorials - walk through the steps of creating an Inquisit script.

Designing Experiments

Language Reference - a complete guide to Inquisit's commands.

How To - programming tips and tricks, and answers to frequently asked questions.

Additional Online Resources

User Forums - a message board for questions and answers from the Inquisit community.

Inquisit Task Library - download sample scripts demonstrating how to program a variety of tasks in Inquisit.


Introducing Inquisit 6

Inquisit is a general purpose psychological experimentation application for designing and administering psychological experiments and measures. Inquisit can run a given script locally on a Windows PC or Mac, or it can be used to administer tasks over the web. Inquisit can be used to implement a wide range of psychological measures, including reaction time tasks, psychophysiological experiments, attitude measures, surveys, games, learning and memory tasks, judgement and decision making paradigms, and more.

Overview

An Inquisit experiment is specified using Inquisit's powerful and intuitive scripting language. The script defines all of the pieces of the experiment such as the stimuli, questionaire items, trials, blocks of trials, instructions, as well as the logic determining the flow of events. An Inquisit script is saved as a plain text UTF-8 file with the *.iqx file extension. The file format is unicode, so it can store and present characters from any locale, including east Asian, Hebrew, Arabic, and Cyrillic character sets.

To edit a script, simply open the script file using the Open command on the File menu. Once you've opened a script, you can edit it in the rich text editor, or validate the syntax, and run it using the corresponding commands from the Experiment menu.

The Inquisit Scripting Language

The Inquisit language was designed to be easy and approachable to nonprogrammers who are familiar with the basics of experimental psychology. The structure of the Inquisit scripting language should be familiar to anyone who has programmed html and javascript. However, some of the cumbersome aspects of html syntax have been streamlined to make Inquisit scripts easier to read and write.

The Inquisit scripting language consists of elements and attributes, which enable you declare and configure the various parts that make up the task. Elements are the basic building blocks of a script. Commonly used elements include
survey
surveypage
expt (experiment)
block
trial
picture
text
video
html
data
just to name a few.

Each element, in turn, has a set of attributes that determine exactly how that element behaves. For example, Inquisit's text element, which defines a set a text stimuli, has attributes that specify the color, font, and the location of the screen to present the text.

Some elements, such as the expt, block, and trial elements, include event handler attributes that are triggered when the element is run. These enable you to dynamically get and set properties on any element as the script is running using a simple expression syntax similar to Javascript. These special event handler attributes are useful for defining more sophisticated paradigms in which the flow of the task changes based on the subject's performance or other conditions.

Writing an Inquisit script is simply a matter of defining the elements of your experiment and setting their attributes to the desired values. Once you understand this basic idea, it's just a matter of familiarizing yourself with the details of the elements and attributes. To get started learning how to write Inquisit scripts, read through the tutorials.

Running Scripts

For experiments run on a dedicated Windows PC or Mac, scripts are written and run using the Inquisit application. Once you have written script, downloaded one from the Inquisit Task Library, or obtained one from some other source, you can open the script in Inquisit run the entire experiment or right click on a particular element to run just that piece. For web experiments, scripts are run by uploading them to the Millisecond server from your account and then starting them from the launch web page.

When a script is run, Inquisit first parses its commands. If the script contains no errors, it runs. Otherwise, Inquisit reports the errors in the output window at the bottom of the screen. If you click the error, the editor will jump to the line of code that caused the problem. Note that Inquisit does not compile a script into an executable file that can be run by itself. Running a script thus requires the Inquisit application to be installed on the machine, or that it be launched from an Inquisit web page that is specially designed to run it over the web.

Recording Data

As Inquisit Lab runs an experiment, it writes the data to a file. By default, the data file is located in the same folder as the script file using the same name as the script file except that the file extension is changed to "dat". By default, Inquisit Web saves data files to the Inquisit web server where you can log in to your Millisecond account and download the files.

For cognitive tasks, each line of data in the file corresponds to a single trial. In addition, a task can be configured to recorded a single line of summary data for each participant using the summarydata element. For surveys, all responses from each participant are stored on a single line. Inquisit data files can be imported directly into programs like SPSS and Excel for analysis. Inquisit can be configured to record metrics such as mean and median response latencies, standard deviations, percentage of correct response, and even custom statistics, but for most purposes, it is necessary to analyze the data using a statistical analysis program.

Learning Resources

To learn Inquisit, we suggest the following:

  1. Read through the tutorials.
  2. Download and run scripts from the Inquisit Task Library.
  3. Make minor modifications to a scripts from the library using the language reference as your guide (tip: from the editor, press F1 and the reference topic for the currently selected element will open).
  4. Read through the How To topics.
  5. If you get stuck, go to millisecond.com and enter your question in the search box (powered by Google). If you are unable to find the information you need, you can post a question to our online forums or email support@millisecond.com.


Inquisit Walkthrough Tutorials

The following tutorials will guide you through the process of implementing a variety of different psychological tests.

Creating a test or survey is a simple matter of editing script containing instructions and configuration settings telling Inquisit what to do, when to do it, and which data to record (e.g. reaction times, survey responses).

The text that Inquisit uses to perform a set of operations is called a script, typically saved as a file with the *.iqx or *.iqzip file extension. The scripts for the tutorials can be downloaded from our test library here: https://www.millisecond.com/download/library/Tutorials/.

Simplified Implicit Attitude Task This is a stripped down nonstandard version of the IAT that illustrates basic Inquisit programming concepts. The script for this tutorial is in the file iat_tutorial.iqx.

IAT with Custom Categories and Items This shows how to modify a standard IAT using your own attribute and target categories.

Demographic Survey The script for this tutorial is in the file demographics.iqx.

Standard Picture IAT This builds a standard picture IAT from scratch. The tutorial is in the file pictureiat.iqx.

Subliminal Priming Task The script for this tutorial is in the file subliminal_tutorial.iqx.

Covert Attention Task The script for this tutorial is in the file ca_tutorial.iqx.

Dot probe Task The script for this tutorial is in the file ca_tutorial.iqx.


Tutorial: IAT with Custom Categories and Items

This tutorial demonstrates how to customize the Implicit Attitude Task (IAT) as developed by Tony Greenwald et al. The tutorial starts with an IAT template that measures implicit attitudes towards flowers and insects, and shows how to easily replace those categories with your own custom categories and stimulus items.

On the following pages, Inquisit commands are printed in blue, and comments are printed in black.

Before you Begin

  1. Download and install Inquisit Lab
  2. Download the Picture IAT script from the Millisecond Test Library, and double-click to open in Inquisit Lab.

Steps

  1. Modifying Attribute Categories
  2. Modifying Target Categories
  3. Modifying Task Instructions
  4. Changing Response Keys
Modifying Attribute Categories


Implicit Attitude Task Tutorial: Modifying Attribute Categories

Modifying Attribute Categories

The IAT script was organized so that the portions to be modified are conveniently located at the top of the document. The first thing you'll see at the top is a comment with helpful instructions on modifying the stimuli:

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI: change editable stimuli here
**************************************************************************************************************
**************************************************************************************************************
This sample IAT can be easily adapted to different target categories
and attributes. To change the categories, you need only change the
stimulus items and labels immediately below this line.
***********************************************************************

This text is simply a comment for someone authoring a script. It is not a part of the IAT itself, and does not have any impact on how the script runs.

The next section of the script shows attribute labels along with the stimulus items that serve as examples of either attribute category:

<item attributeAlabel>
/1 = "Good"
</item>

<item attributeA>
/1 = "Marvelous"
/2 = "Superb"
/3 = "Pleasure"
/4 = "Beautiful"
/5 = "Joyful"
/6 = "Glorious"
/7 = "Lovely"
/8 = "Wonderful"
</item>

<item attributeBlabel>
/1 = "Bad"
</item>

<item attributeB>
/1 = "Tragic"
/2 = "Horrible"
/3 = "Agony"
/4 = "Painful"
/5 = "Terrible"
/6 = "Awful"
/7 = "Humiliate"
/8 = "Nasty"
</item>

For our IAT, we will change the attributes labels to "Strong" and "Weak" in order to measure how attitudes towards men and women conform to gender stereotyping, and we'll change the stimulus items to examples of these categories.

<item attributeAlabel>
/1 = "Strong"
</item>

<item attributeA>
/1 = "Power"
/2 = "Command"
/3 = "Dominant"
/4 = "Succeed"
/5 = "Assert"
/6 = "Confident"
/7 = "Control"
/8 = "Bold"
</item>

<item attributeBlabel>
/1 = "Weak"
</item>

<item attributeB>
/1 = "Timid"
/2 = "Submissive"
/3 = "Fragile"
/4 = "Follow"
/5 = "Fail"
/6 = "Obey"
/7 = "Hesitant"
/8 = "Uncertain"
</item>

There, that was pretty easy. At this point, we have an IAT that measures implicity associations of flowers and insects as weak or strong. While this may be of interest to botanists and entomologists, the next step for us is to modify the target categories to measure attiitudes towards men and women.


Implicit Attitude Task Tutorial: Creating Text Stimuli

Modifying Target Categories

The next section of the IAT script contains the defintions of the target category labels and stimulus items. In this particular IAT, the targets are represented using images instead of text. Thus, the items refer to the names of image files to display instead of words:

<item targetAlabel>
/1 = "Flowers"
</item>

<item targeta>
/1 = "flower1.jpg"
/2 = "flower2.jpg"
/3 = "flower3.jpg"
/4 = "flower4.jpg"
/5 = "flower5.jpg"
/6 = "flower6.jpg"
/7 = "flower7.jpg"
/8 = "flower8.jpg"
</item>

<item targetBlabel>
/1 = "Insects"
</item>

<item targetb>
/1 = "insect1.jpg"
/2 = "insect2.jpg"
/3 = "insect3.jpg"
/4 = "insect4.jpg"
/5 = "insect5.jpg"
/6 = "insect6.jpg"
/7 = "insect7.jpg"
/8 = "insect8.jpg"
</item>

The labels are defined in <item targetAlabel> and <item targetBlabel>, and the stimulus items are defined in <item targetA> and <item targetB>. First, we'll change our target labels and stimuli for category A, Gryffindor, as follows:

<item targetAlabel>
/1 = "Gryffindor"
</item>

Next, we'll changes the image items. First, I must copy the image files you wish to use to the SAME FOLDER as the script file you are currently editing. If they aren't in the same folder, Inquisit Lab won't know where to find them and will show an error when you try to run the script. In this example, you can download 5 pictures representing Gryffindor and name them gryffindor1.jpg through gryffindor5.jpg. Note that the Inquisit IAT allows you to specify as many items as you wish, the number need not be 8.

<item targeta>
/1 = "gryffindor1.jpg"
/2 = "gryffindor2.jpg"
/3 = "gryffindor3.jpg"
/4 = "gryffindor4.jpg"
/5 = "gryffindor5.jpg"
</item>

Next we'll create change the label and stimuli for category B, Slytherin:

<item attributeBlabel>
/1 = "Slytherin"
</item>

<item attributeB>
/1 = "slytherin1.jpg"
/2 = "slytherin2.jpg"
/3 = "slytherin3.jpg"
/4 = "slytherin4.jpg"
/5 = "slytherin5.jpg"
/6 = "slytherin6.jpg"
/7 = "slytherin7.jpg"
/8 = "slytherin8.jpg"
</item>

If you're goal is to simply to adapt the IAT to a particular set of attributes and targets, I have good news. You're done! To run your IAT, just select the Run command on Inquisit's Experiment menu. Now go collect some data.

In the next section, we'll cover where task instructions for in the IAT are defined in case you need to modify the text or translate the instructions to another language.


Implicit Attitude Task Tutorial: Modifying Task Instructions

Modifying Task Instructions

Typically, you will NOT need to modify the IAT instructions.

If you do need to modify them, for example, because you are testing non-native English speakers, or a population that would benefit from additional or specially worded instructions, you can easily modify the text to suit your needs. The IAT sample includes general instructions that have been written to apply to any IAT, regardless of the attributes or targets.

If you scroll down below the target category definitions, you'll find the following element, which specifies the text for 7 pages of instructions that appear throughout the IAT. Instructions are defined using the <item> element, just as the attribute and target stimuli were. One difference, however, is that the instruction items formatted with line breaks, which helps make them more readable when presented on the screen.

<item instructions>
/ 1 = "Put your left finger on the 'E' response key for items that belong to the category '<%expressions.leftTarget%>'.
Put your right finger on the 'I' response key for items that belong to the category '<%expressions.rightTarget%>'.
~nItems will appear one-by-one in the middle of the screen.
~nIf you make an error, a red X will appear - to continue, press the other response key.
~nGo as fast as you can while making as few errors as possible."

/ 2 = "Put your left finger on the 'E' response key for items that belong to the category '<%item.attributeAlabel.item(1)%>'.
Put your right finger on the 'I' response key for items that belong to the category '<%item.attributeBlabel.item(1)%>'.
~nIf you make an error, a red X will appear - to continue, press the other response key.
~nGo as fast as you can while making as few errors as possible."

/ 3 = "Press the left 'E' key for '<%item.attributeAlabel.item(1)%>' and '<%expressions.leftTarget%>'.
Press the right 'I' key for '<%item.attributeBlabel.item(1)%>' and '<%expressions.rightTarget%>'.
~nEach item belongs to only one category.
~nIf you make an error, a red X will appear - to continue, press the other response key.
~nGo as fast as you can while making as few errors as possible."

/ 4 = "This is the same task as the previous one.
~n~nPress the left 'E' key for '<%item.attributeAlabel.item(1)%>' and '<%expressions.leftTarget%>'.
Press the right 'I' key for '<%item.attributeBlabel.item(1)%>' and '<%expressions.rightTarget%>'.
~nEach item belongs to only one category.
~nGo as fast as you can while making as few errors as possible."

/ 5 = "Attention! The labels have changed sides.
~nPress the left 'E' key for '<%expressions.rightTarget%>'.
Press the right 'I' key for '<%expressions.leftTarget%>'.
~nGo as fast as you can while making as few errors as possible."

/ 6 = "Press the left 'E' key for '<%item.attributeAlabel.item(1)%>' and '<%expressions.rightTarget%>'.
Press the right 'I' key for '<%item.attributeBlabel.item(1)%>' and '<%expressions.leftTarget%>'.
~nIf you make an error, a red X will appear - to continue, press the other response key.
~nGo as fast as you can while making as few errors as possible."

/ 7 = "This is the same task as the previous one.
~nPress the left 'E' key for '<%item.attributeAlabel.item(1)%>' and '<%expressions.rightTarget%>'.
Press the right 'I' key for '<%item.attributeBlabel.item(1)%>' and '<%expressions.leftTarget%>'
~nEach item belongs to only one category.
~nGo as fast as you can while making as few errors as possible."
</item>

You can modify the instruction pages just as you did the attributes and category items, by simply editing the text within quotation marks.

If you make significant change to the instructions, you might also need to change the size and location at which the text is presented on the screen. The element that controls how instruction text is presented is the following:

<text instructions>
/ items = instructions
/ position = (10%, 25%)
/ halign = left
/ valign = top
/ hjustify = left
/ vjustify = center
/ size = (80%, 50%)
/ select = values.instructionIndex
</text>

The <text> element is used to define how a set of text items are presented. The first command in the element, / items = instructions, specifies that the actual text items are defined in an <item> element called "instuctions", which is the <item instruction> element we just covered above. The / hjustify = left command specifies that text should be left justified. You can also set this to "center" or "right" (e.e., for right to left languages like Hebrew). The / size = (90%, 60%) specifies the size of the bounding rectangle in which the text should be presented (and words are wrapped). In this case, the width is 90% of the screen, and the height is 60%. By using percentages, the size will scale across monitors with different display resolutions. The /position = (50%, 85%) command specifies the position on the screen, which is the located horizontally at the midpoint of the screen and 85% of the way veritically towards the bottom. The /valign = bottom command specifies that the bottom of the bounding rectangle containing the text should align with the point on the screen specified by the position command. The rest we'll ignore for now.

Note that if you need to resize the text itself, you can do so using the /fontstyle command. To change the fontstyle, insert the cursor inside the <text instructions> element and select the "Font Wizard" command from the Tools menu. This will launch a graphical font picker that will allow you to choose the font parameters and insert the corresponding /fontstyle command into the script.


Implicit Attitude Task Tutorial: Changing Response Keys

Changing Response Keys

By default, the IAT uses the E and I keys to indicate a left and right response. The response keys are defined using the <trial> element, which is rseponsible for presenting stimuli and gathering responses. The IAT has six different <trial> elements. The first two, shown below, present stimuli from attribute A and attribute B respectively:

<trial attributea>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA, errorReminder]
/ posttrialpause = parameters.ISI
</trial>

<trial attributeb>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB, errorReminder]
/ posttrialpause = parameters.ISI
</trial>

The validresponse command defines two permissible responses for either trial, "E" and "I". The correctresponse defines which of these responses is considered correct for purposes of scoring and error feedback. For attribute A, the "E" key is always correct. For attribute B, the "I" key is correct. You can change the keys used for responding by replacing "E" and "I" with whatever character you like. If you are using another input device such as a response box, you can replace these with the numeric values corresponding to the buttons.

The remaining four trials present targets A and B. Recall that the IAT presents the targets with both compatible and incompatible attribute pairings, so there are two trials defined for each target category that vary in whether "E" or "I" is considered the correct response. Again, the particular keys used can be modified as they were with the attribute trials.

<trial targetBleft>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = targetB, errorReminder]
/ posttrialpause = parameters.ISI
</trial>

<trial targetBright>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = targetB, errorReminder]
/ posttrialpause = parameters.ISI
</trial>

<trial targetAleft>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = targetA, errorReminder]
/ posttrialpause = parameters.ISI
</trial>

<trial targetAright>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = targetA, errorReminder]
/ posttrialpause = parameters.ISI
</trial>

The tutorial is now complete! You can run the IAT by selecting the "Run" command on the "Experiment" menu.


Tutorial: Standard Picture IAT

Download script for this tutorial.

This tutorial builds an Implicit Attitude Task (IAT) modeled after the version that runs on the Project Implicit web site (https://www.projectimplicit.net/). This version of the task measures implicit attitudes towards flowers and insects as represented by pictures.

This tutorial walks through the process of building an IAT from scratch. If your goal is simply to adapt the IAT to your own attribute and target categories, you need only make a few simple modifications to the sample script as indicated at the end of the section on creating text stimuli; you can skip the rest. This tutorial will be of interest to anyone interested in the details of the IAT procedure, or who wishes to modify the procedure. The tutorial also illustrates a number of intermediate and advanced concepts that are relevant to other procedures besides the IAT.

On the following pages, Inquisit commands are printed in blue, and comments are printed in black:

Before you Begin

  1. Download and install Inquisit Lab

Steps

  1. Creating Text and Picture Stimuli
  2. Creating Instructions
  3. Creating Trials
  4. Creating Blocks
  5. Creating an Experiment
Creating Text Stimuli


Standard Picture IAT Tutorial: Creating Text and Picture Stimuli

Creating Text and Picture Stimuli

The first step in creating our script is to define the various stimuli that will be presented in the IAT. In this case, the stimuli will be a mix of text (good and bad words) and pictures (flowers and insects). Other stimuli include task instructions, a big red "X" for an error message, and category labels to remind participants which response keys map to which categories.

The good and bad text stimuli are defined as follows:

<text attributeA>
/ items = attributeA
/ txcolor = (0, 255, 0)
</text>

<text attributeB>
/ items = attributeB
/ txcolor = (0, 255, 0)
</text>

The txcolor attribute sets the red, green, and blue components of the text color. Green is set to the maximum value, wherease red and blue are 0, so both sets of words will appear green. The actual words in the set are specified separately in item elements called "attributeA" and "attributeB", which are defined below. We'll use generic names like "attribruteA" throughout the script to illustrate that the script contains mostly generic IAT logic that can be easily adapted to different target categories and attributes.

Next, we'll define the pictures representing the target categories, flowers and insects:

<picture targetB>
/ items = targetB
/ size = (20%, 20%)
</picture>

<picture targetA>
/ items = targetA
/ size = (20%, 20%)
</picture>

Like the text elements, the items are defined in separate item elements. The size of the pictures is set to 20% of the height and width of the screen. In fact, all sizes for pictures and text in this script will be defined in terms of percentage of the screen. This allows the IAT to scale proportionally to different monitor sizes, making it suitable for the web where users run a wide range of display systems.

Now we'll define the category labels that appear in the upper left and right corners of the screen. The attribute labels are as follows:

<text attributeAleft>
/ items = attributeAlabel
/ valign = top
/ halign = left
/ position = (5%, 5%)
/ txcolor = (0, 255, 0)
</text>

<text attributeBright>
/ items = attributeBlabel
/ valign = top
/ halign = right
/ position = (95%, 5%)
/ txcolor = (0, 255, 0)
</text>

The first label is presented in the upper left corner at a 5% margin from the upper and left edges of the screen as defined by the position attribute. The second label is presented in the upper right corner of the screen, again with 5% margins. The color of both labels is green, just like the stimuli themselves. The items attribute specifies that the actual label text is defined in an item elements below.

Now for the target labels. These are similar to the attribute labels, except that they are presented in the default text color (we'll set the default to white later in the tutorial).

<text targetAleft>
/ items = targetAlabel
/ valign = top
/ halign = left
/ position = (5%, 5%)
</text>

<text targetBright>
/ items = targetBlabel
/ valign = top
/ halign = right
/ position = (95%, 5%)
</text>

Recall that in the IAT, the target categories switch sides midway through the test, so we'll also define labels that place category A on the right and B on the left:

<text targetBleft>
/ items = targetBlabel
/ valign = top
/ halign = left
/ position = (5%, 5%)
</text>

<text targetAright>
/ items = targetAlabel
/ valign = top
/ halign = right
/ position = (95%, 5%)
</text>

Next we'll create category labels for the critical trials where the targets and attributes are mixed together, for example, "Flowers or Good" and "Insects or Bad". On these trials, we'll present the target labels we created above. Just below those labels we'll present the word "or", and just below those the attribute labels will be presented:

<text orleft>
/ items = ("or")
/ valign = top
/ halign = left
/ position = (5%, 12%)
</text>

<text attributeAleftmixed>
/ items = attributeAlabel
/ valign = top
/ halign = left
/ position = (5%, 19%)
/ txcolor = (0, 255, 0)
</text>

These labels are similar to those above, except that the position attribute specifies that the "or" label be presented 12% of the way from the top of the screen just below the target label. The attribute label appears 19% of the way down the screen below the "or". Now we'll create the corresponding labels for the right side of the screen:

<text orright>
/ items = ("or")
/ valign = top
/ halign = right
/ position = (95%, 12%)
</text>

<text attributeBrightmixed>
/ items = attributeBlabel
/ valign = top
/ halign = right
/ position = (95%, 19%)
/ txcolor = (0, 255, 0)
</text>

That does it for the labels. Now we'll define instruction text:

<text instructions>
/ items = instructions
/ hjustify = left
/ size = (90%, 60%)
/ position = (50%, 85%)
/ valign = bottom
/ select = instructions
/ fontstyle = ("Arial", 3.5%)
</text>

The instructions text element differs from the others above in that it uses the size attribute to define a rectangle within which the presented text is word-wrapped. This is useful for displaying sentences and paragraphs. The hjustify command specifies that text should be left justified within this rectangle. Whereas the previous text elements use the default font, the instructions element specifies the "Arial" font at 3.5% of the screen height.

The final difference to note is the select attribute. There are a total of 7 instruction items (defined below). Each time this text element is presented, a different item is selected for presentation. The select attribute specifies that the rules for selecting the next item are contained in a counter element named instructions, which is defined as follows:

<counter instructions>
/ resetinterval = 20
/ select = sequence(1, 2, 3, 4, 5, 6, 7)
</counter>

The counter element allows you to create a customized selection algorithm. In this case, the counter's select attribute specifies that items should be selected in sequence (1, 2, 3, 4, 5, 6, 7). What does the resetinterval mean? By default, counters only remember selection for the duration of a single block. Once that block is over, the counter is reset, its memory erased, so that next time it is used for selection, it will start the sequence from the begining. The resetinterval attribute specifies how many blocks the counter memory lasts. We want the counter to track the state of the sequence for the duration of the experiment, so we've set it here to an arbitrary high number of 20. Any number greater than the number of blocks in the IAT would do the trick here.

Next we'll create a simple text that tells participants to hit the space bar to advance past the instructions. This appears in the lower middle of the screen beneath the instructions text.

<text spacebar>
/ items = ("Press the SPACE BAR to begin.")
/ position = (50%, 95%)
/ valign = bottom
/ fontstyle = ("Arial", 3.5%)
</text>

Just one last text element to create and we'll move on to the actual item sets used by some of the stimuli above.

<text error>
/ position = (50%, 75%)
/ items = ("X")
/ color = (255, 0, 0)
/ fontstyle = ("Arial", 10%, true)
</text>

The element above creates an error stimulus, which is a big red "X", presented in a bold Arial font that is 10% of the height of the screen. Hard for our participants to miss that.

If you're goal is simply to adapt the IAT to a specific set of target and attribute categories, the last section below is by far the most interesting. This section defines the labels and members of each category. The logic contained in the rest of the script is generic to any category. Thus, in order to change the categories, we can make all of our modifications here and leave the rest of the IAT procedure as is.

First we'll define the label and members of the "Good" category:

<item attributeAlabel>
/1 = "Good"
</item>

<item attributeA>
/1 = "Marvelous"
/2 = "Superb"
/3 = "Pleasure"
/4 = "Beautiful"
/5 = "Joyful"
/6 = "Glorious"
/7 = "Lovely"
/8 = "Wonderful"
</item>

Next we'll define the label and members of the "Bad" category:

<item attributeBlabel>
/1 = "Bad"
</item>

<item attributeB>
/1 = "Tragic"
/2 = "Horrible"
/3 = "Agony"
/4 = "Painful"
/5 = "Terrible"
/6 = "Awful"
/7 = "Humiliate"
/8 = "Nasty"
</item>

Our IAT will test participants' preferences for flowers or insects, so the following specify the labels and pictures files for these categories:

<item targetAlabel>
/1 = "Flowers"
</item>

<item targetA>
/1 = "flower1.jpg"
/2 = "flower2.jpg"
/3 = "flower3.jpg"
/4 = "flower4.jpg"
/5 = "flower5.jpg"
/6 = "flower6.jpg"
/7 = "flower7.jpg"
/8 = "flower8.jpg"
</item>

<item targetBlabel>
/1 = "Insects"
</item>

<item targetB>
/1 = "insect1.jpg"
/2 = "insect2.jpg"
/3 = "insect3.jpg"
/4 = "insect4.jpg"
/5 = "insect5.jpg"
/6 = "insect6.jpg"
/7 = "insect7.jpg"
/8 = "insect8.jpg"
</item>

That's does it for stimuli. This section has demonstrated a number of concepts, including presenting pictures and text, controlling stimulus size and position on the screen, specifying size, color, and face of a font, using a custom algorithm for stimulus item selection, and more.


Standard Picture IAT Tutorial: Creating Instructions

Creating Instructions

Instructions can be presented as text stimuli like those created in the previous section. Inquisit also provides a built-in facility for presenting instruction pages in html or plain text. In this tutorial, we will use this facility to present a summary of the participant's performance.

The summary page is defined as follows:

 <page summary>
^Below is a summary of your average response time for two different configurations.
^^Configuration 1: <% item.targetAlabel.1 %> with <% item.attributeAlabel.1 %>, <% item.targetBlabel.1 %> with <% item.attributeBlabel.1 %>
^    <%block.compatibletest.meanlatency%> milliseconds
^^Configuration 2: <% item.targetAlabel.1 %> with <% item.attributeBlabel.1 %>, <% item.targetBlabel.1 %> with <% item.attributeAlabel.1 %>
^    <%block.incompatibletest.meanlatency%> milliseconds
^^Did you respond much more quickly on one of the configurations than the other? If so, that configuration may be more consistent with your attitudes about these categories.
^^Thank you for your participation. Please press 'Continue' to end the test.
</page>

The "^" character is used to force a line break when the page is presented on screen. The page also includes several properties enclosed in "<% %>". When the page is displayed, these properties are replaced by the actual underlying property values. For example, <% block.compatibletest.meanlatency %> is replaced by the mean latency on the block named "compatibletest", and <% item.targetAlabel.1 %> is replaced by the first item in the item set named "targetAlabel".

Next we'll create the instruct element which determines how instruction pages are presented, and how the user navigates through them.

<instruct>
/ nextlabel = "Continue"
/ lastlabel = "Continue"
/ prevkey = (0)
/ inputdevice = mouse
/ windowsize = (90%, 90%)
/ screencolor = (0,0,0)
/ fontstyle = ("Arial", 3%)
/ txcolor = (255, 255, 255)
</instruct>

The inputdevice attribute specifies that users can navigate through the instructions by clicking the mouse. The nextlabel and lastlabel specifies the text label for the navigation button that advances to the next page, or that advances past the last page. By setting prevkey to "0", we ensure that users can not navigate backwards through the pages. Finally, we've defined look and feel of instruction pages using the screencolor, fontstyle, and windowsize commands.


Standard Picture IAT Tutorial: Creating Trials

Creating Trials

The IAT task requires that we create trial elements that present the stimuli representing the target and attribute categories and gather classification responses to those stimuli. There are six types of trials used in this task depending on which category of stimulus is presented and which response key is assigned as the correct classification of the category.

First, let's define trials involving good words:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA]
/ posttrialpause = 250
</trial>

The trial element's name is attributeA, which is also the name of the text element containing the good attribute words. The validresponse command indicates that participants may respond by pressing the "E" or the "I" key on the keyboard. The "E" key is considered a correct response as specified by the correctresponsecommand. The posttrialpause attribute specifies that after the response, Inquisit inserts a 250 ms pause before advancing to the next trial.

The definition of the other trial elements are the similar to attributeA , differing only in the type of stimulus presented and the response that's considered correct.

Here's the definition of trials with bad words where "I" is a correct response:

<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB]
/ posttrialpause = 250
</trial>

Next come trials with insect pictures classified with the "E" key:

<trial targetBleft>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = targetB]
/ posttrialpause = 250
</trial>

Trials with insect pictures classified with the "I" key:

<trial targetBright>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = targetB]
/ posttrialpause = 250
</trial>

Trials with flower pictures classified with the "E" key:

<trial targetAleft>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = targetA]
/ posttrialpause = 250
</trial>

Trials with flower pictures classified with the "I" key:

<trial targetAright>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = targetA]
/ posttrialpause = 250
</trial>

The trials above capture the different combinations of stimulus category and correct response in the IAT. Our script will define one additional trial used to present task instructions to participants. This trial is defined as follows:

<trial instructions>
/ stimulustimes = [1=instructions, spacebar]
/ correctresponse = (" ")
/ errormessage = false
/ recorddata = false
</trial>

The stimulustimes attribute specifies that the trial presents two text stimuli, one called "instructions" which contains the IAT task instructions, and another called "spacebar" which informs the participant they can press the spacebar to advance to the next trial. The correctresponse attribute indicates that pressing the spacebar key is the only correct response, and since the trial contains no validresponse definition, the spacebar is the only valid response as well. No error feedback is presented on this trial. Since the trial does not gather any data of interest, we've set recorddata to false so that the data for this trial (e.g., response, latency, stimuli, etc.) are not recorded to the data file. This helps us keep our data files concise and clean, and it saves us the trouble of having to filter out this data later.


Standard Picture IAT Tutorial: Creating Blocks

Creating Blocks

Next we'll define the different kinds of blocks of trials used in the IAT. Blocks represent sequences of trials that can be in random or predetermined order. For this experiment, 11 block elements will be defined, 7 for practice at the IAT task, 2 for IAT data collection, and 2 for presenting task instructions.

First, let's define the practice block element for classification of the attribute categories, good and bad.

<block attributepractice>
/ bgstim = (attributeAleft, attributeBright)
/ trials = [1=instructions;2-21 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
</block>

This block element is named "attributepractice". The trials attribute specifies that the block runs 1 instruction trial followed by 20 trials randomly selected without replacement from the two trial types "attributeA" and "attributeB", which present good and bad words respectively. The selection algorithm guarantees that both trial types will be run 10 time each. The bgstim attribute specifies that the "attributeA" and "attributeB" category labels are presented on the screen as background stimuli to remind participants how the response keys map to the categories. The errormessage attribute presents the stimulus named "error" (our big red X) for 200 ms whenever subjects respond incorrectly. The responsemode for the block is set to correct, which means participants must give the correct response to advance to the next trial, even if their initial resposne was incorrect. Finally, recorddata is set to false so that our data file isn't cluttered up with practice data from this block.

The rest of the blocks have a similar pattern. Next, lets define the practice blocks used for target categories. There are two such blocks for the two possible key assignments. Here is the practice block on which insects are classified with the right key and flowers with the left:

<block targetcompatiblepractice>
/ bgstim = (targetAleft, targetBright)
/ trials = [1=instructions;2-21 = noreplace(targetAleft, targetBright)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
</block>

Now, lets define a practice block on which insects are classified with the left key and flowers with the right:

<block targetincompatiblepractice>
/ bgstim = (targetAright, targetBleft)
/ trials = [1=instructions;2-21 = noreplace(targetAright, targetBleft)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
</block>

Next, lets define the practice blocks used after the key assignments for the target categories are switched. First, we'll define the block on which insects are classified with the left key and flowers with the right:

<block targetincompatiblepracticeswitch>
/ bgstim = (targetAleft, targetBright)
/ trials = [1=instructions;2-41 = noreplace(targetAleft, targetBright)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
</block>

Next we'll define the opposite key assignments:

<block targetincompatiblepracticeswitch>
/ bgstim = (targetAright, targetBleft)
/ trials = [1=instructions;2-41 = noreplace(targetAright, targetBleft)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
</block>

Notice that there are 40 practice trials in these blocks rather than 20. The extra trials are included to help subjects unlearn the key assignments from the previous blocks.

We've defined two blocks for the initial key assignment, and two more blocks or the key assignment after the switch. Since each subject can only have one initial assignment and one switched assignment, each subject will only encounter one of them depending on which key assignment condition they are assigned to.

The practice blocks above handle single category judgements, so we still need to define the practice for the mixed judgment blocks in which participants have to classify both attribute and target stimuli:

<block compatiblepractice>
/ bgstim = (targetAleft, orleft, attributeAleftmixed, targetBright, orright, attributeBrightmixed)
/ trials = [1=instructions;
  3,5,7,9,11,13,15,17,19,21= noreplace(targetAleft, targetBright);
  2,4,6,8,10,12,14,16,18,20 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
</block>

<block incompatiblepractice>
/ bgstim = (targetBleft, orleft, attributeAleftmixed, targetAright, orright, attributeBrightmixed)
/ trials = [1=instructions;
  3,5,7,9,11,13,15,17,19,21 = noreplace(targetBleft, targetAright);
  2,4,6,8,10,12,14,16,18,20 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
</block>

These are similar to previous practice blocks. One notable difference is that the bgstim attribute presents both target and attribute labels. Another difference is how the sequence of trials are defined. On odd numbered trials (excluding the instructions trial), the block runs a randomly selected target classification trial. On even numbered trials, a randomly selected attribute trial is run. This ensures that the participant does not encounter a run of trials in which they are making only flower/insect judgments or only bad/good judgments.

That does it for practice blocks. Lets define the test blocks. There are two such blocks, one using a "compatible" (i.e., stereotype consistent) pairing of target and attribute categories, and the other using the incompatible pairing:

<block compatibletest>
/ bgstim = (targetAleft, orleft, attributeAleftmixed, targetBright, orright, attributeBrightmixed)
/ trials = [
  2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40 = noreplace(targetAleft, targetBright);
  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
</block>

<block incompatibletest>
/ bgstim = (targetBleft, orleft, attributeAleftmixed, targetAright, orright, attributeBrightmixed)
/ trials = [
  2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40 = noreplace(targetBleft, targetAright);
  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39 = noreplace(attributeA, attributeB)]
/ errormessage = true(error,200)
/ responsemode = correct
</block>

These blocks differ from the practice blocks in that they run 40 trials rather than 20, they do not have recorddata set to false, and they include no instruction trials. Instructions are instead displayed in a special instructions block. The reason for presenting the instruction trial in a separate block is because our summary page that we created earlier reports the average response latency score for the entire test block. If the test block included an instruction trial, the latency on this trial would also be included in the average. Since we want to report the average latency for test trials only and not instruction trials, we pulled the instruction trial out of the test block and put it into its own instruction block. The instruction blocks are defined below:

<block compatibletestinstructions>
/ bgstim = (targetAleft, orleft, attributeAleftmixed, targetBright, orright, attributeBrightmixed)
/ trials = [1=instructions]
/ recorddata = false
</block>

<block incompatibletestinstructions>
/ bgstim = (targetBleft, orleft, attributeAleftmixed, targetAright, orright, attributeBrightmixed)
/ trials = [1=instructions]
/ recorddata = false
</block>

That concludes our block definitions.


Standard Picture IAT Tutorial: Creating Experiments

Creating an Expt

The expt element defines the sequence in which blocks are run. For our picture IAT, the expt element is defined as follows:

<expt>
/ blocks = [1=attributepractice; 2=block2; 3=block3; 4=block4; 5=block5; 6=block6; 7=block7; 8=block8; 9=block9]
/ postinstructions = (summary)
</expt>

The expt element is pretty simple. The blocks attribute specifies a sequence of 9 blocks. The first block is "attributepractice" block in which subjects practice classifying the good and bad word stimuli. Blocks 2 through 9 are set to between-subject variables named "block2", "block3", "block4", "block5", etc. When the script is run, these variables will be set to the names of real blocks depending on the subject number that is assigned. By using between-subject variables, the script counterbalances the order in which the test blocks are run across subjects so that half our subjects run the compatible pairing first, and the other half runs the incompatible pairing.

The between-subject variables are defined as follows:

<variables>
/ group = (1 of 2) (block2=targetcompatiblepractice; block3=compatiblepractice; block4=compatibletestinstructions; block5=compatibletest; block6=targetincompatiblepractice; block7=incompatiblepractice; block8=incompatibletestinstructions; block9=incompatibletest]
/ group = (2 of 2) (block2=targetincompatiblepractice; block3=incompatiblepractice; block4=incompatibletestinstructions; block5=incompatibletest; block6=targetcompatiblepractice; block7=compatiblepractice; block8=compatibletestinstructions; block9=compatibletest]
</variables>

The variables element defines between-subject variables based on the subject number that was entered when the experiment is run. The first group attribute specifies the variable values for odd numbered subjects (i.e., the first of every two subjects). For odd-numbered subjects, block2 is targetcompatiblepractice, block3 is compatiblepractice, block4 is compatibletestinstructions, and so on. Thus, odd numbered subjects perform classifications with the compatible pairing first. For even-numbered subjects, the incompatible pairing comes first.

By default, Inquisit will save a lot of data to the data file, much of which isn't relevant to the IAT. Although there's not much harm in having this data around, we can save ourselves some time and disk space by telling Inquisit to save just the data we care about. We do this in the data element as follows:

<data>
/ columns = (date time subject blockcode blocknum trialcode trialnum response correct latency stimulusnumber1 stimulusitem1 stimulusnumber2 stimulusitem2)
</data>

The columns attribute lists the data columns to save. All other data columns will not be saved.

Finally, we'll specify some default settings that apply to this script using the defaults element.

<defaults>
/ screencolor = (0,0,0)
/ txbgcolor = (0,0,0)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 5%)
</defaults>

The screencolor attribute sets the color of the screen throughout the experiment to black. The txcolor and txbgcolor attributes specify the foreground and background colors for text stimuli as white text on a black background. The fontstyle attribute specifies that all text elements should be presented in Arial font at 5% of the screen height unless otherwise specified.

Our Picture IAT is now complete. You can run the experiment by selecting the "Run" command on the "Experiment" menu.


Tutorial: Simplified Implicit Attitude Task

Tutorial: Simple Implicit Attitude Task

Download script for this tutorial.

This tutorial builds a simplified Implicit Attitude Task (IAT). A number of standard IAT procedures have been omitted for the sake of illustrating basic Inquisit programming concepts. The script produced by this tutorial is provided for instructional purposes only and should not be used for research. To learn how to create an up-to-date IAT, please see the IAT with Custom Categories and Items Tutorial or the Picture IAT Tutorial.

On the following pages, Inquisit commands are printed in blue, and comments are printed in black:

Before you Begin

  1. Download and install Inquisit Lab

Steps

  1. Creating Text Stimuli
  2. Creating Instructions
  3. Creating Trials
  4. Creating Blocks
  5. Creating an Experiment
Creating Text Stimuli


Simple Implicit Attitude Task Tutorial: Creating Text Stimuli

Creating Text Stimuli

The first step in building an experiment is to define all of the stimuli. Stimuli include text or pictures to be shown on a given trial, background text that remains on the screen throughout a block of trials, or a feedback text shown to the subject to indicate when to respond and whether their response was correct or incorrect.

First, let's define the pleasant words:

<text pleasant>
/ items = pleasant
</text>

This text element defines a set of text stimuli named "pleasant" that has one attribute, items. The items attribute indicates where the text items are defined. In this case, they are defined in an item element named "pleasant" somewhere else in the script (more on this below). There are a number of other attributes that could be specified for our text stimulus, including attributes for controling the color, background color, screen position, and font. However, we'll just use the defaults of black text on a white background presented in the middle of the screen.

Now, lets define the items for this text element:

<item pleasant>
/ 1 = "        HONOR        "
/ 2 = "        LUCKY        "
/ 3 = "       DIAMOND       "
/ 4 = "        LOYAL        "
/ 5 = "       FREEDOM       "
/ 6 = "       RAINBOW       "
/ 7 = "         LOVE        "
/ 8 = "        HONEST       "
/ 9 = "        PEACE        "
/10 = "        HEAVEN       "
</item>

This item element is named "pleasant", which matches the name specified in the items attribute of the text element above. The item set consists of ten pleasant words. Note that the words are padded with spaces so that they are all of equal length when presented in a fixed width font.

Now, lets define the rest of the stimulus categories. First, we'll define the unpleasant words:

<text unpleasant>
/ items = unpleasant
</text>

and the unpleasant items.

<item unpleasant>
/ 1 = "         EVIL        "
/ 2 = "        CANCER       "
/ 3 = "       SICKNESS      "
/ 4 = "       DISASTER      "
/ 5 = "       POVERTY       "
/ 6 = "        VOMIT        "
/ 7 = "         BOMB        "
/ 8 = "        ROTTEN       "
/ 9 = "        ABUSE        "
/10 = "        MURDER       "
</item>

Next, we'll define the flowers:

<text flower>
/ items = flowers
</text>
and the flower items.
<item flowers>
/ 1 = "        ROSE         "
/ 2 = "       BEGONIA       "
/ 3 = "       VIOLET        "
/ 4 = "        DAISY        "
/ 5 = "      GERANIUM       "
/ 6 = "        TULIP        "
/ 7 = "      CARNATION      "
/ 8 = "      DAFFODIL       "
/ 9 = "        LILAC        "
/ 10=  "        PANSY        "
</item>

Finally, we'll define the insects:

<text insect>
/ items = insects
</text>
and insect items.
<item insects>
/ 1 = "         ANT         "
/ 2 = "       LOCUST        "
/ 3 = "         BEE         "
/ 4 = "       HORNET        "
/ 5 = "        WASP         "
/ 6 = "       SPIDER        "
/ 7 = "      CENTIPEDE      "
/ 8 = "      COCKROACH      "
/ 9 = "       BEDBUG        "
/ 10= "       LADYBUG       "
</item>

When creating an IAT, it's a good idea to include instruction text that reminds participants how to respond to the various stimulus categories. We can do this by presenting text on the screen that are shown in the background throughout a block of trials. So, let's create the instruction text stimuli that remind the subject to press the "a' key for unpleasant and the "5' key for pleasant.

<text pleasantreminder>
/ items = ("Press 'a' for pleasant")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>

The reminder stimulus is a bit different than the previous stimuli. First, rather than defining the items in a separate element, we've simply listed the single item directly in the attribute. This inline syntax is a convenient way to define small item sets for things like instrutions, focus stimuli, and masks. Also, the position attribute specifies that the text should be displayed on the upper right of the screen rather than in the default center position. Specifically, the stimulus is positioned 75% of way across the screen (from left to right), and 25% percent of the way down the screen (from top to bottom). Finally,the txcolor attribute specifies that the text should be blue rather than the default color black. Colors in Inquisit are specified as a mix of red, green, and blue components; the txcolor attribute specifies 0 intensity for red and green components, and the maximum intensity 255 for the blue component, producing a nice blue color.

Now, lets define the unpleasant reminder, which will be displayed in the upper left quadrant of the screen.

<text unpleasantreminder>
/ items = ("Press '5' for unpleasant")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>

and the rest of the reminders:

<text flowerleft>
/ items = ("Press 'a' for flowers")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>
<text flowerright>
/ items = ("Press '5' for flowers")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>
<text insectleft>
/ items = ("Press 'a' for insects")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>

<text insectright>
/ items = ("Press '5' for insects")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>

<text pleasant_flower>
/ items = ("Press '5' for pleasant or flowers")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>
<text pleasant_insect>
/ items = ("Press '5' for pleasant or insects")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>

<text unpleasant_flower>
/ items = ("Press 'a' for unpleasant or flower")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>

<text unpleasant_insect>
/ items = ("Press 'a' for unpleasant or insect")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>

Finally, lets define an error message stimulus to show subjects whenever they incorrectly classify a target stimulus:

<text errormessage>
/ items = ("        ERROR        ")
/ txcolor = (255, 0, 0)
</text>

The "errormessage" text element uses the txcolor attribute to set the red component to 255 and the green and blue components to 0, producing a rich red color.


Simple Implicit Attitude Task Tutorial: Creating Instructions

Creating Instructions

Now lets define a set of instruction pages that inform the subject how to perform the task. Defining the instruction pages is easy using the page element. First, we'll define a simple welcome page.

 <page intro>
 ^^^^^^^ Implicit Association Test
 ^^Welcome and thank you for participating.
</page>

Note that the "^" character is used to force a line break. Otherwise, lines of text are word-wrapped. Now we'll define the rest of the instruction pages:

<page up>
The tasks that you will be doing in this experiment involve CATEGORY JUDGMENT. On each trial, a stimulus will be displayed, and you must assign it to one of two categories. You should respond AS RAPIDLY AS POSSIBLE in categorizing each stimulus, but don't respond so fast that you make many errors. (Occasional errors are okay.)^^
The two categories that you are to distinguish are:^^
UNPLEASANT vs. PLEASANT words.^^
Press the "a' key if the stimulus is an UNPLEASANT word.^^
But press "5' key if the stimulus is a PLEASANT word.^^
</page>

<page if>
The two categories that you are to distinguish are:^^
INSECTS vs. FLOWERS.^^
Press the "a' key if the stimulus is an INSECT.^^
But press "5' key if the stimulus is a FLOWER.^^
</page>

<page fi>
The two categories that you are to distinguish are:^^
FLOWERS vs. INSECTS.^^
Press the "a' key if the stimulus is a FLOWER.^^
But press "5' key if the stimulus is an INSECT.^^
</page>

<page compatible>
The four categories that you are to distinguish are:^^
UNPLEASANT vs. PLEASANT words^
or^
INSECTS vs. FLOWERS.^^
Press the "a' key if the stimulus is^
an UNPLEASANT word or an INSECT.^^
But press "5' key if the stimulus is^
a PLEASANT word or a FLOWER.^^
</page>

<page incompatible>
The four categories that you are to distinguish are:^^
UNPLEASANT vs. PLEASANT words^
or^
FLOWERS vs. INSECTS.^^
Press the "a' key if the stimulus is^
an UNPLEASANT word or a FLOWER.^^
But press "5' key if the stimulus is^
a PLEASANT word or an INSECT.^^
</page>

<page end>
The Implicit Association Test is now concluded.
If you have any questions or reactions to the
experiment, please discuss them with the experimenter.
</page>

Finally, we'll specify how participants can navigate through the instruction pages using the instruct element. A script should have only one such element.

<instruct>
/ nextkey = ("5")
/ prevkey = ("a")
</instruct>

The nextkey attribute indicates that participants must press the "5" key to advance to the next page, and the prevkey attribute specifies pressing the "a" key goes back to the previous key.


Simple Implicit Attitude Task Tutorial: Creating Trials

Creating Trials

The next step is to define the different kinds of trials that will be used in the IAT task. Trial elements control which stimuli are presented and how the subject may respond to those stimuli. There are six types of trials used in this task depending on which semantic category of stimulus is presented and which response key is assigned as the correct classification of the category.

First, let's define trials involving pleasant words, which are always assigned to the right response key.

<trial pleasant>
/ stimulusframes = [1=pleasant]
/ validresponse = ("a", "5")
/ correctresponse = ("5")
</trial>

The trial element's name is pleasant . On each line of data in the data file corresponding to this type of trial, this trial name is written.

The stimulusframes attribute defines the stimulus presentation sequence of the trial. The entire presentation sequence will consist of as many frames as are specified in the frames attribute (only 1 in this case). A pleasant word is presented on the first frame, after which Inquisit begins waiting for (and timing) the subject's response.

The validresponse attribute indicates that the subject may respond by pressing either the "a' or the "5' key, after which Inquisit will advance to the next trial. The correctresponse attribute indicates that only the "5' key is considered a correct response on this type of trial.

The definition of the other trial elements are the similar to pleasant , differing only in the type of stimulus presented and the response that's considered correct.

Here's the definition of trials with unpleasant words where "a" is a correct response:

<trial unpleasant>
/ validresponse = ("a", "5")
/ correctresponse = ("a")
/ stimulusframes = [1=unpleasant]
</trial>

Next come trials with insect names classified with the "5" key:

<trial insright>
/ validresponse = ("a", "5")
/ correctresponse = ("5")
/ stimulusframes = [1=insect]
</trial>

Trials with insect names classified with the "a" key:

<trial insleft>
/ validresponse = ("a", "5")
/ correctresponse = ("a")
/ stimulusframes = [1=insect]
</trial>

Trials with flower names classified with the "5" key:

<trial flowright>
/ validresponse = ("a", "5")
/ correctresponse = ("5")
/ stimulusframes = [1=flower]
</trial>

Trials with flower names classified with the "a" key:

<trial flowleft>
/ validresponse = ("a", "5")
/ correctresponse = ("a")
/ stimulusframes = [1=flower]
</trial>

The trials above capture the different combinations of stimulus category and correct response in the IAT.


Simple Implicit Attitude Task Tutorial: Creating Blocks

Creating Blocks

The next step is to define the different kinds of blocks that will be used in the experiment. Blocks represent sequences of trials that can be in random or fixed order. For this experiment, 5 block elements will be defined, 3 for practice trials and 2 for data collection.

First, let's define the practice block element for classification of pleasant and unpleasant words.

<block up_practice>
/ trials = [1-20 = noreplace(pleasant, unpleasant)]
/ bgstim = (pleasantreminder, unpleasantreminder)
/ preinstructions = (up)
/ errormessage = (errormessage, 200)
/ blockfeedback = (latency, correct)
</block>

This block element is named "up_practice". The trials attribute specifies that the block runs 20 trials randomly selected without replacement from the two trial types "pleasant" and "unpleasant". The selection algorithm guarantees that both trial types will be run an equal number of times (10 time each). The bgstim attribute specifies that the "pleasantreminder" and "unpleasantreminder" instruction text stimuli are presented on the screen as background stimuli. The preinstructions attribute displays 3 pages of instructions ("intro1", "intro2", and "intro3") before running the trials. The errormessage attribute presents the "errormessage" stimulus for 200 ms whenever subjects respond incorrectly. Finally, the blockfeedback attribute specifies that after the block is over, subjects will be shown their mean latency and percent correct for the block.

The rest of the blocks have a similar pattern. Next, lets define a practice block on which insects are classified with the left key and flowers with the right:

<block if_practice>
/ trials = [1-20 = noreplace(insleft, flowright)]
/ bgstim = (insectleft, flowerright)
/ preinstructions = (if)
/ errormessage = (errormessage, 200)
/ blockfeedback = (latency, correct)
</block>

Now, lets define a practice block on which insects are classified with the right key and flowers with the left:

<block fi_practice>
/ trials = [1-20 = noreplace(insright, flowleft)]
/ bgstim = (insectright, flowerleft)
/ preinstructions = (fi)
/ errormessage = (errormessage, 200)
/ blockfeedback = (latency, correct)
</block>

Next, lets define the "compatible" test block. Note that on test blocks we no longer dispay an error message for incorrect responses:

<block compatible>
/ trials = [1-40 = noreplace(insleft, flowright, pleasant, unpleasant)]
/ bgstim = (unpleasant_insect, pleasant_flower)
/ preinstructions = (compatible)
/ blockfeedback = (latency, correct)
</block>

Finally, lets define the "incompatible" block:

<block incompatible>
/ trials = [1-40 = noreplace(insright, flowleft, pleasant, unpleasant)]
/ bgstim = (pleasant_insect, unpleasant_flower)
/ preinstructions = (incompatible)
/ blockfeedback = (latency, correct)
</block>


Simple Implicit Attitude Task Tutorial: Creating Experiments

Creating an Expt

The next step is to define an expt element that defines the flow of blocks in the experiment. The expt element is defined as follows:

<expt>
/ preinstructions = (intro)
/ postinstructions = (end)
/ blocks = [1=up_practice; 2=block2; 3=block3; 4=block4; 5=block5]
</expt>

The expt element is simple. The preinstructions attribute begings the expt by showing subjects a page of instructions, "intro". The postinstructions attribute specifies final instruction page named "end" to be displayed at the conclusion of the experiment. The blocks attribute specifies a total of 5 blocks. The first block is the "up_practice" block in which subjects practice classifying the pleasant and unpleasant stimuli. Blocks 2 through 5 are set to between-subject variables named "block2", "block3", "block4", and "block5", all of which are defined below. These between-subject variables allow the experiment to counterbalance the order in which the test blocks are run across subjects.

Next, we'll define the between-subject variables used above:

<variables>
/ group = (1 of 2) (block2=fi_practice, block3=incompatible, block4=if_practice, block5=compatible)
/ group = (2 of 2) (block2=if_practice, block3=compatible, block4=fi_practice, block5=incompatible)
</variables>

The variables element defines between-subject variables based on the subject number that was entered when the experiment is run. The first group attribute specifies the variable values for odd numbered subjects. For odd-numbered subjects, block2 is fi_practice, block3 is incompatible, block4 is if_practice, and block5 is compatible. For even-numbered subjects, block2 is if_practice, block3 is compatible, block4 is fi_practice, and block5 is incompatible.

With that, the script is essentially complete. However, we'll do a little fine tuning by specifying some default settings using the defaults element.

<defaults>
/ screencolor = (175, 175, 255)
/ fontstyle = ("Courier New", 14pt)
</defaults>

The screencolor attribute sets the color of the screen throughout the experiment to light blue. The fontstyle attribute specifies that all stimulus and instruction text should be displayed in a 14pt Courier New font. You can specify the font attribute using Inquisit's Font Wizard, avaiable from the Tools menu. The wizard allows you to pick a font using the standard font dialog, and will spit the corresponding attribute definition into your script.

The experiment is now complete! You can run the experiment by selecting the "Run" command on the "Experiment" menu.


Tutorial: Subliminal Priming

Tutorial: Subliminal Priming Task

Download script for this tutorial.

This tutorial explains how to build a simple subliminal priming experiment such as that described by Draine and Greenwald (Journal of Experimental Psychology: General, 1998). On each trial, subjects are shown a subliminal (masked) prime word followed immediately by a target word. Primes and targets are divided into two definitional categories: pleasant (e.g., love) or unpleasant (e.g., death). Subjects are instructed to ignore the primes and classify the targets as pleasant (by pressing the "5" key on the number pad) or unpleasant (by pressing the "a" key). Each trial falls into one of four experimental conditions depending on the category (pleasant or unpleasant) of prime and target presented:

  1. pleasant prime with pleasant target (congruent)

  2. pleasant prime with unpleasant target (incongruent)

  3. unpleasant prime with pleasant target (incongruent)

  4. unpleasant prime with unpleasant target (congruent)

Longer Reaction Times and/or higher error rates on trials in which the prime and target are incongruent compared to the condition in which the prime and target are congruent, suggest the presence of subliminal priming.

Before you Begin

  1. Download and install Inquisit Lab

Steps

Creating Text Stimuli

Creating Instructions

Creating Trials

Creating Blocks

Creating an Experiment

Creating Text Stimuli


Subliminal Priming Tutorial: Creating Text Stimuli

Creating Text Stimuli

The first step in building an experiment is to create the experimental stimuli and specify how they should be presented. Stimuli will typically consist of text or pictures presented during a trial, instruction text that remains on the screen throughout a block of trials, and feedback messages that indicate when to respond and whether or not a response was correct.

First, let's create a text element that defines the pleasant prime words:

<text pleasantprime>
/ items = pleasant
</text>

The text element's name is "pleasantprime". The element could be named anything we wish, but it's a good idea to picks a simple, descriptive name. It has a single attribute called "items" that specifies where the actual items are located. In this case, we have specified that the items are located in an item element called "pleasant" that we will create a bit later.

The text element allows us to define other attributes including color and screen lcoation. In this element, we will use the default values. (The default color is black, and the default position is the center of the screen.) Later, we'll demonstrate how to change these values.

In the example above, we defined pleasant prime stimuli. Next, we'll define pleasant target stimuli:

<text pleasanttarget>
/ items = pleasant
</text>

With the exception of it's name, this text element is identical to the pleasantprime element. Note that the items attribute is set to the same item list (that we'll create in a moment) named "pleasant". This element will use those same items as targets.

Now, lets define the items used by both the pleasantprime and pleasanttarget text elements:

<item pleasant>
/ 1 = "        HONOR        "
/ 2 = "        LUCKY        "
/ 3 = "       DIAMOND       "
/ 4 = "        LOYAL        "
/ 5 = "       FREEDOM       "
/ 6 = "       RAINBOW       "
/ 7 = "         LOVE        "
/ 8 = "        HONEST       "
/ 9 = "        PEACE        "
/10 = "        HEAVEN       "
</item>

Pretty simple isn't it? Notice the opening and closing lines: <item pleasant> and </item> The name of this element is pleasant. Notice that there are 8 spaces on either side of the items (words). This is done to center the words in the presentation box during a given trial.

Now, lets define the unpleasant primes and targets:

<text unpleasantprime>
/ items = unpleasant
</text>
<text unpleasanttarget>
/ items = unpleasant
</text>

These text elements similar to the previous ones, except that they use "unpleasant" items. Let's create the unpleasant items:

<item unpleasant>
/ 1 = "         EVIL        "
/ 2 = "        CANCER       "
/ 3 = "       SICKNESS      "
/ 4 = "       DISASTER      "
/ 5 = "       POVERTY       "
/ 6 = "        VOMIT        "
/ 7 = "         BOMB        "
/ 8 = "        ROTTEN       "
/ 9 = "        ABUSE        "
/10 = "        MURDER       "
</item>

Let's review what we've covered so far.

  1. Inquisit uses a set of instructions to control the flow of an experiment called a script.
  2. A script consists of elements.
  3. Each element has its own name by which other elements can refer to it.
  4. Elements have attributes that control specific properties of the element (e.g. font size and color).
  5. Some attributes of an element can refer to other elements in the script by name.

We aren't done with the stimuli yet. We still need to define the forward and backward, the error messages, and create background messages. Here is the text element that will serve as the forward masks of the primes, called "forwardmask":

<text forwardmask>
/ items = ("    KQHYTPDQFPBYL    ", "    PYLDQFBYTQKPH    ")
</text>

This text element consists of two items, "KQHYTPDQFPBYL" and "PYLDQFBYTQKPH". Note that the items in this case are defined directly inside the forwardmask text element. You can define items this way or by using an items element as was done previously. A good rule of thumb is to use the items element for large item sets, or for item sets that will be shared by multiple text elements (for example, the pleasant items were used by both pleasantprime and pleasanttarget). For small item sets such as the two forward masks, or for items sets that are only used by one text element, it is usually more convenient to define such items directly inline.

Here is the text element that will define the stimuli that will serve as backward masks of the primes. Let's call it "backwardmask". The backward mask is very similar to the forward mask:

<text backwardmask>
/ items = ("    PYLDQFBYTQKPH    ", "    KQHYTPDQFPBYL    ")
/ select = current (forwardmask)
</text>

Note the addition of the select attribute set to the current option. By default, the select attribute is set to noreplace and items are selected without replacement on each trial. The current setting links the selection of the backwardmask item on each to that of the forwardmask item. Thus, for trials on which both a forward and backward mask are presented, if the first forward mask item is selected and presented on that trial, then the first backward mask item will also be presented. If the second forward mask was selected and presented, then the second backward mask will also be presented. Thus, each forward mask item has a complimentary backward mask item that always appears in conjunction with it. By linking these two stimuli, the forward and backward masks on a given trial will never be identical since the order of the two items is reversed.

Now, lets create stimuli (text) to be shown in the background throughout an entire block of trials. These stimuli will serve as reminders to the subject to press the "a" key for unpleasant and the "5" key for pleasant.

<text pleasantreminder>
/ items = ("5 = pleasant")
/ position = (75, 25)
</text>

This stimulus is similar to the previous stimuli, except the position attribute is no longer set to the default (center). Inquisit specifies screen position using a coordinates system ranging from 0 to 100 on both the horizontal and vertical axes. The upper left corner of the screen is (0, 0), and the lower right corner of the screen is (100, 100). The center of the screen is (50, 50). So, the coordinates of (75, 25) used above in pleasantreminder will place the stimuli above and to the right of the center of the screen.

Now, lets define the unpleasant reminder, which will be displayed on the upper left region of the screen.

<text unpleasantreminder>
/ items = ("a = unpleasant")
/ position = (25, 25)
</text>

Finally, lets define a stimulus to show subjects whenever they incorrectly classify a target stimulus:

<text errormessage>
/ items = ("        ERROR        ")
/ color = (255, 0, 0)
</text>

The errormessage text element uses the color attribute. The color attribute takes three integers between 0 and 255 that define the intensity of the red, green, blue components of the color respectively. The red component is the maximum intensity, 255, whereas the green and blue components are 0. This combination produces a rich red color.


Subliminal Priming Tutorial: Creating Instructions

Creating Instructions

Next, let's define the instruction pages. First, we'll create an introduction page:

<page intro1>
The tasks that you will be doing in this experiment involve CATEGORY JUDGMENT.
On each trial, a stimulus will be displayed, and you must assign it to one of
two categories. You should respond AS RAPIDLY AS POSSIBLE in categorizing each stimulus,
but don't respond so fast that you make many errors. (Occasional errors are okay.)
^^
The two categories that you are to distinguish are:
^^
UNPLEASANT vs. PLEASANT words.
^^
Press the "a" key if the stimulus is an UNPLEASANT word.
^^
But press "5" key if the stimulus is a PLEASANT word.
^^
</page>

The page element doesn't have any attributes, but simply contains the content of the page. The special character "^" will force a line break when the page is displayed on the screen. Otherwise, the instructions are word wrapped inside the page area.

Now let's define the rest of the pages in the script:

<page intro2>
Just before each word that you are to categorize you will see one or more words and letter strings briefly flashed.^^
It is your task to IGNORE these briefly flashed stimuli. Respond only to the last, clearly visible word shown on each trial.
</page>

<page intro3>
When you press the "5' key, you will see a stimulus to which you should respond.^^
As a reminder of the instructions for responding:^^
Press the "a" key if the stimulus is an UNPLEASANT word.^^
Press "5' key if the stimulus is a PLEASANT word.^^
</page>

<page ready>
When you press the "5" key, a new block of trials at the same task as the last block will start.^^
Be ready for the first stimulus when you press the key.
</page>

<page end>
The experiment is now concluded. If you have any questions or reactions to the experiment, please discuss them with the experimenter.
</page>

Finally, we'll define an instruct element that specifies how subjects can navigate from page to page. A script should have only one such element.

<instruct>
/ nextkey = ("5")
/ prevkey = ("a")
</instruct>

The nextkey attribute specifies that subjects can press the "5" key to advance to the next instruction page, and "a" key to go back to a previous page.


Subliminal Priming Tutorial: Creating Trials

Creating Trials

The next step is to define the different kinds of trials that will be used in the experiment. The types of trials you define will correspond to the different conditions of the experiment. This experiment has four conditions, one condition for each of the four possible combinations of prime and target categories.

First, let's define trials involving pleasant primes and pleasant targets by creating the following trial element.

<trial pp>
/ pretrialpause = 300
/ validresponse = ("a", "5")
/ correctresponse = ("5")
/ stimulusframes = [1=forwardmask; 10=pleasantprime; 13=backwardmask; 14=pleasanttarget]
/ posttrialpause = 100
</trial>

The trial element is called "pp", which is short for "pleasant pleasant" because the trial presents both a pleasant prime and pleasant target.

The posttrialpause attribute tells Inquisit to pause 300 milliseconds before each trial is executed.

The validresponse attribute specifies which keys a subject can press to register their response. Remember we already talked about these responses when the instructions were created. When the participant responds by pressing the "a" or the "5" key, Inquisit will advance to the next trial.

The correctresponse attribute tells Inquisit which responses are considered correct. In this trial, "5" is correct.

the stimulusframes attribute is slightly more technical because it is closely connected to how digital monitors operate. Computer monitors repaint the screen from top to bottom according to a fixed interval called a "frame" (a.k.a., vertical retrace interval). Most standard monitors repaint the screen about every 10 to 17 milliseconds. To determine the frequency at which your monitor repaints the screen, select the "Check Hardware" command from Inquisit's Tools menu. Inquisit will run at any frequency. If you decide you would like to change the retrace frequency of your video system, you should check the manufacturer's documentation for the specifics on your monitor. Typically, the frame rate can be controlled from Display settings within Windows.

Thus, the stimulus presentation sequence is defined in terms of discrete frames rather than times. The entire presentation sequence consists of as many frames as are specified in the frames attribute (14 in this case). So, a forwardmask is presented at the onset of the first frame of the trial. This forwardmask remains on the screen until it is overwritten by a prime stimulus on the 10th frame. The prime stimulus remains on the screen for 3 frames (50 ms on a 60 hz monitor), before it is overwritten by a backward mask on the 13th frame. Finally, a target is presented on the 14th frame and remains on the screen until the subject responds.

So you see, you have to do a little calculating here to decide the time each frame is to be presented. 3 frames on a 60 hz monitor is the equivalent of 50 ms because:
3 (frames) x 16.7 (ms) = 50.1 (ms).

Finall, the posttrialpause atribute tells Inquisit to wait 100 ms after this trial before advancing to the next trial.

Remember, this was just one type of trial. We need to define 3 more trial types. The rest of the trials will be very similar to the first. Many experiments change only minor details from trial to trial; a word list, an order of presentation, response variables, etc. Once you have the first trial coded, you are ready to make the rest. It's very easy to do that in Inquisit. You can copy and paste your code for trial one and then just change the minor variables. Let's see what the other trial codes look like.

<trial pu>
/ pretrialpause = 300
/ validresponse = ("a", "5")
/ correctresponse = ("a")
/ stimulusframes = [1=forwardmask; 10=pleasantprime; 13=backwardmask; 14=unpleasanttarget]
/ posttrialpause = 100
</trial>

<trial up>
/ pretrialpause = 300
/ validresponse = ("a", "5")
/ correctresponse = ("5")
/ stimulusframes = [1=forwardmask; 10=unpleasantprime; 13=backwardmask; 14=pleasanttarget]
/ posttrialpause = 100
</trial>

<trial uu>
/ pretrialpause = 300
/ validresponse = ("a", "5")
/ correctresponse = ("a")
/ stimulusframes = [1=forwardmask; 10=unpleasantprime; 13=backwardmask; 14=unpleasanttarget]
/ posttrialpause = 100
</trial>

The three trials above differ from the original only by which stimuli they present and which response is considered correct. Together, the four trials capture the four combinations of pleasant and unpleasant prime and target stimuli.


Subliminal Priming Tutorial: Creating Blocks

Creating Blocks

The next step is to define the different kinds of blocks that will be used in the experiment. For this experiment, two block elements will be defined, one for practice trials and the other for data collection.

First, let's define the practice block element.

<block practice>
/ bgstim = (pleasantreminder, unpleasantreminder)
/ preinstructions = (intro1, intro2, intro3)
/ trials = [1-40 = noreplace(pp, pu, up, uu)]
/ errormessage = (errormessage, 200)
/ blockfeedback = (latency, correct)
</block>

The block is called "practice".

The bgstim attribute tells Inquisit to keep the pleasantreminder and unpleasantreminder on the screen during the block. Remember these stimulus elements were defined previously, we wanted to keep "a=unpleasant" and "5=pleasant" on the screen during the trials in the upper left and right quadrants respectively.

The preinstructions attribute refers lists some of the instructions pages created in the previous section. This command tells Inquisit to display the pages named intro1, intro2, and intro3 at the beginning of the block.

The trials attribute defines trials (40) for this practice block that are randomly without replacement selected from the four trial types: pp, pu, up, uu. This guarantees that each trial type will be presented 10 times.

The errormessage attribute indicates that when the participant responds incorrectly in this practice block, the errormessage text stimulus (previously defined) will be displayed for 200 ms. Giving feedback during a practice trial is a good idea because you generally want the participant to learn the right way to perform their task. As you'll see, we remove this feedback in the data collection blocks.

The blockfeedback attribute specifies that after the block is over, subjects will be shown their mean latency and percent correct.

Now, lets define a data collection block.

<block data>
/ screencolor = (175, 175, 255)
/ bgstim = (pleasantreminder, unpleasantreminder)
/ preinstructions = (ready)
/ trials = [1-40 = random(pp, pu, up, uu)]
/ blockfeedback = (latency, correct)
</block>

This element is just like the practice element except that the participant is no longer given the feedback because we removed the errormessage attribute. Also, the block begins with a different instruction page called "ready".


Subliminal Priming Tutorial: Creating Experiments

Creating an Expt

Next, we'll need to define an expt element that specifies which blocks to run.

<expt>
/ blocks = [1 = practice; 2-5 = data]
/ postinstructions = (end)
</expt>

The expt element runs a total of 5 blocks. The first block is "practice", and the next for blocks are "data'. After all the blocks have been run, a single page of instructions called end is displayed.

Finally, we'll want to set the default font and screen color for the experiment using the defaults element:

<defaults>
/ fontstyle = ("Courier New", 14pt)
/ screencolor = (150, 150, 150)
</defaults>

The fontstyle attribute sets the default font for all text stimuli and instruction pages to 14pt Courier New. You can use Inquisit's Font Wizard to generate the font selection for you. To use the Font Wizard, place your cursor at the location in the script where you wish the font attribute to appear, then select the Font Wizard command from the Tools menu. A standard font dialog will appear, allowing you to select the font of your choice. The wizard will then inject the corresponding attribute definition into you script.

The screencolor attribute works just like the txcolor attribute we configured earlier. In this case, the red, green, and blue components are all set to 150, making the screen grey.

The experiment is complete!


Tutorial: Covert Attention Task

Download script for this tutorial.

This tutorial builds a covert attention task. The task measures the effect of an unattended cue on spatial position judgments. Subjects perform the task by indicating whether a critical stimulus is presented on the left or right side of the screen by pressing the 'a' or 's' key on the keyboard respectively. Subjects are instructed to fixate their gaze on the center of the screen while performing the task, where an arrow is presented on each trial. On 80% of the trials, the arrow points in the direction where the critical stimulus is presented (compatible). On the remaining 20% of the trials, the arrow points in the opposite direction (incompatible). Covert attention to the arrow is measured by comparing the average response latency of the compatible and incompatible trials. Shorter mean latencies on compatible as compared to incompatible trials indicates that subjects are influenced by the unattended arrow stimulus.

Before you Begin

  1. Download and install Inquisit Lab

Steps

  1. Creating Text Stimuli
  2. Creating Instructions
  3. Creating Trials
  4. Creating Blocks
  5. Creating an Experiment
Creating Text Stimuli


Covert Attention Task Tutorial: Creating Text and Picture Stimuli

Creating Text and Picture Stimuli

The first step in building an experiment is to define all of the stimuli. Stimuli include text or pictures to be shown on a given trial, background text that remains on the screen throughout a block of trials, or a feedback text shown to the subject to indicate when to respond and whether their response was correct or incorrect.

Inquisit allows you to specify global default settings for stimuli and other parts of the experiment using the <defaults> element. For this script, we will set the default font for all text stimuli that we present, and we'll also set the background color for the screen to black.

<defaults>
/ screencolor = (0, 0, 0)
/ fontstyle = ("Arial", 20pt)
</defaults>

Now, let's create the arrow stimuli to be presented at the fixation point in the center of the screen:

<picture leftarrow>
/ items = ("https://www.millisecond.com/download/library/covertattention/leftarrow.jpg")
</picture>

<picture rightarrow>
/ items = ("https://www.millisecond.com/download/library/covertattention/rightarrow.jpg")
</picture>

That was pretty easy. We simply created two picture stimuli called "leftarrow" and "rightarrow". Both stimuli consist of a single item picture item contained in the picture files "rightarrow.jpg" and "lefttarrow.jpg" respectively. In this case, the files are downloaded from https://www.millisecond.com/samples/covertattention, but typically you would keep the files in the same folder as the script. By default, Inquisit presents the pictures in the center of the screen.

Now, let's define a text stimulus to serve as the fixation point itself.

<text fixation>
/ items = ("+")
/ color = (255, 255, 255)
/ txbgcolor = (0,0,0)
/ fontstyle = ("Arial", 30pt)
/ erase = false
</text>

The text is called "fixation" and it consists of a single item, "+". The foreground color is white, with the red, green, and blue values set to the maximum value of 255. You can use Inquisit's Color Wizard available on the Tools menu to get the red, green, and blue values for any color. The background color is black, with red, green, and blue values set to the minimum value of 0. The font is Arial. You can select a font using Inquisit's Font Wizard, also available on the Tools menu. Finally, the erase command indicates that the fixation point should not be erased.

Now, let's define text stimuli to be presented just below the fixation point that will serve as instruction reminders.

<text instructleft>
/ items = ("Press A if the brightened box is on the left.")
/ position = (50, 60)
/ color = (255, 255, 255)
/ txbgcolor = (0,0,0)
</text>

<text instructright>
/ items = ("Press S if the brightened box is on the right.")
/ position = (50, 65)
/ color = (255, 255, 255)
/ txbgcolor = (0,0,0)
</text>

The instruction stimuli use the position command to present the stimuli just below the fixation point. Position is specified in terms of x and y coordinates. The unit of measurement is percentage, with 0 = top/left, 50 = center, and 100 = bottom right. The instruction reminders are presented horizontally centered and vertically 10 percentage points below center.

Now, let's define the target pictures. We will create four target stimuli, each of which presents a picture of a light yellow rectangle in one of the four corners of the screen.

<picture toplefttarget>
/ items = ("https://www.millisecond.com/download/library/covertattention/targetrectangle.jpg")
/ position = (0, 0)
/ valign = top
/ halign = left
</picture>

<picture bottomlefttarget>
/ items = ("https://www.millisecond.com/download/library/covertattention/targetrectangle.jpg")
/ position = (0, 100)
/ valign = bottom
/ halign = left
</picture>

<picture toprighttarget>
/ items = ("https://www.millisecond.com/download/library/covertattention/targetrectangle.jpg")
/ position = (100, 0)
/ valign = top
/ halign = right
</picture>

<picture bottomrighttarget>
/ items = ("https://www.millisecond.com/download/library/covertattention/targetrectangle.jpg")
/ position = (100, 100)
/ valign = bottom
/ halign = right
</picture>

Finally, we'll create the distractor stimuli. There are four distractors, each of which presents a dark yellow rectangle in the four corners of the screen.

<picture topleft>
/ items = ("https://www.millisecond.com/download/library/covertattention/rectangle.jpg")
/ position = (0, 0)
/ valign = top
/ halign = left
</picture>

<picture bottomleft>
/ items = ("https://www.millisecond.com/download/library/covertattention/rectangle.jpg")
/ position = (0, 100)
/ valign = bottom
/ halign = left
</picture>

<picture topright>
/ items = ("https://www.millisecond.com/download/library/covertattention/rectangle.jpg")
/ position = (100, 0)
/ valign = top
/ halign = right
</picture>

<picture bottomright>
/ items = ("https://www.millisecond.com/download/library/covertattention/rectangle.jpg")
/ position = (100, 100)
/ valign = bottom
/ halign = right
</picture>

Those are all the stimuli that we'll present in this script. Next, we'll create the instructions.


Covert Attention Task Tutorial: Creating Instructions

Creating Instructions

Now lets define how we will present instructions to subjects using the <instruct> element. A script should have only one such element.

<instruct>
/ fontstyle = ("Arial", 18pt, true)
/ nextlabel = "Press the spacebar to continue"
/ lastlabel = "Press the spacebar to continue"
/ nextkey = (" ")
</instruct>

We've set the font to 18pt Arial bold. We've also defined the labels that will appear on the buttons that allow subjects to proceed forward through our instruction pages. Finally, we've specified the spacebar key (represented by the space character, " ") as the key to press to advance.

Once we've defined how instruction pages will be presented, we have to create the pages themselves. This part is pretty easy. Note that the "^" character forces a line break. Otherwise, lines of text are word-wrapped.

<page inquisit>
^^The following sample illustrates how to create a covert attention task using Inquisit.
</page>

<page intro1>
^Four boxes will be presented in each corner of the screen, and a fixation point will appear in the center of the screen. Keep your eyes focused on the fixation point throughout the entire experiment.
^^On each trial, the fixation point will change to an arrow pointing left or right. On 80% of the trials, the arrow points to the side of the screen on which one of the boxes will brighten. On the remaining 20% of the trials, the arrow points in the opposite direction.
</page>

<page intro2>
^Your task is to focus on the fixation point in the center of the screen and indicate whether a box brightened on the left or right side of the screen. If a box on the left brightens, hit the "A" key. If a box on the right brightens, hit the "S" key.
^^Remember: the arrow will usually point in the direction of the screen with the brighter box, so it is to your advantage to focus on the center fixation point.
^^Press the space bar to begin practicing the task.
</page>

<page begin>
^^Practice is now complete. Press the space bar to begin the task.
</page>

<page finish>
^^Thank you for participating. The demo is now finished.
</page>

Last, we'll define a special instruction page that we'll use to report performance feedback to our subjects.

<page performance>
^Performance Summary:
^^You gave the correct answer on <% block.covertattention.percentcorrect %> percent of the trials.
^^Your average response time was <% block.covertattention.meanlatency %> milliseconds.
</page>

Note the commands "<% block.covertattention.percentcorrect %>" and "<% block.covertattention.meanlatency %>" that appear in the page. These commands will be replaced by the percent correct and mean response latency for all trials in the block called "coverattention", which we will define a little bit later. Inquisit allows you to present a variety of accuracy and latency data to the subject in this way. See help on the page element for more information.


Covert Atention Task Tutorial: Creating Trials

Creating Trials

Now it's time to define the trials for the covert attention task. The trial element specifies which stimuli should be presented, when they are presented, and how the subject should respond. The trial element brings all of the pieces together into a task.

First, we'll define a set of practice trials for the spatial judgment task. The practice trials present our instructions text stimuli that remind the subject how to perform the task.

<trial topleftpractice>
/ stimulustimes = [0=fixation; 500=leftarrow; 700=toplefttarget, bottomleft, topright, bottomright; 1000=instructleft, instructright]
/ correctresponse = ("a")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

The "stimulustime" command defines the sequence of stimuli to be presented. The trials presents the fixation point at the beginning of the trial, followed 500 milliseconds later by the left arrow picture. After another 200 milliseconds, the trial presents the target stimulus in the topleft corner and distractor stimuli in other corners. Finally, 300 milliseconds later, the instruction text is presented.

On this trial, the subject can respond by pressing either the "s" or "a" key as defined by the validresponse command. A response of "s" is considered correct as defined by the correctresponse command.

Finally, the beginresponsetime command indicates that Inquisit should start measuring the subject's response 700 milliseconds into the stimulus sequence. This corresponds exactly to the time at which the target and distractor stimuli are presented. Response latencies will be reported relative to this point in time. Responses given before this point are ignored.

The remaining practice trials are similar, except that they present the target in different screen locations and therefore. Depending on whether the target is presented on the left or right side of the screen, either "s" or "a" is defined as the correct response.

<trial bottomleftpractice>
/ stimulustimes = [0=fixation; 500=leftarrow; 700=topleft, bottomlefttarget, topright, bottomright; 1000=instructleft, instructright]
/ correctresponse = ("a")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

<trial toprightpractice>
/ stimulustimes = [0=fixation; 500=rightarrow; 700=topleft, bottomleft, toprighttarget, bottomright; 1000=instructleft, instructright]
/ correctresponse = ("s")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

<trial bottomrightpractice>
/ stimulustimes = [0=fixation; 500=rightarrow; 700=topleft, bottomleft, topright, bottomrighttarget; 1000=instructleft, instructright]
/ correctresponse = ("s")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

Now it's time to define the data collection trials. First, we'll define the congruent trials in which the arrow points in the same direction as the target.

<trial topleftcongruent>
/ stimulustimes = [0=fixation; 500=leftarrow; 700=toplefttarget, bottomleft, topright, bottomright]
/ correctresponse = ("a")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

This trial presents the fixation point followed by the left arrow. The target is presented in the top left corner and the distractors in the remaining corners. Since this is a test trial, we no longer present the instruction reminder stimuli. The following three trials are the same except that the target is presented in the other three corners respectively.

<trial bottomleftcongruent>
/ stimulustimes = [0=fixation; 500=leftarrow; 700=topleft, bottomlefttarget, topright, bottomright]
/ correctresponse = ("a")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

<trial toprightcongruent>
/ stimulustimes = [0=fixation; 500=rightarrow; 700=topleft, bottomleft, toprighttarget, bottomright]
/ correctresponse = ("s")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

<trial bottomrightcongruent>
/ stimulustimes = [0=fixation; 500=rightarrow; 700=topleft, bottomleft, topright, bottomrighttarget]
/ correctresponse = ("s")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

Notice that when the target is in the upper or lower left corner, the correctresponse is defined as the "a" key. When the target is in the upper or lower right, the correctresponse is the "s" key. By including both "a" and "s" in the validresponse command, the experiment will recognize either key press as a response to the trial. All other key presses are ignored.

Finally, we'll define the four types of incongruent trials.

<trial topleftincongruent>
/ stimulustimes = [0=fixation; 500=rightarrow; 700=toplefttarget, bottomleft, topright, bottomright]
/ correctresponse = ("a")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

<trial bottomleftincongruent>
/ stimulustimes = [0=fixation; 500=rightarrow; 700=topleft, bottomlefttarget, topright, bottomright]
/ correctresponse = ("a")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

<trial toprightincongruent>
/ stimulustimes = [0=fixation; 500=leftarrow; 700=topleft, bottomleft, toprighttarget, bottomright]
/ correctresponse = ("s")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

<trial bottomrightincongruent>
/ stimulustimes = [0=fixation; 500=leftarrow; 700=topleft, bottomleft, topright, bottomrighttarget]
/ correctresponse = ("s")
/ validresponse = ("s", "a")
/ beginresponsetime = 700
</trial>

We're finished with the trials. Now let's define the blocks.


Covert Attention Task Tutorial: Creating Blocks

Creating Blocks

The next step is to define the different kinds of blocks that will be used in the experiment. For this experiment, we will define 2 blocks, 1 to run the practice trials and 1 for data collection.

First, let's define the practice block element.

<block covertattentionpractice>
/ trials = [1-4 = noreplace(topleftpractice, bottomleftpractice, toprightpractice, bottomrightpractice)]
/ bgstim = (fixation)
</block>

This block element, named covertattentionpractice, will run just 4 trials randomly selected from the 4 practice trial types. We've specified that the block should randomly select from the 4 trials without replacement. Since we are only running 4 trials and there are 4 to select from, that means that each type of trial will be run exactly one time in the block, and the order in which the 4 types are selected will randomly vary.

Now, lets define the data collection block:

<block covertattention>
/ preinstructions = (begin)
/ trials = [1-20 = noreplace(topleftcongruent, bottomleftcongruent, toprightcongruent, bottomrightcongruent,
                             topleftcongruent, bottomleftcongruent, toprightcongruent, bottomrightcongruent,
                             topleftcongruent, bottomleftcongruent, toprightcongruent, bottomrightcongruent,
                             topleftcongruent, bottomleftcongruent, toprightcongruent, bottomrightcongruent,
                             topleftincongruent, bottomleftincongruent, toprightincongruent, bottomrightincongruent)]
/ bgstim = (fixation)
/ postinstructions = (performance)
</block>

The block begins by presenting the instruction page named begin as specified by the preinstructions command. It then runs a total of 20 trials randomly selected from the list of data collection trials. Finally, after all the trials have been run it presents an instruction page called performance.

You may have noticed that the congruent trial types appear 4 times each in the trial list, whereas incongruent trials appear only once. Why did we repeat some of the trials? The answer is that we want 80% of the trials in this block to be congruent and remaining 20% incongruent, so we've created a random selection pool where the proportion of congruent to incongrent trials is 4 to 1. Since we are selecting without replacement, we are guaranteed that the proportion of selected trials will match the proportions in the selection pool. Of the 20 trials, a randomly selected 16 will be congruent and 4 incongruent.

That does it for the blocks. Now let's define the experiment.


Covert Attention Task Tutorial: Creating Experiments

Creating an Expt

<expt>
/ preinstructions = (inquisit, intro1, intro2)
/ blocks = [1=covertattentionpractice; 2=covertattention]
/ postinstructions = (finish)
</expt>

The expt element is quite simple. The expt begins by showing a series of three instruction pages, inquisit, intro1, and intro2.

Next, it runs our practice block, followed by the data collection block. Each block is run exactly one time.

Finally, it displays a single instruction page called finish,

Last of all, we'll customize the format in which the data is saved using the data element.

<data>
/ format = tab
</data>

The data element allows me to control what data is recorded, the order of data columns, whether or not to include column labels on the first row, and what character should serve as the column delimiter. In this experiment, we'll specify that the columns should be separated by tab characters, which is a standard text data format recognized by any data analysis software, including Excel and SPSS. For everything else, we'll just use the default settings.

That's it. We're done!


Tutorial: Dot Probe Task

Download script for this tutorial.

This tutorial builds a simple version of the Dot Probe Task, a commonly used measure of attention. Subjects are presented two words, one above the other, and they are instructed to pronounce the upper word. Occassionally, the upper or lower word is replaced by a "!", in which cases subjects are instructed to press the spacebar as quickly as possible. Typically, reaction times to the "!" are shorter when it appears in the upper position because that is where subjects are attending.

This tutorial covers the following Inquisit features:
- voicekey and keyboard responding
- text presentation
- use of "responsetrial" command to link different types of trials

On the following pages, Inquisit commands are printed in blue, and comments are printed in black:

Before you Begin

  1. Download and install Inquisit Lab

Steps

  1. Creating Stimuli
  2. Creating Instructions
  3. Creating Trials
  4. Creating Blocks
  5. Creating an Experiment
Creating Text Stimuli


Dot Probe Task Tutorial: Creating Text Stimuli

Creating Text Stimuli

The first step in building an experiment is to define all of the stimuli. Stimuli include text or pictures to be shown on a given trial, background text that remains on the screen throughout a block of trials, or a feedback text shown to the subject to indicate when to respond and whether their response was correct or incorrect.

First, let's define the pleasant words appearing in the upper and lower positions:

<text pleasanttop>
/ items = pleasant
/ position = (50%, 40%)
</text>

<text pleasantbottom>
/ items = pleasant
/ position = (50%, 60%)
</text>

This text element defines two sets of text stimuli, "pleasanttop" and "pleasantbottom", both of which have two attributes defined, items and position. The items attribute indicates where the text items are defined. In this case, they are defined in an item element named "pleasant" somewhere else in the script (more on this below). The position attribute specifies where on the screen the text should be presented. Both are presented at the 50% horizontal point of screen (i.e., the horizontal center). The pleasanttop stimulus is presented at the vertical 40% mark, which is 10% of the screen width above center. The pleasantbottom is presented 10% below center.

Now, lets define the items for this text element:

<item pleasant>
/ 1 = "        HONOR        "
/ 2 = "        LUCKY        "
/ 3 = "       DIAMOND       "
/ 4 = "        LOYAL        "
/ 5 = "       FREEDOM       "
/ 6 = "       RAINBOW       "
/ 7 = "         LOVE        "
/ 8 = "        HONEST       "
/ 9 = "        PEACE        "
/10 = "        HEAVEN       "
</item>

This item element is named "pleasant", which matches the name specified in the items attribute of the text element above. The item set consists of ten pleasant words. Note that the words are padded with spaces so that they are all of equal length when presented in a fixed width font.

Now, lets define the rest of the stimulus categories. First, we'll define the unpleasant words:

<text unpleasanttop>
/ items = unpleasant
/ position = (50%, 40%)
</text>

<text unpleasantbottom>
/ items = unpleasant
/ position = (50%, 60%)
</text>

and the unpleasant items.

<item unpleasant>
/ 1 = "         EVIL        "
/ 2 = "        CANCER       "
/ 3 = "       SICKNESS      "
/ 4 = "       DISASTER      "
/ 5 = "       POVERTY       "
/ 6 = "        VOMIT        "
/ 7 = "         BOMB        "
/ 8 = "        ROTTEN       "
/ 9 = "        ABUSE        "
/10 = "        MURDER       "
</item>

It's a good idea to include instruction text that reminds participants how to respond to the various stimuli. We can do this by presenting text on the screen that are shown in the background throughout a block of trials. So, let's create the instruction text stimulus that reminds the subject to pronounce the upper word and press the spacebar if they see '!'.

<text taskreminder>
/ items = ("Pronounce the top word and press the spacebar if you see the '!'")
/ position = (50, 15)
/ txcolor = (0, 0, 255)
/ fontstyle = ("Courier New", 12pt)
</text>

The reminder stimulus is a bit different than the previous stimuli. First, rather than defining the items in a separate element, we've simply listed the single item directly in the attribute. This inline syntax is a convenient way to define small item sets for things like instrutions, focus stimuli, and masks. Also, the position attribute specifies that the text should be displayed at the top of the screen. Finally,the txcolor attribute specifies that the text should be blue rather than the default color black. Colors in Inquisit are specified as a mix of red, green, and blue components; the txcolor attribute specifies 0 intensity for red and green components, and the maximum intensity 255 for the blue component, producing a nice blue color.

Now, lets define the target stimuli '!'. To do this, we create two text stimuli, one of which presents the target in the upper position, and the other which presents it in lower position:

<text targettop>
/ items = ("          !          ")
/ position = (50%, 40%)
</text>

<text targetbottom>
/ items = ("          !          ")
/ position = (50%, 60%)
</text>

Finally, lets define a focus stimuli that will appear in the center of the screen prior to the two words:

<text focuspoint>
/ items = ("          +          ")
</text>


Dot Probe Task Tutorial: Creating Instructions

Creating Instructions

Now lets define a set of instruction pages that inform the subject how to perform the task. Defining the instruction pages is easy using the page element. First, we'll define a simple welcome page.

<page intro>
^^^Dot Probe Task
^^Welcome and thank you for participating in this task.
^^This task requires that you have a working microphone connected to your computer. If you do not have a microphone, please press Ctrl+Q now to end the script.
</page>

Note that the "^" character is used to force a line break. Otherwise, lines of text are word-wrapped. Now we'll define the rest of the instruction pages:

<page task>
Dot Probe Task Instructions:^^
On each trial, two words will be displayed. Your task is to pronounce the TOP word as rapidly as possible while ignoring the BOTTOM word. ^^
Sometimes, one of the words will be replaced by "!". If you see the "!", press the spacebar as quickly as possible.
</page>

<page taskreminder>
Reminder: Pronounce the TOP word as rapidly as possible while ignoring the BOTTOM word. ^^
If you see the "!", press the spacebar as quickly as possible.
</page>

<page end>
The Dot Probe Task is now concluded.
^^This task illustrates the effect of attention on processing visual stimuli. Typically, people respond to the "!" more quickly when it appears in the top location because that's where they are focusing their attention.
</page>

Finally, we'll specify how participants can navigate through the instruction pages using the instruct element. A script should have only one such element.

<instruct>
/ nextkey = (" ")
/ lastlabel = ("Press the spacebar to continue")
/ nextlabel = ("Press the spacebar to continue")
/ fontstyle = ("Arial", 16pt)
</instruct>

The nextkey attribute indicates that participants must press the spacebar key to advance to the next page. The nextlabel and lastlabel attributes specifies the text to display on the button label for advancing to the next instruction page, or past the last instruction page. Finally, the fontstyle attribute specifies that instructions should be presented in a 16pt Arial font.


Dot Probe Task Tutorial: Creating Trials

Creating Trials

The next step is to define the different kinds of trials that will be used in the Dot Probe Task. Trial elements control which stimuli are presented and how the subject may respond to those stimuli. There are eight types of trials used in this task depending on which category of word is presented in the upper position, and whether the word is replaced by a "!" or another word.

First, let's define trials that do not replace the words with a '!'.

<trial pleasant>
/ stimulustimes = [1=focuspoint; 500=pleasanttop, unpleasantbottom]
/ inputdevice = voicekey
</trial>

The trial element's name is pleasant . On each line of data in the data file corresponding to this type of trial, this trial name is written.

The stimulustimes attribute defines the stimulus presentation sequence of the trial. The focus stimulus is presented for 500 milliseconds, after which pleasant and unpleasant words are presented in the upper and lower positions respectively.

The inputdevice attribute specifies the type of input expected from the participant. In this case, the inputdevice is "voicekey", which means that Inquisit will treat any sound through the microphone as a valid response, regardless of whether the sound was a valid word. If we cared about whether the spoken response was an actual word, we could have set this parameter to "speech", in which case Inquisit will use a speech recognition engine to analyze the content of what was said.

Next, we'll define a trial elementsimilar to pleasant, differing only in the location where the pleasant and unpleasant stimulis are presented. Here's the definition of trials with unpleasant words in the top position:

<trial unpleasant>
/ stimulustimes = [1=focuspoint; 500=unpleasanttop, pleasantbottom]
/ inputdevice = voicekey
</trial>

Next come the trials in which one of the words is replaced by a '!'.

<trial pleasanttargettop>
/ stimulustimes = [1=focuspoint; 500=pleasanttop, unpleasantbottom]
/ inputdevice = voicekey
/ responsetrial = (anyresponse, targettoppleasant)
</trial>

This trial is similar to the two trials above, except that it includes the responsetrial command. The response trial specifies a follow up trial to run if a particular response is given. In this case, the followup trial is named "targettopleasant" and the response is any response. So, whenever this trial runs, it is immediately followed by a trial named "targettoppleasant" to be defined below. This follow up trial presents the '!' stimulus and times the spacebar press.

We will now define the other 2 such trials based on whether the pleasant word is in the upper or lower position, and whether the target is in the upper or lower position.

Trials with insect names classified with the "a" key:

<trial unpleasanttargettop>
/ stimulustimes = [1=focuspoint; 500=unpleasanttop, pleasantbottom]
/ inputdevice = voicekey
/ responsetrial = (anyresponse, targettopunpleasant)
</trial>

<trial pleasanttargetbottom>
/ stimulustimes = [1=focuspoint; 500=pleasanttop, unpleasantbottom]
/ inputdevice = voicekey
/ responsetrial = (anyresponse, targetbottompleasant)
</trial>

<trial unpleasanttargetbottom>
/ stimulustimes = [1=focuspoint; 500=unpleasanttop, pleasantbottom]
/ inputdevice = voicekey
/ responsetrial = (anyresponse, targetbottomunpleasant)
</trial>

Finally, we'll define the actual follow up trials that present the '!' in the upper or lower position. The first two such trials are identical except for the name. Note that they specify "keyboard" as the inputdevice (this is actually the default, so this command is optional), and spacebar is listed as the only valid and correct response.

<trial targettoppleasant>
/ stimulustimes = [1=targettop]
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>

<trial targettopunpleasant>
/ stimulustimes = [1=targettop]
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>

Since these two trials are identical, why did we define two such trials instead of one? The reason is so that we can easily determine in the data file whether the follow up trial was preceded by an unpleasant or pleasant word. Specifically, the "targettoppleasant" trial is always run after a pleasant word was presented in the upper position, and the "targettopunpleasant" is run after an unpleasant word was in the upper position. Thus, we can analyze the effect of pleasant vs unpleasant by looking at the trial name rather than what was presented on the previous trial.

Last, we'll define the two trials that present the target '!' in the lower position.

<trial targetbottompleasant>
/ stimulustimes = [1=targetbottom]
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>

<trial targetbottomunpleasant>
/ stimulustimes = [1=targetbottom]
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>

Again, these two trials are identical except for their name, but we can use the name to identify whether the preceding trial presented a pleasant or unpleasant word in the upper position.


Dot Probe Task Tutorial: Creating Blocks

Creating Blocks

The next step is to define the different kinds of blocks that will be used in the experiment. Blocks represent sequences of trials that can be in random or fixed order. For this experiment, two block elements will be defined, one for practice trials and one for data collection.

First, let's define the practice block element for the task.

<block practice>
/ trials = [1-20 = noreplace(pleasant, pleasant, unpleasant, unpleasant, pleasanttargettop, pleasanttargetbottom, unpleasanttargettop, unpleasanttargetbottom)]
/ bgstim = (taskreminder)
</block>

This block element is named "practice". The trials attribute specifies that the block runs 20 trials randomly selected without replacement from a set of 8 different trials. You may have noticed that 2 of the trials, "pleasant" and "unpleasant", are listed twice. The reason is that we wanted exactly half of the trials in the block to be followed up with a target '!', and the other half not to have a follow up. As the trials attribute is specified, 2 of every 8 trials in the block will be "pleasant", 2 will be "unpleasant", 1 will be "pleasanttargettop", 1 will be pleasanttargetbottom, 1 will be unpleasanttargettop, and 1 will be unpleasanttargetbottom.

The bgstim attribute specifies that the "taskreminder" instruction text stimulus is presented on the screen as background.

The nonpractice block below (named "critical") is quite similar:

<block critical>
/ preinstructions = (taskreminder)
/ trials = [1-36 = noreplace(pleasant, pleasant, pleasant, pleasant, unpleasant, unpleasant, unpleasant, unpleasant, pleasanttargettop, pleasanttargetbottom, unpleasanttargettop, unpleasanttargetbottom)]
</block>

One difference is that the critical block presents the "taskreminder" instruction page at the beginning of the block as specified by the "preinstructions" attribute. The other difference is that there are 4 "pleasant" and 4 "unpleasant" trials in the selection pool rather than 2 of each. The proportion of trials with follow up trials is now 4 out of 12, or 33%.


Dot Probe Task Tutorial: Creating Experiments

Creating an Expt

The next step is to define an expt element that defines the flow of blocks in the experiment. The expt element is defined as follows:

<expt>
/ preinstructions = (intro, task, taskreminder)
/ postinstructions = (end)
/ blocks = [1=practice; 2,3=critical]
</expt>

The expt element is simple. The preinstructions attribute begings the expt by showing subjects the 3 pages of instructions, "intro", "task", and "taskreminder". The postinstructions attribute specifies final instruction page named "end" to be displayed at the conclusion of the experiment. The blocks attribute specifies that 1 practice block is run followed by 2 critical blocks.

Finally, we'll do a little fine tuning by specifying some default settings using the defaults element.

<defaults>
/ fontstyle = ("Courier New", 16pt)
/ posttrialpause = 500
</defaults>

The fontstyle attribute specifies that all stimulus and instruction text should be displayed in a 16pt "Courier New" font. The postrialpause attribute specifies that a 500 ms pause should occur at the end of each trial.

The experiment is now complete! You can run the experiment by selecting the "Run" command on the "Experiment" menu.


Tutorial: Demographic Survey

Download script for this tutorial.

This tutorial builds a simple demographic survey. The sample demonstrates how to design a survey using different types of questions, including dropdown, radiobutton, and textbox questions. It also shows how to place validation rules on textbox input, and to adjust the font and layout of the survey.

On the following pages, Inquisit commands are printed in blue, and comments are printed in black:

Before you Begin

  1. Download and install Inquisit Lab

Steps

  1. Creating Survey Questions
  2. Creating More Survey Questions
  3. Creating a Survey Page
  4. Creating a Survey
Creating Survey Questions


Picture IAT Tutorial: Creating Survey Questions

Creating Survey Questions

First, we'll create the questions that make up the survey. For any given question, there are a variety of user interface controls at our disposal that give participants a means of making a response. The choice of control depends on the style of question.

The first question on our survey asks respondents to indicate their sex. This is a multiple choice question with two mutually exclusive options. There are a few different controls we can use for this type of question - specifically radiobuttons, listbox, or dropdown. For this question, we'll use the dropdown control because of its space efficiency.

Here is the syntax for creating this dropdown survey item:

<dropdown sex>
/ caption = "Sex"
/ options = ("female", "male")
</dropdown>

The type of the element is dropdown. When users click the control, the list of response options "drops down", allowing them to click on their chosen option. The name of the item is "sex". We'll refer to this item by its name later on in the tutorial when we specify where the item should appear on the page. The caption attribute represents the question or instructions the respondents will see for that item. In this case, that caption is simply "Sex". Finally, the options attribute defines the response choices -- either "male" or "female" -- in the dropdown list. Pretty simple.

The next item will ask for the respondent's age. Since there are 100 or more possible responses to this question, a multiple choice format would be cumbersome. Instead, we'll use the textbox element, which simply allow users to type their age into a textbox (or as some call it, an edit box). Here is the definition of our age item:

<textbox age>
/ caption = "Age"
/ mask = positiveinteger
/ range = (7, 110)
</textbox>

Note the element type is textbox and the name is "age". This time, the caption says "Age". Since respondents occassionally make mistakes when typing, we want to make sure the text they enter is in fact a valid age. The mask attribute provides a power tool for constraining the type of input that is allowed. In this case, we've set the mask to "positiveinteger", which means that anything other than a positive integer will be considered invalid. However, we don't want to allow just any positive integer. If the respondent types "1" for example, we know that can't be correct because one year-olds don't typically respond to surveys. Similarly, a response of 230432 s invalid because people don't live that long. So, we'll use the range attribute to contrain the range of valid ages to a value from 7 to 110.

Next up is the respondent's ethnicity. Just as before, we'll use a dropdown, specifying a caption and the response choices:

<dropdown ethnicity>
/ caption = "Ethnicity"
/ options = ("Hispanic or Latino", "Not Hispanic or Latino", "Unknown")
</dropdown>

The next question asks for the respondent's race. This is another multiple choice question, but it's slightly different than the previous ones because we'll want to include an "other" option that allows the respondent to enter a response that doesn't appear in the list of options. The dropdown question doesn't support the "other" option, but the radiobuttons control does, so we'll use that:

<radiobuttons race>
/ caption = "Race"
/ options = (
    "American Indian/Alaska Native",
    "East Asian",
    "South Asian",
    "Native Hawaian or other Pacific Islander",
    "Black or African American",
    "White",
    "More than one race - Black/White")
/ other = "Other"
</radiobuttons>

The radiobuttons* element has caption and option attributes that serve the same purpose as they do with the dropdown element. However, we've specified another attribute called other that tells Inquisit to add an "Other" option to the response choices. That options will include a textbox in which respondents can type their race if it isn't in the list.

*Sidenote: You may be wondering why this control is called "radiobuttons". If you were born before 1970, you might recall that the car radios at the time often had a row of punch buttons for selecting a preset radio station. When you punched in one button, the previously selected button popped out, thus assuring that only one station could be selected at a time. The radiobuttons user interface control functions in a similar way, so the name caught on.

Next, we'll ask for participant's political identity. This, too, is a multiple choice question, so either the dropdown or radiobuttons controls would work just fine. However, since liberal is generally associated with "left" and conservative with "right", we'll use a slider control in order to leverages this common association. With a slider control, users respond by sliding a button along a track until it is in the desired position. The track can offer a near-continuous array of positions, or it can force the button into a fixed number of discrete locations. Positions along the track can be labeled to indicate their meaning. With our slider control, respondents will move the button leftward to indicate increasingly liberal values and rightward to indicate increasingly conservative values. Our slider item is defined as follows:

<slider political>
/ caption = "Political Identity"
/ labels = (
    "strongly~nliberal", "moderately~nliberal", "slightly~nliberal",
    "neutral", "slightly~nconservative", "moderately~nconservative",
    "strongly~nconservative")
/ range = (1, 7)
/ slidersize = (60%, 5%)
/ showtooltips = false
</slider>

The caption attribute has the same function as in the previous items. The labels attribute specifies the labels that appear in equal distances from left to right along the slider track. Note that labels include the characters "~n". This is not a typo, it is a special character sequence indicating that Inquisit should insert a line break in that position when displaying the label on the screen.

The range attribute defines the number of positions on the track. In this case, there are seven positions who's values range from 1 to 7. Since there also seven labels, each position will align with each of the labels. Next, we'll use to slidersize attribute define the width and height of the slider so that it is wide enough to accomodate all of the labels. We've set the width to be 60% of the width of the computer screen, which should give it plenty of room. Finally, we've set the showtooltips attribute to false, so that the control doesn't display the values of each position in a tooltip as the user moves the button along the slider.

For the respondent's occupation, we'll again use a dropdown control. The dropdown is particularly useful in this case because it allows us to display a large number of options in a small amount of screen space:

<dropdown occupation>
/ caption = "Occupation"
/ options = ("Administrative Support - Supervisors", "Administrative Support - Financial Clerks",
 "Administrative Support - Information and Records",
 "Administrative Support - Recording, Scheduling, Dispatching, Distributing",
 "Administrative Support - Secretaries and Assistants",
 "Administrative Support - Other Support (data entry, office clerk, proofreaders)",
 "Arts/Design/Entertainment/Sports - Art and Design", "Arts/Design/Entertainment/Sports - Entertainers and Performers",
 "Arts/Design/Entertainment/Sports - Media and communication", "Arts/Design/Entertainment/Sports - Media Equipment workers",
 "Business - Business Operations", "Business - Financial Specialists", "Computer/Math - Computer Specialists",
 "Computer/Math - Math Scientists","Computer/Math - Math Technicians", "Construction/Extraction - Supervisors",
 "Construction/Extraction - Construction Trades","Construction/Extraction - Helpers, Construction Trades",
 "Construction/Extraction - Extraction (e.g., mining, oil)", "Construction/Extraction - Other",
 "Education - Postsecondary Teachers", "Education - Primary, Secondary, and Special Ed Teachers",
 "Education - Other teachers and instructors", "Education - Librarians, Curators, Archivists",
 "Education - Other education, training, and library occupations", "Education - Student",
 "Engineers/Architects - Architects, Surveyors, Cartographers", "Engineers/Architects - Engineers",
 "Engineers/Architects - Drafters, Engineering and Mapping Technicians", "Farming, Fishing, Forestry - Supervisors",
 "Farming, Fishing, Forestry - Agriculture","Farming, Fishing, Forestry - Fishing and Hunting",
 "Farming, Fishing, Forestry - Forest, Conservation, Logging", "Farming, Fishing, Forestry - Other",
 "Food Service - Supervisors", "Food Service - Cooks and food prep", "Food Service - Servers",
 "Food Service - Other food service workers (e.g., dishwasher, host)",
 "Healthcare - Diagnosing and Treating Practitioners (MD, Dentist, etc.)",
 "Healthcare - Technologists and Technicians", "Healthcare - Nursing and Home Health Assistants",
 "Healthcare - Occupational and Physical Therapist Assistants", "Healthcare - Other healthcare support",
 "Homemaker or Parenting", "Legal - Lawyers, Judges, and related workers", "Legal - Legal support workers",
 "Maintenance - Building and Grounds Supervisors", "Maintenance - Building workers","Maintenance - Grounds Maintenance",
 "Management - Top Executives",  "Management - Advertising, Sales, PR, Marketing","Management - Operations Specialists",
 "Management - Other Management Occupations", "Military - Officer and Tactical Leaders/Managers",
 "Military - First-line enlisted supervisor/manager", "Military - enlisted tactical, air/weapons, crew, other",
 "Production - Supervisors", "Production - Assemblers and Fabricators","Production - Food processing",
 "Production - Metal and Plastic", "Production - Printers", "Production - Textile, Apparel, Furnishings",
 "Production - Woodworkers", "Production - Plant and System Operators", "Production - Other",
 "Protective Service - Supervisors", "Protective Services - Fire fighting and prevention",
 "Protective services - Law Enforcement", "Protective Services - Other (e.g., security, lifeguards, crossing guards)",
 "Repair/Installation - Supervisors", "Repair/Installation - Electrical and Electronic",
 "Repair/Installation - Vehicle and Mobile Equipment", "Repair/Installation - Other", "Retired",
 "Sales - Supervisors", "Sales - Retail","Sales - Sales Representatives and Services",
 "Sales - Wholesale and Manufacturing", "Sales - Other sales (e.g., telemarketers, real estate)",
 "Science - Life Scientists", "Science - Physical scientists","Science - Social Scientists",
 "Science - Life, Physical, Social Science Technicians", "Service and Personal Care - Supervisors",
 "Service and Personal Care - Animal Care","Service and Personal Care - Entertainment attendants",
 "Service and Personal Care - Funeral Service", "Service and Personal Care - Personal Appearance",
 "Service and Personal Care - Transportation, Tourism, Lodging",
 "Service and Personal Care - Other service (e.g., child care, fitness)",
 "Social Service - Counselors, Social Workers, Community specialists", 	"Social Service - Religious Workers",
 "Transportation - Supervisors", "Transportation - Air Transportation","Transportation - Motor Vehicle Operators",
 "Transportation - Rail Transport", "Transportation - Water Transport", "Transportation - Material Moving",
 "Transportation - Other", "Unemployed")
/ optionvalues = (
 "43-1000", "43-3000", "43-4000", "43-5000", "43-6000", "43-9000", "27-1000", "27-2000", "27-3000",
 "27-4000", "13-1000", "13-2000", "15-1000", "15-2000", "15-3000", "47-1000", "47-2000", "47-3000",
 "47-5000", "47-4000", "25-1000", "25-2000", "25-3000", "25-4000", "25-9000", "25-9999", "17-1000",
 "17-2000", "17-3000", "45-1000", "45-2000", "45-3000", "45-4000", "45-9000", "35-1000", "35-2000",
 "35-3000", "35-9000", "29-1000", "29-2000", "31-1000", "31-2000", "31-9000", "00-0000", "23-1000",
 "23-2000", "37-1000", "37-2000", "37-3000", "11-0000", "11-2000", "11-3000", "11-9000", "55-1000",
 "55-2000", "55-3000", "51-1000", "51-2000", "51-3000", "51-4000", "51-5000", "51-6000", "51-7000",
 "51-8000", "51-9000", "33-1000", "33-2000", "33-3000", "33-9000", "49-1000", "49-2000", "49-3000",
 "49-9000", "99-0001", "41-1000", "41-2000", "41-3000", "41-4000", "41-9000", "19-1000", "19-2000",
 "19-3000", "19-4000", "39-1000", "39-2000", "39-3000", "39-4000", "39-5000", "39-6000", "39-9000",
 "21-1000", "21-2000", "53-1000", "53-2000", "53-3000", "53-4000", "53-5000", "53-7000", "53-6000",
 "99-9999")
</dropdown>

            As you can see, there are a lot of choices in the list! You may have also noticed
            that we're using the optionvalues attribute. By default, Inquisit records
            the text of the selected option into the data file. The optionvalues attribute
            allows us to assign alternative values to each option to be used in recording the
            data. This is handy if you want to use numeric values or codes when analyzing the
            data rather than the sometimes long strings of text that are displayed for each
            response choice. In this case, each occupation will be recorded using the Standard
            Occupational Classification code as defined by the US Department of Labor.


Demographic Survey Tutorial: Creating Survey Questions (Continued)

Creating Survey Questions (Continued)

The next item allows respondents to indicate their religion. Again, we'll use a dropdown given the large number of options.

<dropdown religion>
/ caption = "Religious Affiliation"
/ options = (
 "None", "African Methodist Episcopal Church", "African Methodist Episcopal Zion Church", "Agnostic",
 "American Baptist Association", "American Baptist Churches in the U.S.A.",
 "Antiochian Orthodox Christian Diocese of North America", "Armenian Apostolic Church of America",
 "Assemblies of God", "Atheist", "Baha'i", "Baptist Bible Fellowship International", "Baptist General Conference",
 "Baptist Missionary Association of America", "Buddhist", "Christian and Missionary Alliance, The",
 "Christian Brethren (Plymouth Brethren)", "Christian Church (Disciples of Christ)",
 "Christian Churches and Churches of Christ", "Christian Congregation, Inc., The", "Christian Methodist Episcopal Church",
 "Christian Reformed Church in North America", "Church of God in Christ", "Church of God of Prophecy",
 "Church of God (Anderson, IN)", "Church of God (Cleveland, TN)", "Church of Jesus Christ of Latter-day Saints, The",
 "Church of the Brethren", "Church of the Nazarene", "Churches of Christ", "Conservative Baptist Association of America",
 "Coptic Orthodox Church", "Cumberland Presbyterian Church", "Eastern Orthodox", "Eastern Orthodox", "Ecumenical",
 "Episcopal Church", "Evangelical Covenant Church, The", "Evangelical Free Church of America, The",
 "Evangelical Lutheran Church in America", "Evangelical Presbyterian Church", 	"Free Methodist Church of North America",
 "Full Gospel Fellowship of Churches and Ministers Intl", "General Association of General Baptists",
 "General Association of Regular Baptist Churches", "General Conference Mennonite Brethren Churches",
 "Grace Gospel Fellowship", "Greek Orthodox Archdiocese of America", "Hindu", "Independent Fundamental Churches of America",
 "International Church of the Foursquare Gospel", "International Council of Community Churches",
 "International Pentecostal Holiness Church", "Jehovah's Witnesses", "Jewish", "Lutheran Church-Missouri Synod, The",
 "Mennonite Church", "Muslim/Islamic", "National Assoc of Congregational Christian Churches",
 "National Association of Free Will Baptists", "National Baptist Convention of America, Inc.",
 "National Baptist Convention, USA, Inc.", "National Missionary Baptist Convention of America", "Old Order Amish Church",
 "Orthodox Church in America", "Pentecostal Assemblies of the World, Inc.", "Pentecostal Church of God",
 "Pentecostal Church of God", "Presbyterian Church in America", "Presbyterian Church (U.S.A.)",
 "Progressive National Baptist Convention, Inc.", "Reformed Church in America", "Religious Society of Friends (Conservative)",
 "Reorganized Church of Jesus Christ of Latter Day Saints", "Roman Catholic Church, The",
 "Romanian Orthodox Episcopate of America, The", "Salvation Army,The", "Serbian Orthodox Church in the U.S.A. and Canada",
 "Seventh-day Adventist Church", "Sikh", "Southern Baptist Convention", "Unitarian Universalist", "United Church of Christ",
 "United Methodist Church, The", "Wesleyan Church, The", "Wisconsin Evangelical Lutheran Synod", "Other")
</dropdown>

Next is education level, again using a dropdown.

<dropdown education>
/ caption = "Education"
/ options = ("elementary", "junior high", "some highschool", "high school graduate", "some college",
 "associate's degree", "bachelor's degree", "some graduate school", "masters degree", "M.B.A.",
 "J.D.", "M.D.", "Ph.D.", "other advanced degree")
</dropdown>

The next two items ask for country of citizenship and residence, respectively. The name of each country will be displayed in our dropdown list, as specified by the options attribute. The value recorded in the data file will be the two letter postal abbreviation for that country, as specified by the optionsvalues attribute.

<dropdown citizenship>
/ caption = "Country/Region of Primary Citizenship"
/ options = (
 "U.S.A.", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola",
 "Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba",
 "Australia", "Austria", "Azerbaijan", "Bahamas, The", "Bahrain", "Bangladesh", "Barbados",
 "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegovina",
 "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei", "Bulgaria",
 "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands",
 "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands",
 "Colombia", "Comoros", "Congo", "Congo, Democratic Republic of the", "Cook Islands", "Costa Rica",
 "Cote D'Ivoire (Ivory Coast)", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark",
 "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador",
 "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Islas Malvinas)",
 "Faroe Islands", "Fiji Islands", "Finland", "France", "French Guiana", "French Polynesia",
 "French Southern Territories", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Gibraltar",
 "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau",
 "Guyana", "Haiti", "Heard and McDonald Islands", "Honduras", "Hong Kong S.A.R.", "Hungary",
 "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan",
 "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea", "Korea, North", "Kuwait", "Kyrgyzstan",
 "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg",
 "Macau S.A.R.", "Macedonia, Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia",
 "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte",
 "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique",
 "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands Antilles", "Netherlands, The", "New Caledonia",
 "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands",
 "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru",
 "Philippines", "Pitcairn Island", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion",
 "Romania", "Russia", "Rwanda", "Saint Helena", "Saint Kitts And Nevis", "Saint Lucia",
 "Saint Pierre and Miquelon", "Saint Vincent And The Grenadines", "Samoa", "San Marino",
 "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore",
 "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa",
 "South Georgia And The South Sandwich Islands", "Spain", "Sri Lanka", "Sudan", "Suriname",
 "Svalbard And Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan",
 "Tanzania", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad And Tobago", "Tunisia", "Turkey",
 "Turkmenistan", "Turks And Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates",
 "United Kingdom", "U.S.A.", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan",
 "Vanuatu", "Vatican City State (Holy See)", "Venezuela", "Vietnam", "Virgin Islands (British)",
 "Virgin Islands (US)", "Wallis And Futuna Islands", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe")
/ optionvalues = (
 "US", "AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS",
 "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BV", "BR", "IO", "BN", "BG",
 "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "td", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD",
 "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "TP", "EC", "EG", "SV", "GQ", "ER",
 "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR",
 "GL", "GD", "GP", "GU", "GT", "GN", "GW", "GY", "HT", "HM", "HN", "HK", "HU", "IS", "IN", "ID", "IR",
 "IQ", "IE", "IL", "IT", "JM", "JP", "JO", "KZ", "KE", "KI", "KR", "KP", "KW", "KG", "LA", "LV", "LB",
 "LS", "LR", "LY", "li", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR",
 "MU", "YT", "MX", "FM", "MD", "MC", "MN", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "AN", "NL", "NC",
 "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PA", "PG", "PY", "PE", "PH", "PN",
 "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "SH", "KN", "LC", "PM", "VC", "WS", "SM", "ST", "SA",
 "SN", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "GS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE",
 "CH", "SY", "TW", "TJ", "TZ", "TH", "TG", "TK", "TO", "TT", "TN", "tr", "TM", "TC", "TV", "UG", "UA",
 "AE", "UK", "US", "UM", "UY", "UZ", "VU", "VA", "VE", "VN", "VG", "VI", "WF", "YE", "YU", "ZM", "ZW")
</dropdown>

<dropdown residence>
/ caption = "Country/Region of Residence"
 "U.S.A.", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola",
 "Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba",
 "Australia", "Austria", "Azerbaijan", "Bahamas, The", "Bahrain", "Bangladesh", "Barbados",
 "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegovina",
 "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei", "Bulgaria",
 "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands",
 "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands",
 "Colombia", "Comoros", "Congo", "Congo, Democratic Republic of the", "Cook Islands", "Costa Rica",
 "Cote D'Ivoire (Ivory Coast)", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark",
 "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador",
 "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Islas Malvinas)",
 "Faroe Islands", "Fiji Islands", "Finland", "France", "French Guiana", "French Polynesia",
 "French Southern Territories", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Gibraltar",
 "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau",
 "Guyana", "Haiti", "Heard and McDonald Islands", "Honduras", "Hong Kong S.A.R.", "Hungary",
 "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan",
 "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea", "Korea, North", "Kuwait", "Kyrgyzstan",
 "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg",
 "Macau S.A.R.", "Macedonia, Former Yugoslav Republic of", "Madagascar", "Malawi", "Malaysia",
 "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte",
 "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique",
 "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands Antilles", "Netherlands, The", "New Caledonia",
 "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands",
 "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru",
 "Philippines", "Pitcairn Island", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion",
 "Romania", "Russia", "Rwanda", "Saint Helena", "Saint Kitts And Nevis", "Saint Lucia",
 "Saint Pierre and Miquelon", "Saint Vincent And The Grenadines", "Samoa", "San Marino",
 "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore",
 "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa",
 "South Georgia And The South Sandwich Islands", "Spain", "Sri Lanka", "Sudan", "Suriname",
 "Svalbard And Jan Mayen Islands", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan",
 "Tanzania", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad And Tobago", "Tunisia", "Turkey",
 "Turkmenistan", "Turks And Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates",
 "United Kingdom", "U.S.A.", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan",
 "Vanuatu", "Vatican City State (Holy See)", "Venezuela", "Vietnam", "Virgin Islands (British)",
 "Virgin Islands (US)", "Wallis And Futuna Islands", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe")
/ optionvalues = (
 "US", "AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS",
 "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BV", "BR", "IO", "BN", "BG",
 "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "td", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD",
 "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "TP", "EC", "EG", "SV", "GQ", "ER",
 "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR",
 "GL", "GD", "GP", "GU", "GT", "GN", "GW", "GY", "HT", "HM", "HN", "HK", "HU", "IS", "IN", "ID", "IR",
 "IQ", "IE", "IL", "IT", "JM", "JP", "JO", "KZ", "KE", "KI", "KR", "KP", "KW", "KG", "LA", "LV", "LB",
 "LS", "LR", "LY", "li", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR",
 "MU", "YT", "MX", "FM", "MD", "MC", "MN", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "AN", "NL", "NC",
 "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PA", "PG", "PY", "PE", "PH", "PN",
 "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "SH", "KN", "LC", "PM", "VC", "WS", "SM", "ST", "SA",
 "SN", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "GS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE",
 "CH", "SY", "TW", "TJ", "TZ", "TH", "TG", "TK", "TO", "TT", "TN", "tr", "TM", "TC", "TV", "UG", "UA",
 "AE", "UK", "US", "UM", "UY", "UZ", "VU", "VA", "VE", "VN", "VG", "VI", "WF", "YE", "YU", "ZM", "ZW")
</dropdown>

Finally, we'll ask participants to enter their postal code using a textbox:

<textbox zipcode>
/ caption = "Current Postal Code"
</textbox>

Note that Inquisit has a mask called "uszipcode" that constrains the input to be a valid United States zip code (5 digit format, plus 4 optional). If we expect respondents from other countries, however, we should leave off this constraint since postal codes throughout the world come in a variety of formats.


Demographic Survey Tutorial: Creating Survey Pages

Creating Survey Pages

Once you've defined the questions, the next step is to determine how to layout those questions on the pages of the survey. Inquisit allows you break out questions into separate pages/screens. Respondents can answer the questions on a single page and then click the "Next" button to answer more questions on the next page. The survey can be configured to allow them to navigate back to previous page and change their answers, or to allow forward only navigation.

Inquisit allows us to configure the font size of each question along with the spacing between questions. By using small fonts and spacings, we could try to squeeze all of the questions onto a single page. The result would look cramped, however, so we'll separate the questions into two pages.

The first page is specified here:

<surveypage demographics1>
/ caption = "Please answer the following demographic questions"
/ fontstyle = ("Verdana", -16, true, false, false, false, 5, 0)
/ questions = [1=sex; 2=age; 3=ethnicity; 4=race; 5=political; 6=occupation]
</surveypage>

The element type is surveypage, and the name of this page "demographics1". The caption attribute tells Inquisit to display a simple instruction at the top of the page. The fontstyle attribute specifies the font in which caption appears, 14pt Verdana in bold. Finally, the questions attribute lists the items that we defined previously that should be included on the page. In this case, we've specified six questions -- sex, age, ethnicity, race, political, and occupation -- presented in that order.

Now let's define the second page:

<surveypage demographics2>
/ caption = "Please answer the following demographic questions (continued)"
/ fontstyle = ("Verdana", -16, true, false, false, false, 5, 0)
/ questions = [1=religion; 2=education; 3=citizenship; 4=residence; 5=zipcode]
</surveypage>

This page has a caption similar to the first page, although we've added "(continued)" to it. The fonstyle is the same as the first page. This page presents the remaining 5 questions that we previously created -- religion, education, citizenship, residence, and zipcode -- in that order.

That wasn't too painful.


Demographic Survey Tutorial: Creating the Survey

Creating the Survey

Last but not least, we need to specify the order in which the pages are presented, along with some other global settings. For this, we use the survey element:

<survey demographics>
/ pages = [1=demographics1; 2=demographics2]
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 2%
/ showpagenumbers = false
</survey>

We've named our survey "demographics". The pages attribute specifies which pages appear in the survey and in what order. Our survey presents the surveypage called "demographics1" followed by the surveypage called "demographics2".

The responsefontstyle attribute specifies the font to use for response options in the survey. This font applies to the choices in our multple choice items, and the text that the user types in the textbox items.

The itemfontstyle attribute specifies the font used for the captions of our survey questions.

The itemspacing attribute specifies that the space between questions should be 2% of the height of the screen.

The showpagenumbers attribute specifies whether each page should be numbered. Since our survey is only two pages, we'll turn off page numbering by setting this attribute to false.

That's it - our survey is complete. You can run the survey by selecting the "Run" command on Inquisit's "Experiment" menu. Once you've completed the survey, the data will be recorded into a file called "demographics.iqdat". The name based on the name of the survey element. The data file will be located in the same folder as your script file.


Inquisit How To's

This section contains how-to topics on various Inquisit features. If you don't find what you are looking for here, please email your question or request to .

How to Interoperate with Web Survey Packages

How to Adjust the Response Window

How to Combine Multiple Data Files into a Single File

How to Run an Experiment from the Command Line

How to do Conditional Branching

How to Control Trial Duration and Inter-Trial Intervals

How to Erase Stimuli

Useful Keyboard Commands

How to Run Individual Blocks, Trials, Stimuli, and Instruction Pages

How to Present Stimulus Pairs

How to Use the Parallel Port Monitor Tool (Windows and Mac)

How to Run an Experiment

How to Present TTL Signals Through the Parallel Port (Windows and Mac)

How to Record Responses from a Serial Response Box

How to Setup and Use Setup Speech Recognition

How to Present Stimuli Provided by Subjects

How to Debug a Script

How to Test a Script

How to Run an Inquisit 6 Experiment on the Web

How to Control Response Timing


How to Run an Experiment

There are several ways to run an Inquisit experiment.

Using Inquisit's Menus

  • On Windows, Launch Inquisit from the Start Menu. On Mac OSX, double-click Inquisit.app in the Applications folder.

  • Select the Open command on Inquisit's File menu.

  • Choose the script file you would like to run.

  • Select the Run command on Inquisit's Experiment menu.

  • When prompted, enter a group id and subject id and press the OK button.

Using Windows Explorer

  • Find the script file you would like to run in Windows Explorer.

  • Double click on the script file.

  • When prompted, enter a subject number and press the OK button.

(You can also create shortcuts to Inquisit scripts, and launch the script by double clicking on the shortcut icon. )

Using the Commmand Prompt on Windows or the Terminal on Mac

For details on running Inquisit from a command prompt, see Running an Experiment from the Command Line

Interrupting an Experiment or Block in Progress

While the experiment is running,

  • Press Ctrl+b to skip the rest of the trials of the current block.

  • Press Ctrl+q to immediately end the experiment.


Register and Launch Inquisit from the Command Line

Launch Inquisit Experiments Using Command Line Parameters

Inquisit supports launching experiments from the command line shell. This enables you to launch an experiment directly from the Windows Command Prompt or the Mac OSX Terminal application. It also provides a way for other applications to run a specific Inquisit script using a specific subject and/or group id.

When launching from a command prompt, you can supply arguments specifying the subject id, script, and other arguments so that the script will simply be launched without opening the editor or prompting for a subject id. This enables Inquisit experiments to be directly launched from external software programs or shells scripts.

The command line syntax is as follows:

>"inquisitpath" "scriptpath" [options]
Options:
-s <subjectid>
-g <groupid>
-p <password>
-m <monkey|human>
-h

The definition of each parameter is as follows:

inquisitpath | Quoted, fully qualified path to the Inquisit.exe file. For example, "C:\Program Files\Millisecond Software\Inquisit 6\Inquisit.exe" or "/Applications/Inquisit.app".
scriptpath | Quoted, fully qualified path to the script file to run. For example, "C:\My Scripts\script.iqx".
groupid | The group id for this session.
subjectid | The subject id for this session.
monkey | human | If "monkey" is specified, the automatic hydromatic systematic test monkey runs the script. Otherwise, if "human" is specified, the script runs in standard interactive mode.
password | Specifies the password use to decrypt an encryptd script file. The password must exactly match the password given when the encrypted file was saved.
h | Show command line syntax help.

On Windows, the full path to Inquisit is usually:

"C:\Program Files\Millisecond Software\Inquisit 6\Inquisit.exe"

On Mac OSX, the full path is usually:

/Applications/Inquisit 6.app/Contents/MacOS/Inquisit 6

This path may vary if you have installed Inquisit to a different drive, volume, or folder.

If no other parameters besides the Inquisit path are specified, Inquisit will simply open.

If the full path to a script file is included in the command, Inquisit is launched, the script file is opened, the user is prompted for a group and subject id, and the experiment begins.

If the group and subject ids are included in the command, Inquisit is launched and the script is run using the specified ids. The group and subject id option are only valid when a script file is specified.

The following runs an IAT script using a subject id of 1000 and group id of 2 on a Windows command line.

"C:\Program Files\Millisecond Software\Inquisit 6\Inquisit.exe" "C:\MyInquisitScripts\IAT.iqx" -s 1000 -g 2

The following does the sampe on a Mac terminal prompt

"/Applications/Inquisit.app" "~/myscripts/IAT.iqx" -s 1000 -g 2

Registering Inquisit from the Command Line

Inquisit supports automatic registration from the command line. This can be useful for automated admin installations on a large number of machines in a managed network. To auto-register, the deployment scripts can simply run Inquisit with the following parameters after the installation is complete.

The command line syntax is as follows:

>"inquisitpath" [options]

Options:
--register
--userid <email>
--password <password>
--account <account name>

The definition of each parameter is as follows:

inquisitpath | Quoted, fully qualified path to the Inquisit.exe file. For example, "C:\Program Files\Millisecond Software\Inquisit 6\Inquisit.exe" or "/Applications/Inquisit.app".
--register | Indicates Inquisit should register with key from the user account specified in the other parameters.
--userid | The email address of the user of the account to retrieve the key from.
--password | The password correspondeing to the userid.
--account | If the user is a member of more than one account, specify the account from which to obtain the key. If the user is a member of only one account, this parameter need not be specified.


How to Run Individual Blocks, Trials, Stimuli, and Instruction Pages

How to Run Blocks, Trials, and Stimuli

Inquisit 6 allows you to run individual elements in a script, such as blocks, trials, stimuli, or instruction pages. This can be very handy for demonstrating tasks and methods in lectures and presentations, and provides a convenient way to quickly test new elements.

To run a given element, simply right click anywhere within that element's definition in the script editor and select the Run command from the context menu. You will be prompted for a subject id and group id, after which the element you selected will run. If the element was a stimulus, it will display all of the stimulus items one at a time. If it is a trial or block, it will simply run it.


How to Present Stimuli Provided by Subjects

Inquisit supports defining stimulus sets based on input provided by the subject. This feature can be used, for example, to present text provided by the subject (e.g., the subject's stated name), or to present only stimuli selected by the subject on previous trials.

Presenting text entered by the subject

To create a set of items consisting of text entered by the subject, first we'll define an empty item set to store the items:

<item responseitems>
</item>
Next, we'll create a survey page with textbox items for gathering the respondent's first and last name:
<textbox firstname>
/ caption = "Please enter your first name:"
</textbox>

<textbox lastname>
/ caption = "Please enter your last name:"
</textbox>

<surveypage page1>
/ questions = [1=firstname; 2=lastname]
/ ontrialend = [item.responseitems.insertitem(textbox.firstname.response, 1)]
/ ontrialend = [item.responseitems.insertitem(textbox.lastname.response, 2)]
</surveypage>

This is a survey page with two items allowing respondents to enter their first and last names. The ontrialend attributes contain the commands that actually do the work of adding the names to the responseitems set. The first ontrialend command adds a new item to responseitems by setting the item property to the response for the firstname question. The second ontrialend command adds the last name in a similar fashion. Neither of these commands changes or removes the items that are already in the responseitems item set - they simply add new items. Using this technique, we can build up item sets of arbitrary length containing user-supplied content.

If we later want to change the first name item to something else (e.g., a nickname), we could do so using the following command:

<surveypage page2>
/ questions = [1=nickname]
/ ontrialend = [item.responseitems.setitem(textbox.nickname.response, 1)]
</surveypage>

This time, the ontrialend command assigns the first item in the responseitems set to the middle name. This time, the command includes the index number "1", which refers specifically to the first item in the set. By specifying the index number, we can thus change item in that position. If the index number is omitted as in the first example, a new item is added.

Stimulus elements can use the responseitems element the same way they would use other item elements. For example:

<text responses>
/ txcolor = (0, 255, 0)
/ position = (25, 25)
/ items = responseitems
</text>

This text element presents the responseitems in the upper left corner of the screen in green.

Text items selected by the participant

In additional to allowing participants to type in new stimuli, it is also possible for them to choose items from a predetermined list. Imagine we want to create an item set containing three cities the participant has never visited. We'll store these items in an item set called "cities":

<item cities>
</item>

Next, we'll create a survey page with a checkboxes item with a list of cities for the participant to choose from:

<checkboxes cities>
/ caption = "Select three of the cities below that you have never visited:"
/ options = ("Berlin", "London", "Tokyo", "Paris", "Rome", "Sydney", "New York")
/ range = (3, 3)
</checkboxes>

<surveypage page1>
/ questions = [1=cities]
/ ontrialend = [ if (checkboxes.cities.checked.1 == true) item.cities.item = checkboxes.cities.option.1 ]
/ ontrialend = [ if (checkboxes.cities.checked.2 == true) item.cities.item = checkboxes.cities.option.2 ]
/ ontrialend = [ if (checkboxes.cities.checked.3 == true) item.cities.item = checkboxes.cities.option.3 ]
/ ontrialend = [ if (checkboxes.cities.checked.4 == true) item.cities.item = checkboxes.cities.option.4 ]
/ ontrialend = [ if (checkboxes.cities.checked.5 == true) item.cities.item = checkboxes.cities.option.5 ]
/ ontrialend = [ if (checkboxes.cities.checked.6 == true) item.cities.item = checkboxes.cities.option.6 ]
/ ontrialend = [ if (checkboxes.cities.checked.7 == true) item.cities.item = checkboxes.cities.option.7 ]
</surveypage>

The checkboxes item lists seven cities and uses the range attribute to constrain the number of selections to 3. There are seven ontrialend commands, each of which evaluates whether its corresponding city is checked, and if so, adds it to the cities item list. The items can then be presented using a text element.

<text responses>
/ items = cities
</text>

Next, define an item element whose items will consist of the picture or text items selected by the subject on each run of the multiplechoice trial:

<item selecteditems>
/ items = (multiplechoice)
</item>

Each time a multiplechoice trial is run, Inqusit adds the item selected by the subject to the selecteditems item set. If the multiplechoice trial presented pictures, the selecteditems item element could be presented by picture elements in the script. If the multiplechoice trial presented text, the selecteditem item element could be presented by text elements.

Picture items selected by the participant

We'll use the cities example again, but modify it to create an item set of pictures. Again, we'll store these items in an item set called "cities":

<item cities>
</item>

Here is our checkboxes survey item with the list of cities. This time, we've added the optionvalues attribute to define, for each option, the name of the corresponding jpg file containing a picture of the city. The checkboxes item will still display the city names next to each the checkbox, not the underlying optionsvalues.

<checkboxes cities>
/ caption = "Select three of the cities below that you have never visited:"
/ options = ("Berlin", "London", "Tokyo", "Paris", "Rome", "Sydney", "New York")
/ optionvalues = ("berlin.jpg", "london.jpg", "tokyo.jpg", "paris.jpg", "rome.jpg", "sydney.jpg", "newyork.jpg")
/ range = (3, 3)
</checkboxes>

Finally, here is the surveypage that displays the checkboxes item:

<surveypage page1>
/ questions = [1=cities]
/ ontrialend = [ if (checkboxes.cities.checked.1 == true) item.cities.item = checkboxes.cities.optionvalues.1 ]
/ ontrialend = [ if (checkboxes.cities.checked.2 == true) item.cities.item = checkboxes.cities.optionvalues.2 ]
/ ontrialend = [ if (checkboxes.cities.checked.3 == true) item.cities.item = checkboxes.cities.optionvalues.3 ]
/ ontrialend = [ if (checkboxes.cities.checked.4 == true) item.cities.item = checkboxes.cities.optionvalues.4 ]
/ ontrialend = [ if (checkboxes.cities.checked.5 == true) item.cities.item = checkboxes.cities.optionvalues.5 ]
/ ontrialend = [ if (checkboxes.cities.checked.6 == true) item.cities.item = checkboxes.cities.optionvalues.6 ]
/ ontrialend = [ if (checkboxes.cities.checked.7 == true) item.cities.item = checkboxes.cities.optionvalues.7 ]
</surveypage>

For each city listed in the checkboxes item, the corresponding ontrialend command evaluates whether its checkbox is checked, and if so, adds the optionvalue (i.e., the picture file name) to item set. Now, we can create a picture element that will display these pictures:

<picture selectedcities>
/ items = cities
</picture>

One additional step is required to make this solution work. To maximize performance, Inquisit loads all pictures files used by a script at the very beginning as it parses the script. We therefore we need to tell Inquisit that the script uses these files, or it won't load them. We can do this by creating a picture element that lists these files as items. We won't actually use this element anywhere in the script - it's just there so that Inquisit will load the pictures:

<picture dummy>
/ items = ("berlin.jpg", "london.jpg", "tokyo.jpg", "paris.jpg", "rome.jpg", "sydney.jpg", "newyork.jpg")
</item>

There you have it.


How to Present Stimulus Pairs

Often an experiment will require presentation of stimulus pairs. For example, a lexical priming task may have prime-target pairs such DOCTOR/NURSE that are meant to be presented together on a given trial.

Stimulus pairs are defined in Inquisit by creating two stimulus elements for the first and second members of each pair, then linking selection of the second with that of the first. For example:

<text firstname>
/ items = ("BILL", "LINDON")
/ select = noreplace
</text>

<text lastname>
/ items = ("CLINTON", "JOHNSON")
/ select = text.firstname.currentindex
</text>

For firstname, select = noreplace means that whenever firstname is presented, it randomly selects without replacement which specific item is shown. For lastname, select = current(firstname) indicates that whenever a lastname is presented, it selects the item corresponding to the currently selected firstname item.

The trial below presents both stimuli:

<trial person>
/ stimulustimes = [0 = firstname; 100 = lastname]
/ response = anyresponse
</text>

On each run of this trial, BILL is always followed by CLINTON and LINDON is always followed by JOHNSON.


How to Test a Script

The Test Monkey

Inquisit has a built in 'test monkey' who will happily perform even the longest, most tedious experiments in order to generate sample data. To run the monkey:

a) Open the experiment script in Inquisit.

b) Select the "Monkey" command from the Tools menu.

c) Enter a subject number when prompted and then press OK.

Now, go enjoy a cup of coffee as the monkey runs through the entire experiment without so much as a complaint. Consult your animal subjects ethics board to determine whether the monkey's informed consent is required.

Tuning the Test Monkey

You can use the monkey element to control the speed and accuracy with which the monkey responds.

On a given trial, you can also specify the monkeyresponse attribute on a given trial to specify the possible responses the monkey can randomly select when responding on a given trial.

If the monkeyresponse attribute is not specified, the monkey will randomly select from the responses specified in the validresponse and correctresponse attributes. The monkeyresponse attribute is thus required in order to use the monkey on trials that don't specify either of these attributes. For example, you would use the monkeyresponse attribute on trials that use the isvalidresponse or iscorrectresponse event handler attributes to identify valid and corred responding using dynamic expressions.


How to Debug a Script

Fixing Script Errors

The syntax colorization within the Inquisit editor can be helpful for detecting some problems, such as misspelled commands, missing quotation marks, or missing close tags.

A deeper level of error detection happens when the script is parsed. The parse phase can be triggered by selecting the Validate Script command, or by running the entire script or a particular element. During the parsing phase, Inquisit may detect a variety of errors, including malformed syntax, references to elements that have not been defined, links to media files or included scripts that it can not locate or load, or file access errors.

Inquisit will report any script errors detected during the parse phase in the Error window at the bottom of the screen. Each error reports the specific element and attribute where the error occured, along with a descriptive message. If you double-click an error, the Inquisit editor will jump to the location of the attribute and element in the script where the problem lies. Many errors can be fixed by examing the problematic command, reading the descriptive error message, and making the appropriate changes.

Help on Syntax

For additional information about a given command, place the cursor in the element that caused the error and press the F1 key to open the reference topic for the element.

The Debugger Watch Window

The Debugger Watch Window halts execution of the script and shows you the current values of every propery in the script at that point in time. This can be a useful advanced tool for debugging expressions that reference various property values. For example, if you have an expression in the script comparing two property values, and the result of the comparison is not what you expect, you can use the Debugger Watch Window to see what those values actually are as the script is running at the point when the comparison is being made.

There are two ways to open the Debugger Watch Window. You can open it using the following keyboard shortcut while the script is running.

Press Ctrl+D

You can also call the script.debugbreak() function if you wish to see property values at a particular point in the script logic.

Test Monkey

The Test Monkey provides a way to quickly produce sample data from your script. You can then analyze the data file to check whether the structure of the experiment is as expected. For example, you can load the data into Excel and build pivot tables to check that blocks are run in the expected order, items are randomly selected at the expected counts, the correct number of trials are run, and that other structural constraints in the experiment are met.

More information on the Test Monkey is available in the How to Test an Experiment help topic


Inquisit Runtime Commands

Aborting an Experiment

Inquisit has special built in commands that allows you to abort the rest of an experiment. This are useful, for example, when you are testing out a script, discover an error, and wish to end the session so that you can return to the editor and fix the problem. Note that any data collected up to that point will be saved.

The command for aborting a batch of mulitiple scripts:

  • Windows and Mac: Press the Ctrl+A Keys
  • iOS, Android, Windows Touch: Draw a Z across the screen with 2 fingers

The command for aborting a single script is:

  • Windows and Mac: Press the Ctrl+Q Keys
  • iOS, Android, Windows Touch: Draw a backwards Z across the screen with 2 fingers

Skipping the Current Block

Inquisit also has a built in command that enable you to skip the current block. This is useful if you are wish to test a block that occurs later in the script and you don't want to respond to every trial on every preceding block. To skip the current block, use the following command:

  • Windows and Mac: Press the Ctrl+B Keys
  • iOS, Android, Windows Touch: Draw an upside down Z across the screen with 2 fingers

Opening the Debugger Watch Window

Inquisit has a Debugger Watch Window that shows you the current values of every propery in the script at any point while it is running. This can be a useful advanced tool for debugging expressions that reference various property values. To launch the Debugger Watch Window, use the following command:

  • Windows and Mac: Press the Ctrl+D Keys
  • iOS, Android, Windows Touch: Not supported


How to Erase Stimuli

By default, Inquisit erases all stimuli presented on a given trial after the subject has responded. Note that you can prevent a stimulus from being erased at the end of a trial by setting its erase attribute to false.

Some research tasks require that stimuli be presented for a fixed duration, after which it should be removed from the screen. To erase a stimulus after a fixed duration, you must create a separate 'blank' stimulus element and then present that blank at the appropriate interval in the stimulus presentation sequence so that it overwrites the stimulus you wish to erase.

There are a number of ways to create a blank stimulus. The easiest is to create a rectangular shape element, set its size large enough to cover the stimulus you wish to erase, and then set its color to the background color of the screen.

If you are erasing text items of various sizes, it may make sense to define a second text element that uses the same set of items, sets the select attribute as linked with the to-be-erased stimulus, but sets the txcolor and txbgcolor attributes to the background color of the screen. Each time this blank text stimulus is presented, it will present a erasing rectangle that is exactly the same size of the original text stimulus.


How to Analyze Recorded Voice Responses

Many reaction time tasks are best administered by requiring participants to make verbal responses. Consider the classic Stroop task, for example, whereby the respondent is required to identify the color of the ink in which color names are printed. Although it's possible to demonstrate the Stroop effect using key or button presses, the effect is much more evident with verbal responses. Unfortunately, analyzing the accuracy of verbal responses typically requires the tedious and time-consuming process of transcribing hundreds or even thousands of recorded vocalizations. Given the amount of labor involved, many researchers avoid verbal response tasks altogether in favor of procedures that can be completely computer automated.

Inquisit removes the tedium of transcribing verbal responses by leveraging speech recognition software. With Inquisit, spoken responses can be automatically analyzed in real time, or you can record responses and then later analyze them with the speech engine.

To analyze the content of spoken responses in real time, simply set the inputdevice attribute to speech. With this option, Inquisit activates the speech engine on every voice trial, listens for a response, and then attempts to identify the utterance from a list of possible responses that you specify. The identified response is recorded directly into the data file. In cases where the response could not be identified, Inquisit records a "?" instead. The advantages of this option are that a) the utterance is immediately available in the data file for analysis, and b) Inquisit can determine whether a correct or incorrect response was given for purposes of providing tracking performance and providing error feedback. The disadvantages of speech option are that the speech engine may occassionally misidentify or fail to recognize valid utterances. It also may impose a perceptible delay between the time an utterance is made and the time it is recognized (importantly, this delay does not affect the measurement of response latency of spoken responses).

To record responses for subsequent speech recognition analysis, set the inputdevice attribute to voicerecord. With this option, Inquisit listens for a response on every trial, and when it picks up incoming sound, that sound is recorded to a wav file. Separate wave files are recorded for each trial, and files are named in a way that allows you to match the file to the particular trial of the particular session for the particular subject that made the response. When you are ready to analyze the data, Inquisit provides a handy tool that "listens" to each wav file, identifies the spoken content, and saves the results to a tab delimited file.

The "Analyze Recorded Responses" Tool

To analyze the recorded responses, click Inquisit's Tools menu, and select the "Analyze Recorded Responses..." command. This will open the following window:

Analize recorded responses

First, you must specify the folder containing the recorded wav files. You will find these files in a subfolder called "voicerecord" located in the folder containing your script file.

Next, you can optionally specify the complete list of valid utterances so that the engine knows what words to listen for. If your task has a fixed set of valid responses, specifying them here will greatly improve the recognition accuracy of the engine. If you do not specify valid responses, the engine treats the entire lexicon as a potentially valid response, and recognition accuracy suffers accordingly.

To start the analysis, click the Analyze button. Once all the files have been analyzed, each wav file and its recognition result appear in the list below. If the engine could not identify the response, a "?" appears. To listen to any of the wav files, simply double-click the file in the results list and it will play (make sure audio is configured correctly, speakers are turned on, and the volume is turned up). By listening to the files, you can double-check the engine's accuracy or try to identify an utterance that the engine could not.

Finally, you can save the results to a tab-delimited file by clicking the "Save..." button. The file will contain two columns of data for the file name and recognition result respectively. The saved data can then be inserted into the main data file using the command language and macros of your stats software, or using good old fashioned Filter, Sort, Copy, and Paste with a spreadsheet program like Excel.


Adjusting the Response Window

How to Adjust the Response Window

The temporal characteristics of the response window may be adjusted from block to block depending on a given subject's performance. The way the script specifies the response window method also determines the adjustment procedure.

The default window adjustment procedure is:

The response window is moved back 33 ms for subsequent blocks if

  1. the percent of correct responses for the block <= 55%.

  2. the percent of correct responses for the block <= 65% and mean latency is over 100 ms greater than the current window center.

The response window is moved forward 33 ms for subsequent blocks if

  1. the percent of correct responses for the block >= 80% and mean latency is no more than 100 ms greater than the current window center.

Using the <response> element, it is possible to customize various aspects of the window adjustment procedure, including conditions for incrementing the window center (moving it back), conditions for decrementing the window center (moving it forward), the increment and decrement amounts, the minimum and maximum window center values, and whether to base the adjustment algorithm on mean or median latency.

Response Window for Blocks

The response window procedure can be specified at the block level, as in the following:

<block myblock>
/ responsemode = window(100, 100, windowstim)
</block>

In this example, adjustment of the window center for myblock is independent of the subject's performance on different blocks defined in the script. Each adjustment to the response window of myblock affects only subsequent runs of myblock and is unaffected by performance on blocks with other names.

Response Window for Expt

The response window procedure can be specified at the expt level, as in the following:

<expt>
/ responsemode = window(100, 100, windowstim)
</expt>

In this case, the scope of the window center is the experiment. All blocks within the experiment will share the experiment's window center, with the exception of blocks that have the response window explicitly defined for themselves (see above). Each block that uses the shared experiment window center may adjust that center based on the subject's performance, and subsequent blocks in the experiment will use the adjusted window center.

Response Window for the Response Element

The response window procedure can also be specified within a response element, as in the following:

<response myresponse>
/ mode = window
/ rwhitduration = 200
/ rwhitstimulus = hitstim
/ rwcenter = 400
/ rwwidth = 300
/ rwstimulus = windstim
</response>

In this case, the myresponse element has its own response window center, and all block or expt elements that specify "/response = myresponse" will share that window center. This window center may be adjusted based on performance of any block that uses myresponse, and the adjusted window center will be used by subsequent blocks that use myresponse.


How to Control Response Timing

By default, Inquisit measures response latency as the interval beginning at the onset of the last stimlus frame of the trial and ending when the subject issues a valid response. Responses made before the onset of the last stimulus frame are ignored.

The beginning of the response interval can be customized using the beginresponsetime or beginresponseframe attributes. Beginresponsetime specifies how many milliseconds after the onset of the first frame the response interval should begin. Responseframe specifies how many frames after the first frame the response interval should begin.

For example, in the following trial, the response interval begins when the first stimulus, "prime", is presented.

<trial mytrial>
/ stimulusframes=[1=prime; 10=target]
/ beginresponseframe=1
</trial>


How to Control Trial Duration and Inter-Trial Intervals

Inquisit provides a number of commands for controlling the timing of various segments of a trial. A trial can be thought of as a sequence of four segments, illustrated in the following diagram:

Attributes

pretrialpause | Pauses for the specified duration at the begining of a trial, prior to stimulus presentation. In addition to providing a general means of controlling inter-trial intervals, the PretrialPause is useful for experiments that present large numbers of memory intensive stimuli on a given trial. Depending on the size of the stimuli and the speed of the hardware, stimulus preparation may add notable lengths of time to the beginning of the trial. Furthermore, stimulus preparation time may vary from trial to trial, in which case varying durations may be added to the beginning of the trials. However, if a PretrialPause interval is specified, Inquisit uses this time to prepare the stimulus presentation sequence. By specifying a PretrialPause duration long enough for stimulus preparation to complete, the experimenter can impose a constant and predictable duration at the beginning of each trial.
numframes | Specifies the number of stimulus presentations frames. A frame corresponds to a single vertical retrace interval of the monitor.
response | By setting this attribute to a timeout procedure (e.g., /response = timeout(1000)), it specifies the maximum duration for Inquisit to wait for the subject to respond. If no response occurs during within this duration, Inquisit finishes up the trial, waits for the postrialpause to complete, and moves onto the next.
timeout | Specifies the maximum duration of a trial, from the very beginning of the trial to the end, not including the posttrialpause.
posttrialpause | Pauses for the specified duration at the end of each trial after the subject has responded. In addition to providing a general means of controlling inter-trial intervals, the PosttrialPause is useful for experiments that present large numbers of memory intensive stimuli on a given trial. Depending on the size of the stimuli and the speed of the hardware, the process of cleaning up a stimulus presentation sequence (i.e., removing stimuli from memory) may add notable lengths of time to the end of the trial. Furthermore, stimulus cleanup time may vary from trial to trial, in which case varying durations may be added to the ends of the trials. However, if a PosttrialPause interval is specified, Inquisit uses this time to cleanup the stimulus presentation sequence. By specifying a PosttrialPause duration long enough for stimulus cleanup to complete, the experimenter can impose a constant and predictable duration at the end of each trial.
trialduration | Specifies the absolute duration of a trial, from beginning to end, including the posttrialpause. If the subject responds quickly, the posttrialpause interval is lengthened to fill out the remaining time in the duration. If the subject does not respond before the duration, the trial is terminated and the next trial begins.


How to Setup and Use Speech Recognition

How to Setup and Use Setup Speech Recognition

The speech recognition functionality also requires that you have a sound card and a microphone. Almost any sound card will work for speech recognition and text-to-speech. The quality of the microphone is a large determinant of speech recognition accuracy. Use a close-talk or headset microphone that is held close to the mouth or a medium-distance microphone that rests on the computer 30 to 60 centimeters away from the speaker. A headset microphone is needed for noisy environments. Speech recognition works best with close-talk microphones.

Windows XP

Inquisit leverages the Microsoft Speech Recognition Engine to allow measurement of both latency and accuracy of spoken responses. To use Inquisit's speech recognition capabilities, you must download and install version 5.1 of the Microsoft Speech Engine.

Windows Vista, 7, and 8

The speech engine comes preinstalled on these versions of Windows.

All Versions of Windows

For optimal performance, run the Microphone Wizard to adjust microphone input to appropriate levels and the Speech Recognition Wizard to tune the engine to your voice and dialect. You can find both Wizards under the Speech Recognition menu within Inquisit's Tools menu.

Mac OSX

Inquisit leverages the native speech recognition engine that ships with Mac OSX. There are no additional installations steps required.


How to Present TTL Signals Through the Parallel Port (Windows and Mac)

Inquisit can trigger external devices such as EEG's and pidgeon feeders by sending these devices TTL (Transistor-Transistor Logic) signals through the computer's LPT (parallel) port. Inquisit allows precise control over the the duration and state of the signals, as well as syncronization of signals with visual and audio stimuli presented on a trial.

A TTL signal is a simple 8 bit value that is physically represented as the sequence of high and low voltage states in pins 2 through 9 of the parallel port at a given point in time.

In Inquisit's scripting language, parallel port signals are defined and presented much the same way as visual and audio stimuli. as the signal is represented as an 8 character sequence of 0's and 1's, with 0 corresponding to low and 1 corresponding to high. Port signals are defined within Inquisit using the port element, which can contain 1 or more items that define a specific 8-bit sequence. For example, the following port stimulus consists of a single 8 bit sequence "10101010":

<port mysignal>
/ port = lpt1
/ subport = data
/ items = ("10101010")
</port>

The port attribute specifies which of the two parallel ports to use, LPT1 or LPT2.

The subport attribute specifies whether to use the Data or Control register of the parallel port.

The items attribute specifies a sequene of 8 bits to send to the port.

This port signal can then be presented along with other trial stimuli:

<trial mytrial>
...
/ stimulusframes = [1 = mypicture,  mysignal]

<br/>  ...
</trial>

The standard parallel port consists of three address registers commonly referred to as the Data, Status and Control registers. The Data and Control registers are capable of sending output signals. Inquisit supports writing to either the Data and Control registers by defining the subport attribute of the port element. The Status register, on the other hand, supports input signals. Inquisit supports reading from Status register (see inputdevice for details).

TTL signals are specified as a sequence of 8 bits (i.e., a byte of information). The following charts show the mappings between each binary digit specified in the item (e.g., "01001001"), the bit, and their respective DB25 pins for signals send to the Data and Control registers, respectively:

Data Register
Item | Bit | DB25 Pin
1 | 7 | 9
2 | 6 | 8
3 | 5 | 7
4 | 4 | 6
5 | 3 | 5
6 | 2 | 4
7 | 1 | 3
8 | 0 | 2

Control Register
1 | 7 | not used
2 | 6 | not used
3 | 5 | not used
4 | 4 | not used
5 | 3 | 17
6 | 2 | 16 (logic reversed)
7 | 1 | 14
8 | 0 | 1

Inquisit's parallel port triggering is a generic mechanism for sending any 8-bit TTL signal to any external device capable of receiving. The duration and content of the signals sent by an experiment depends upon the specific device that is listening for those signals. Consult the documentation for your device to understand what kind of signals it expects.

Inquisit includes a parallel port monitoring tool that allows ad hoc sending of TTL signals to the Data and Control registers of either of two parallel ports (LPT1 or LPT2).

Inquisit can also read signals from the parallel port sent from other devices using the pretrialsignal and posttrialsignal commands.

Parallel Port Support for Mac

Although parallel ports have long been sole province of Windows-based PCs, Inquisit extends support to the Mac OS X operating system. A parallel port can be connected to to your Mac Pro, Macbook Pro, or iMac, using Mac's Thunderbolt connector protocal. Specifically, a ExpressCard PCIe parallel port card can be connected to a Thunderbolt to PCIe adapter (e.g. Sonnet Echo Pro ExpressCard PCIe 2.0 Thundebolt Adapter), which can then be plugged into a Mac's Thunderbolt port. Additionally, a standard PCI or PCIe parallel port card can be plugged in directly to the PCI or PCIe slot on a Mac Pro's motherboard.

Importantly, Inquisit is compatible with single function parallel port cards only. Multi-function cards such as those with multiple parallel ports or a mix of parallel and serial ports are not supported.


How to Use the Parallel Port Monitor Tool (Windows and Mac)

Inquisit can communicate with external hardware such as fMRI, EEG, and Eye Tracker measurement systems via TTL signals sent via parallel port. Inquisit supports parallel port communication on both Mac and Windows computers. Inquisit's Parallel Port Monitor provides a handy tool for testing whether parallel port signal values are properly sent and received.

The Parallel Port Monitor tool can be launched by selecting the "Parallel Port Monitor..." command from Inquisit's "Tool" menu.

The Parallel Port Monitor tool allows you to send TTL signals through the parallel port of your choice, as well as monitor incoming TTL signals send from external devices. The parallel port can be useful for testing what kinds of TTL signals are sent or recognized by external devices such as EEGs amplifiers.

Inquisit recognizes TTL input to the Status and Data registers. When the "Receive" button is pressed, the Parallel Port Monitor tool displays both the byte value of the current input TTL signal as well as the high/low status of each individual pin. A checked box indicates high; unchecked indicates low.

Inquisit can send TTL input to the Data or Control registers. To send a signal, check the box for pin that should be high, then press the "Send" button. The corresponding pins will be set high or low and will remain in that state until another signal is sent.

How to Log Parallel Port Signals

The Parallel Port monitor also supports logging of parallel port input signals over time. To achieve maximum timing resolution, the logging tool boosts it's thread and process priorities and polls the parallel port state, logging the time of any changes. Results are saved in tab-delimited format that can be loaded into Inquisit and other data analysis tools such as Excel, SPSS, etc.

To log parallel port port input, simply click the Log... button on the Parallel Port Monitor. To start recording immediately, press the Record button. You can define a parallel port pin/bit as a trigger so that recording will start when the value of the selected bit transitions to high (bit value 1). The logging tool also enables you to specify the path of the log data file and the duration of time for signals to be logged.

Parallel Port Support for Mac

Although parallel ports have long been sole province of Windows-based PCs, Inquisit extends support to the Mac OS X operating system. A parallel port can be connected to to your Mac Pro, Macbook Pro, or iMac, using Mac's Thunderbolt connector protocal. Specifically, a ExpressCard PCIe parallel port card can be connected to a Thunderbolt to PCIe adapter (e.g. Sonnet Echo Pro ExpressCard PCIe 2.0 Thundebolt Adapter), which can then be plugged into a Mac's Thunderbolt port. Additionally, a standard PCI or PCIe parallel port card can be plugged in directly to the PCI or PCIe slot on a Mac Pro's motherboard.

Importantly, Inquisit is compatible with single function parallel port cards only. Multi-function cards such as those with multiple parallel ports or a mix of parallel and serial ports are not supported.


Using Cedrus RB Series and Lumina Response Boxes with Inquisit

Inquisit has built in support for interoperating with Cedrus RB-Series and Lumina response pads and other devices that use Cedrus' XID communication protocol. Cedrus response pads can be used with Inquisit on both Windows and Mac platforms.

RB-x30 Response Boxes (RB-430, RB-530, RB-630, and RB-830), Lumina response pads

The RB-x30 devices are the third and, as of the time this article was written, latest generation of response boxes from Cedrus. These and the Lumina response pads use a communication protocol called XID that defines a set of commands for sending and retrieving data to and from the device. Inquisit uses this protocol to automatically (i.e., no manual configuration) connect to the device, and to query the device for responses and response latencies as recorded by the device's built-in timer.

The first step in using the response device is to plug it into a USB port on your computer and install the device driver (which you can download from Cedrus' web site).

Once the device is plugged in, you can communicate with it in Inquisit by making a few simple modifications to your task script. For example, if you are modifying a script that is configured to use the keyboard for measuring responses (either inputdevice is set to keyboard or it's unspecified, in which case Inquisit defaults to the keyboard), you simply need to set inputdevice to XID, either as the default for the entire script:

<defaults>
/ inputdevice = XID
</defaults>

Or specifically for a given trial:

<trial target>
/ inputdevice = XID
</trial>

You will also need to configure your script to handle the specific numeric values returned by the buttons on the device. To discover the button values, download and run the response pad sample from our Cedrus page. This is a great sample for scripting against an XID response device, and it will display the numeric values of any button you press. Once you know the values, you can update your script to treat these values as valid or correct responses:

<trial target>
/ inputdevice = XID
/ validresponse = (2, 6)
/ correctresponse = (6)
</trial>

If you'd like to access advanced properties of the response pad such as the response time as measured by the onboard timer or the id, port, or action of the last-pressed button, you can define an xid element as follows:

<xid rb>
/ product = responsepad
</xid>

<trial target>
/ inputdevice = XID
/ isvalidresponse = [xid.rb.lasteventbutton == 4 || xid.rb.lasteventbutton == 5;]
/ correctresponse = [xid.rb.lasteventbutton == 4 && xid.rb.lastlatency &lt; 1000;]
</trial>

Troubleshooting

If Inquisit suddenly stops responding to button presses, try unplugging your device and then plugging it back in. We've found ourselves having to do this on occassion.

If you have been unable to get Inquisit to recognize button presses at all, verify the dipswitches on your device are configured to XID mode. The dipswitches on the back of the response box control the response mode and baudrate that the device uses to signal the serial port. When the response box is shipped, all four switches on the device are down by default, which sets the device to XID mode at a baud rate of 115,200. See below for an illustration. Although Inquisit can use any baud rates supported by the device, we'll just use with the default setting of 115,200 for the sake of simplicity. If the dipswitches are in different positions, unplug the response box, return them all to the down position, then plug it back in. Be warned, you must disconnect your response box from the computer and then reconnect it for dipswitch changes to take effect.

The back of the RB-x20

Inquisit RB-x20 Response Boxes (RB-420, RB-520, RB-620, and RB-820)

The RB-x20 devices are the second generation of response boxes from Cedrus. These response boxes support only the "RB Series" communication mode.

Setting the Dipswitches

The dipswitches on the back of the response box control, among other things, the baudrate that the device uses to signal the serial port. When the box is shipped, all four switches on the device are down by default, which corresponds to a baud rate of 19200 (see the image below). Although Inquisit supports any baud rate, we'll just use the default setting of 19200 to keep things simple. If the switches are not all in the down position, unplug your device from the computer, flip them all down, and then plug it back in.

The back of the RB-x20

Configuring the Serial Port

Once all four dipswitches have been set to the down position, the serial port must be configured with the compatible settings. To configure the port, use the Windows Device Manager applet (on Windows XP, open the Control Panel, then the System applet, click on the Hardware tab, and click the Device Manager button). Expand the Ports node on the tree, right click on the COM port that your response box is plugged into, and select the Properties command. This will open the window pictured below, which allows you to configure the port. For the RB-x20 devices with the dipswitches in the down position, the port should set to the following:

If you haven't already, plug your device into the serial port of you computer. If your computer has multiple serial ports (COM1, COM2, etc.), make sure that you connect the device to the same port that you configured in the previous step.


Using Cedrus StimTracker with Inquisit

Inquisit has built in support for interoperating with Cedrus StimTracker devices. The StimTracker provides an alternative to the parallel or serial port for Inquisit to communicate with external neurophysiological measurement systems and send markers of significant events during stimulus presentation. Inquisit can interoperate with a StimTracker on both Windows and Mac platforms.

The first step in using the StimTracker is to plug it into a USB port on your computer and install the device driver (which you can download from Cedrus' web site).

Once the device is plugged in, you can interface with it in Inquisit as if it were a type of stimulus. In other words, you can send signals to the device using syntax similar to that which displays pictures or text or plays a sound. By presenting the StimTracker signals at the same time as other stimuli, the StimTracker can relay the signals to an ERP of fMRI system in order to mark stimulus onsets.

To signal a StimTracker, you will need to define xid elements. The following xid element has a single item with a value of 0 (all TTL channels set to low):

<xid stblank>
/ product = stimtracker
/ items = (0)
</xid>

The following two xid elements are functionally identical, each containing 3 signals with values 1, 2, and 4. The two elements illustrate the two different ways in which signal values can be defined - as integers or as binary strings.

On each trial, the select attribute for the xid elements determines which signal is sent on a given trial. In both cases, selection is linked to the selected item in the text element named "letters". The letters text element selects randomly without replacement from items "A", "B", and "C". The xid elements select the corresponding values. Thus, when "A" is selected, xid value 1 is selected. When "B" is selected, xid value 2 is selected. When "C" is selected, xid value 4 is selected.

<xid stsignalint>
/ product = stimtracker
/ items = (1, 2, 4)
/ select = current(letters)
</xid>

<xid stsignalbin>
/ product = stimtracker
/ items = ("00000001", "00000010", "00000100")
/ select = current(letters)
</xid>

<text letters>
/ items = ("A", "B", "C")
/ select = noreplace
</text>

The following xid element defines a Lumina fMRI response pad that is also plugged into the presentation computer.

<xid rb>
/ product = lumina
</xid>

The following trial demonstrates how to present the signals and text as well as record the response from the Lumina reponse pad. The trial presents a signal that is synchronized to the onset of the text stimulus. The signal is reset to 0 after 3 vertical retrace intervals (50 milliseconds on a 60hz monitor). Note that pretrialsignal is defined so that the trial waits for a signal value of 1 from the parallel port before running. This is handy for synchronizing trials on the presentation machine with fMRI recording blocks.

<trial target>
/ pretrialsignal = (LPT1, 1)
/ stimulusframes = [1 = letters,stsignalint; 4=stblank]
/ inputdevice = xid(rb)
/ validresponse = (4)
</trial>


How to Record Responses from a Serial Response Box

Record Responses from a Serial Response Box

Inquisit supports obtaining and measuring responses from serial port devices such as serial response boxes and voice key microphones (Inquisit also supports voice key and speech recognition using any PC microphone). Inquisit has generic serial port cababilities that can be used to interact with many devices. In addition, Inquisit also has special capabilities for interacting with Cedrus' XID response boxes, which are described in detail below.

Configuring the serial port

Most devices require the serial port to be configured with specific settings in order to function properly. Settings include the port's baud rate, the number of bits in each chunk of data, parity, and flow control. Consult the manual for your device for the appropriate COM port settings.

To configure the port, use the Windows Device Manager applet (on Windows XP, open the Control Panel, then the System applet, click on the Hardware tab, and click the Device Manager button). Expand the Ports node on the tree, right click on the COM port you wish to configure, and select the Properties command. This will open the following Window, which allows you to configure the port. If you are using an RB x30 series device, the settings should be as follows:

serial port config

Note that the RB x30 series of response pads have a set of dip switches on the back that allow you to configure the device to use a 9600 or 19200 baud rate. Be sure to set the "bits per second" option in the above window to whichever of these two values the dip switches are configured to use.

Inquisit commands for serial port input

The Inquisit commands for using a serial port device are very similar to those used for other response devices such as a keyboard, mouse, or joystick. The inputdevice command should be set to "com1", "com2", "com3", ... depending upon which port number the device is plugged into on your PC. The inputdevice can both be set globally for all trials in an experiment by using the <defaults> element:

<defaults>
/ inputdevice = com1
</defaults>
The inputdevice can also be set on a trial by trial basis as follows (trial settings override the default settings):
<trial mytrial>
/ inputdevice = com2
/ validresponse = (128, 8)
/ correctresponse = (8)
</trial>

Next, define the valid and correct responses for that trial. Inquisit treats each byte of data sent by the device as a separate response whose values range from 0 to 255. Correct and valid responses must therefore be an integer within this range. The exact value sent by a particular device, or by a given button on a device, is determined by the device itself. To determine the value corresponding to a particular response on a serial port device, consult the documentation for that device, or run a series of trials with "responsemode=anyresponse". Under this mode, Inquisit will treat any response from the device as valid and will record the value for each response in the data file. You can then consult the data file to determine the value for each response.

Using Cedrus XID-compatible response boxes with Inquisit

Cedrus' new line of RB and Lumina response boxes include a built in timer that can be used to measure response latencies. The response pad measures the participant's reaction using it's own hardware and then reports a time stamped response to the computer. This capability is useful when running computationally intensive trials such as video presentation that could affect the computer's ability to provide accurate timing.

Taking advantage of an XID response box's on board timer is easy. There is no port configuration required. Just set the inputdevice command to "xid1", "xid2", "xid2", ... depending on which serial port number the device is plugged into. That's all there is to it. Inquisit will now record response latencies using the device's timer rather than that of the computer.

Using Current Design, Inc. fORP response devices with Inquisit

Inquisit is also compatible with fORP response devices by Current Design, Inc. These devices plug in through a USB port and can be configured to register as a keyboard or joystick device. Inquisit can thus interact with them as if they were a regular keyboard or joystick (i.e., by setting inputdevice equal to "keyboard" or "joystick").


How to Set Up an Online Experiment with Inquisit Web

This tutorial demonstrates how to set up an online experiment in your Millisecond account with Inquisit Web. The steps in this tutorial require a license for Inquisit Web.

1) Log into your Millisecond Account

Once signed into your account, you will be directed to the Dashboard page.

2) Got to the Online Experiments page

Select "Online Experiments" from the menu on the left

3) Start your Inquisit Web license

If your license hasn't already been started, click the "Start License" link.

4) Register your Inquisit Web experiment

Click the Register New Experiment button.

5) Create the experiment

Enter the name for your experiment and the version of Inquisit to use.

6) Import test from the Millisecond Library

Select the "Import from Test Library" tab. Select the test to import from the dropdown, and then click the "Import" button. You will see the files added to your experiment.
If your experiment uses more than one test, repeat these steps to import the remaining tests.

7) Upload a consent form.

If you wish to display a consent form, upload the form here. It must be in HTML format.

8) Select the script to start the experiment.

If your experiment includes more than one script, select which script to run.

9) Configure the Launch page.

The launch page is the where you send participants to run your experiment. You can customize the launch page by adding a title and description.

10) Specify the consent form.

Select the consent form you uploaded previously.

11) Configure how participant identifiers and groups are assigned.

By default, Inquisit assigns random numbers to each participant. Alternatively, participants can enter their subject ids (UserEntered), or they can be pre-assigned an id through a custom unique link (QueryParameter).
If your experiment has between-group variables (e.g., counterbalancing, treatment vs control), specify the number of groups and whether they are assigned randomly, sequentially, or through the links sent out to each participant.

12) Configure participant logging.

You can enable participant logging, and specify whether ip addresses are logged. We recommed enabling logs to help track participants' progress, and disabling ip addresses for privacy.

13) Specify your finish page.

You can redirect participants to another web page after they have finished the experiment. The default page thanks them for participating and gives instructions for uininstalling Inquisit.

14) Save and close your experiment.

The main experiments page now shows your new experiment in the list..

15) Launch your experiment.

Click the Launch Page link for your experiment, and follow instructions for installing the Inquisit Player and starting the experiment.


How to copy offline data from the Inquisit 6 Web Player

By default, when experiments are run with Inquisit Web, data from each device is automatically uploaded to your account on Millisecond, where you can login and download it at any time. This is a basic requirement for conducting remote research with participants over the Internet.

When Inquisit Web is used to collect sensitive data on researcher-controlled devices, however, it may be preferrable from a security standpoint to export data directly to services controlled by the research institution rather than have them leave the institution's systems. This article demonstrates how to prevent data from being uploaded to Millisecond and how to retrieve data directly from the device. The iOS version of the Inquisit Web app is shown here, but the steps are the same on Window, Mac, and Android.

Note that Inquisit Web uses the device's general 'sharing' functionality to export data from it, the same mechanism that is used to share photos, articles, and links. This requires that you have a suitable file sharing application installed on the device to receive the files. For example, you can share the files with your email app, in which case they are sent to an address of your choosing as attachments. You can also share to HIPAA compliant storage apps such as Dropbox, OneDrive, or G Suite.

1. Open the Inquisit app on the (iOS) device and go to the Data tab.

2. Toggle 'Automatic Data Upload' off.

(Important: By default, Automatic Data Upload is on. If you do not turn it off, the data will be automatically uploaded from this device to Millisecond after each session completes or when the app is idle.

Automatic Data Upload

3. Run your experiment on that device.

4. When the experiment is complete, open Inquisit Web on the device and go to the Data tab.

You will see the data files generated from the experiment listed here.

Data files

5. Share Data to another app.

Press the Share button on the Data tab. You can then select an app to receive the data

6. Delete the file from the Inquisit app.

Once the files have been successfully shared and saved, you can delete them from the device to ensure they are not mistakenly uploaded to Millisecond at a later time.


How to Combine Multiple Data Files into a Single File

Depending on the configuration of the data and summarydata elements in your script, and whether you are saving the data locally or to a remote server, Inquisit may record data from all participants to a single file, or it may record data from each participant to a separate file.

If the data is saved to separate files, you can easily combine them into a single file that can be loaded into SPSS, Excel, or any other stats program for analysis. To combine data from multiple data files, perform the following steps:

  1. Start the Inquisit application on your PC or Mac
  2. Select the Merge Data Files command from the File menu
  3. Browse to the folder containing your data files
  4. Hold down the Shift key and select all of the files to be merged
  5. Click the Open button - you should see the data from all of the selected files combined in the data editor
  6. Select the Save command from the File menu to save the merged data

The data are saved in a non-proprietary tab-delimited text format that can be loaded into your statistics program of choice. Consult the documentation of your data analysis software for instructions on importing tab-delimited text.


How to do Conditional Branching

How to do Conditional Branching with Inquisit

Inquisit provides several attributes that enable an experimental procedure to dynamically change or adapt based on the subject's performance.

Branch Attribute

The most powerful attribute for conditional logic is the branch attribute. The branch attribute can be defined at the level of the trial (including specialized trials such as likert, openended, or block. The attribute allows you to specify which trials or blocks to run next based on performance. Branching is useful in a variety of circumstances:

  • Repeating a task until the subject makes ten correct responses in a row.
  • Running one of two tasks depending upon the median latency on a previous task.
  • Running a minimum of 10 and a maximum of 50 trials in a block and moving onto the next block if the average response latency rises above 1000 milliseconds.

The syntax of the attribute is as follows:

/ branch = [if (<boolean expression>)nextevent]

where <boolean expression> is an expression that evaluates to true or false, and nextevent is the trial or block that should be run if the boolean expression is true. To specify that no branching should occur if a particular condition is true, "0" can be specified as the next event.

Multiple branches may be defined for a given element. If the conditions of multiple branches are true, then the first branch in the list wins.

Skip Attribute

Another useful attribute for conditional logic is the skip attribute. Like the branch attribute, skip can be defined at the level of . The attribute allows you to specify conditions under which which the trial or block should be skipped. The syntax of the attribute is as follows:

/ skip = [<boolean expression>]

where <boolean expression> is an expression that evaluates to true or false. Multiple skip conditions may be defined for a given element. If any of the skip conditions of are true, this event is skipped. Otherwise, it runs as normal.

Responsetrial Attribute

The responsetrial attribute provides a convenient way to chain together trials based on which response the subject made. For example:

  • Following up incorrect responses with a study trial.
  • Creating a questionnaire that includes follow up questions only if a particular response is given.

Note that with Inquisit 6, the branch attribute includes all of the functionality of the responsetrial, and also includes functionality not supported by responsetrial.

Stop Attribute

The stop attribute aborts the remainder of the trials in a block if the subject's peformance meets the specified condition. This is useful in a variety of situations:

  • Aborting a task if the percentage of correct responses drops below a threshold.
  • Aborting a task if an incorrect response is given.
  • Aborting a task after a maximum number of trials has been run.


Running Sets of Tests with the Inquisit Batch Element

A single experiment does not necessarily fit into a single Inquisit script. In many cases it may be necessary to collect data using a combination of different Inquisit scripts. Ideally,the different scripts and programs would run as a single, seamless sequence of tasks requiring no manual intervention from the researcher. This article discusses approaches to achieve this.

Using Inquisit Batch Scripts

The Inquisit language provides a simple facility for stringing together multiple scripts into a single data collection session, the batch element. The batch element allows you to specify a list of script files to run in order.

<batch>
/ file="bart.iqx"
/ file="iowagamblingtask.iqx"
/ file="cardsort.iqx"
</batch>

The batch element must be defined in its own seperate script, called a "batch script". Batch scripts can be run the same way other scripts are run.

Between-Subject Manipulations Using Batch Elements

Batch scripts enable more than just running a battery of tests. It's also possible to define different sets of scripts to be run for different groups of participants. To accomplish this, the batch script would include a separte batch element for each condition or group within the study. These batch elements can then be filtered by the group numbers assigned to participants so that a particular batch element is selected and run for each group number. Consider the following example:

<batch>
/ groups = (1 of 2)
/ file="treatment.iqx"
/ file="digitspan.iqx"
/ file="cardsort.iqx"
</batch>

<batch>
/ groups = (2 of 2)
/ file="control.iqx"
/ file="digitspan.iqx"
/ file="cardsort.iqx"
</batch>

The batch script contains two batch elements corresponding to a treatment and control condition. The /groups attribute determines the group to which a given batch element applies. The first batch element is run for participants with group number 1, and the second element for participants with group number 2. Participants can be pre-assigned to a group number, or they can be assigned randomly on the fly.

Repeated Measure Designs Using Batch Elements

In longitudinal studies it's common or participants to run different sets of tests at different phases of the study. For this kind of study design, batch elements can be defined for different sessions, similarly to how they can be defined for different groups. Instead of filtering based on group number, however, the batch elements are filtered based on the session number. The following example shows a longitudinal study with 3 data collection sessions:

<batch>
/ sessions = (1 of 3)
/ file="alcoholdotprobe.iqx"
/ file="alcoholiat.iqx"
/ file="alcoholstroop.iqx"
</batch>

<batch>
/ sessions = (2 of 3)
/ file="alcoholiat.iqx"
</batch>

<batch>
/ sessions = (3 of 3)
/ file="alcoholdotprobe.iqx"
/ file="alcoholiat.iqx"
/ file="alcoholstroop.iqx"
/ file="anglingrisktask.iqx"
</batch>

On the first session, the participant completes the Alcohol Dot Probe, IAT, and Stroop. On the second session, only the Alcohol IAT is run. On the third session, all three of the tests are run in addition to the Angling Risk Task. Inquisit Web tracks the session number for each participant automatically so that the first time a participant runs the experiment, their session number is 1, the second time is 2, etc. Session numbers can be manually entered using Inquisit Lab.


How to Combine Multiple Scripts

Often a study will involve administering multiple measures to each participant. For example, a study might administer an IAT, a direct measure of attitude, and a demographic questionnaire, or it may require that 2 different IAT tasks be administered. Inquisit places no constraints on the number of measures that can included in a single script. However, for a number of reasons, it is often more convenient for each measure to be defined in its own script. For example, putting all of the measures in a single file may result in a large and unwieldy script. Also, in many cases each of the measures already exists as a separate script anyway.

Inquisit provides two mechanisms for combining different scripts into a single data collection session, the <batch> element and the <include> element.

The <batch> Element

The batch element provides a simple way of running a set of scripts in sequence. To use the batch element, create new empty script file that will contain only the batch element definition and no other commands:

<batch>
/ file = "IAT1.iqx"
/ file = "IAT2.iqx"
/ file = "IAT3.iqx"
</batch>

As you can see from this example, the batch element is really just a list of the script files you wish to run. In the above example, three IAT scripts are listed, IAT1.iqx, IAT2.iqx, and IAT3.iqx. As you might have guessed, the batch runs each of these scripts in the order they are listed. To run the batch, simpy open the script file that contains the batch element definition in Inquisit, and select the Run command from the Experiment menu. You will be prompted for a subject id, after which each script is run in sequence. Data from each script are saved in separate files, and the same subject id is used for each file. To use the batch element with Inquisit Web, simply register the script containing the batch element, and then upload the other scripts to the web server. With the Web, the data are also saved in different files using the same subject id.

The batch file is very easy to use, but it does have some limitations. Most notably, there is currently no built in way to randomize the order in which the scripts are run (this is true as of version 3.0.2.0, but the feature is planned for a future release). If you are using the lab version of Inquisit, you can create multiple batch files, each of which contains a different ordering, and then randomly assign participants to one of those batch files. With the Web, this technique would require you to register multiple batch scripts, each of which would require a separate license. For web experiments requiring randomized ordering, the <include> element described below is likely a better option.

The <include> Element

The include element provides a convenient way to "copy and paste" elements from one script into another script without requiring you to go through the hastle of actually copying and pasting. It therefore can serve as a useful tool for combining measures defined in separate scripts, although typically the scripts will have to be modified somewhat in order to combine properly.

As an example, let's say we wish to run two IAT measures, randomly varying the order. We could arbitrarily choose either IAT script and add the include element to it. However, in order to make it easier to reuse this solution with other scripts (containing IATs or other measures), we'll start with a new empty file and then add our include definition to it:

<include>
/ file = "IAT1.iqx"
/ file = "IAT2.iqx"
</include>

In the above example, we've included two different scripts, IAT1.iqx and IAT2.iqx. The order in which they are listed doesn't matter. Conceptually, we now have a single virtual script that contains all of the element definitions contained in IAT1.iqx and IAT2.iqx. If you try to run the script, however, you'll notice a whole bunch of errors. This is because both scripts use the same names for elements. They also both include definitions of global elements such as <data>, <defaults>, <values>, <variables>, and <expressions>, so Inquisit will report an error stating that these elements have been defined more than once.

The first step in resolving these errors is to put a single copy of the global elements in our include script, and remove these element definitions from both of the IAT scripts. The global elements to add to our include script and remove from our IAT scripts are as follows:

<defaults>
/ fontstyle = ("Arial", 3.5%)
/ screencolor = (0,0,0)
/ txbgcolor = (0,0,0)
/ txcolor = (255, 255, 255)
/ minimumversion = "3.0.0.0"
</defaults>

<data>
/ columns = [date, time, subject, blockcode, blocknum, trialcode, trialnum, response,
  correct, latency, stimulusnumber, stimulusitem, expressions.da, expressions.db,
  expressions.d ]
</data>

<monkey>
/ latencydistribution = normal(500, 100)
/ percentcorrect = 90
</monkey>

<values>
/ sum1a = 0
/ sum2a = 0
/ sum1b = 0
/ sum2b = 0
/ n1a = 0
/ n2a = 0
/ n1b = 0
/ n2b = 0
/ ss1a = 0
/ ss2a = 0
/ ss1b = 0
/ ss2b = 0
/ magnitude = "unknown"
</values>

<expressions>
/ m1a = values.sum1a
/ values.n1a
/ m2a = values.sum2a
/ values.n2a
/ m1b = values.sum1b
/ values.n1b
/ m2b = values.sum2b
/ values.n2b
/ sd1a = sqrt((values.ss1a - (values.n1a * (expressions.m1a * expressions.m1a))) / (values.n1a - 1))
/ sd2a = sqrt((values.ss2a - (values.n2a * (expressions.m2a * expressions.m2a))) / (values.n2a - 1))
/ sd1b = sqrt((values.ss1b - (values.n1b * (expressions.m1b * expressions.m1b))) / (values.n1b - 1))
/ sd2b = sqrt((values.ss2b - (values.n2b * (expressions.m2b * expressions.m2b))) / (values.n2b - 1))
/ sda = sqrt((((values.n1a - 1) * (expressions.sd1a * expressions.sd1a) + (values.n2a - 1) * (expressions.sd2a * expressions.sd2a)) + ((values.n1a + values.n2a) * ((expressions.m1a - expressions.m2a) * (expressions.m1a - expressions.m2a)) / 4) ) / (values.n1a + values.n2a - 1) )
/ sdb = sqrt((((values.n1b - 1) * (expressions.sd1b * expressions.sd1b) + (values.n2b - 1) * (expressions.sd2b * expressions.sd2b)) + ((values.n1b + values.n2b) * ((expressions.m1b - expressions.m2b) * (expressions.m1b - expressions.m2b)) / 4) ) / (values.n1b + values.n2b - 1) )
/ da = (m2a - m1a) / expressions.sda / db = (m2b - m1b) / expressions.sdb
/ d = (expressions.da + expressions.db) / 2
/ preferred = "unknown"
/ notpreferred = "unknown"
</expressions>

The next step is to rename all of the blocks, trials, stimuli, and stimulus items in both IAT scripts so that they are all unique. In our case, we'll simply add an "iat1" to beginning of all of the names in the IAT1.iqx script, and "iat2" to the beginning of all of the names in the IAT2.iqx script. Thus, the blocks named "targetcompatiblepractice" becomes "iat1targetcompatiblepractice" and "iat2targetcompatiblepractice". The text stimulus named "instructions" becomes "iat1instructions" and "iat2instructions". The trial named "iat1summary" and "iat2summary". And so forth. Note that you will need to update the parts of each script that refer to these elements as well. For example, iat1summary trial contains the command / stimulustimes = [0=summary], which must be changed to / stimulustimes = [0=iat1summary].

The element responsible for running our IATs is the <expt>element, so we'll next need to remove these element definitions from the IAT scripts and rewrite them in our include script so that they run the blocks of each of our IATs. After we delete these elements from the IAT scripts, we'll add the following element definition to the include scripts.

<expt>
/ subjects = (1 of 4)
/ blocks = [1=iat1targetcompatiblepractice; 2=iat1attributepractice; 3=iat1compatibletest1;
4=iat1compatibletestinstructions; 5=iat1compatibletest2; 6=iat1targetincompatiblepractice;
7=iat1incompatibletest1; 8=iat1incompatibletestinstructions; 9=iat1incompatibletest2;
10=iat1summary; 11=iat2targetcompatiblepractice; 12=iat2attributepractice; 13=iat2compatibletest1;
14=iat2compatibletestinstructions; 15=iat2compatibletest2; 16=iat2targetincompatiblepractice;
17=iat2incompatibletest1; 18=iat2incompatibletestinstructions; 19=iat2incompatibletest2;
20=iat2summary ]
</expt>

The above experiment runs IAT1 first and IAT2 second. In both cases, the compatible parings are applied before the incompatible parings.

The next expt element reverses the order of the IATs.

<expt>
/ subjects = (2 of 4)
/ blocks = [1=iat2targetcompatiblepractice; 2=iat2attributepractice; 3=iat2compatibletest1;
4=iat2compatibletestinstructions; 5=iat2compatibletest2; 6=iat2targetincompatiblepractice;
7=iat2incompatibletest1; 8=iat2incompatibletestinstructions; 9=iat2incompatibletest2;
10=iat2summary; 11=iat1targetcompatiblepractice; 12=iat1attributepractice; 13=iat1compatibletest1;
14=iat1compatibletestinstructions; 15=iat1compatibletest2; 16=iat1targetincompatiblepractice;
17=iat1incompatibletest1; 18=iat1incompatibletestinstructions; 19=iat1incompatibletest2;
20=iat1summary ]
</expt>

The next expt element runs IAT1 first and IAT2 second, but incompatible pairings are used first, and incompatible pairings second.

<expt>
/ subjects = (3 of 4)
/ blocks = [1=iat1targetincompatiblepractice; 2=iat1attributepractice; 3=iat1incompatibletest1;
4=iat1incompatibletestinstructions; 5=iat1inccompatibletest2; 6=iat1targetcompatiblepractice;
7=iat1compatibletest1; 8=iat1compatibletestinstructions; 9=iat1compatibletest2;
10=iat1summary; 11=iat2targetincompatiblepractice; 12=iat2attributepractice; 13=iat2incompatibletest1;
14=iat2incompatibletestinstructions; 15=iat2incompatibletest2; 16=iat2targetcompatiblepractice;
17=iat2compatibletest1; 18=iat2compatibletestinstructions; 19=iat2compatibletest2;
20=iat2summary ]
</expt>

Finally, the last expt element runs IAT2 first and IAT1 second, with incompatible pairings first, and incompatible pairings second.

<expt>
/ subjects = (4 of 4)
/ blocks = [1=iat2targetincompatiblepractice; 2=iat2attributepractice; 3=iat2incompatibletest1;
4=iat2incompatibletestinstructions; 5=iat2inccompatibletest2; 6=iat2targetcompatiblepractice;
7=iat2compatibletest1; 8=iat2compatibletestinstructions; 9=iat2compatibletest2;
10=iat2summary; 11=iat1targetincompatiblepractice; 12=iat1attributepractice; 13=iat1incompatibletest1;
14=iat1incompatibletestinstructions; 15=iat1incompatibletest2; 16=iat1targetcompatiblepractice;
17=iat1compatibletest1; 18=iat1compatibletestinstructions; 19=iat1compatibletest2;
20=iat1summary ]
</expt>

Note the /subjects command in each <expt> element determines which conditions a participant is assigned to based on the subject number. Subjects 1, 5, 9, 13, etc are assigned to the first expt element, 2, 6, 10, 14, etc. to the second, 3, 7, 11, 15, etc. to the third, and 4, 8, 12, 16, etc. are assigned to the fourth expt element.

To run the script with Inquisit Lab, simply open the script containing the include element and select the Run command from the Experiment menu. To run it with Inquisit Web, register the script with the include element, and upoad the other two scripts to the server.


How to Interoperate Inquisit Web with Online Survey Packages such as Qualtrics and Survey Monkey

Inquisit has full-featured capabilities for designing and administering questionnaires and surveys. In some cases, however, you may wish to insert an Inquisit cognitive task into an existing survey on another site such as Qualtrics, Sona, or Survey Monkey. Inquisit Web has features in place to smoothly transition participants back and forth between Inquisit and other web sites. This is accomplished by automatically forwarding participants between the survey and the Inquisit task. .

Most survey sites allow you to forward participants to another web site after they've completed a survey. You need only specify the address of your Inquisit launch page as the forwarding url, and your participants will be automatically forwarded to the Inquisit portion oft he study when the survey is complete.

Similarly, Inquisit allows you to specify a "Finish Page" where it will forward participants after they've completed the Inquisit part of the experiment. Here you would specify the address of the survey, and Inquisit will automatically send participants to that address once the Inquisit task is complete.

Sharing Participant IDs Between Web Sites

To map each participant's survey responses to their Inquisit data, you will need to share a common unique id for each participant between Inquisit and the survey. This id must be recorded in the data sets from both web sites so that survey responses can be correlated with Inquisit task outcomes for each participant. There are a couple of different strategies for sharing ids.

User-Entered Subject IDs

A simple way to share ids between Inquisit and another site is to require the participant to enter some identifier - for example, a preassigned number or an email address - at the beginning of both the survey and the Inquisit session. When registering your Inquisit online experiment on millisecond.com, you can specify that participants should enter the id in the experiment settings. Alternatively, you could add the question to the Inquisit script itself, and then include the response in data to be recorded.

Sending Subject IDs from 3rd Party Site to Inquisit

A less error prone way to share participant ids is to embed the id in the forwarding address between Inquisit and the other web site. When forwarding from the 3rd party survey to Inquisit, for example, they survey must dynamically add the id of each participant to the address of the Inquisit study as a "query parameter", which is a standard mechanism for sharing data between different web sites. Below, we show how to set this up in Qualtrics. For other platforms, consult their support resources for specific instructions.

Forwarding from Qualtrics to Inquisit

  1. Log into Qualtrics and selected your survey project
  2. Click the Survey Options button
  3. Within Survey Options, go to the Survey Termination section
  4. Select the option to Redirect to a full URL
  5. Enter the address of the launch page for your Inquisit test, e.g., https://mili2nd.co/aaa
  6. Add the query parameter ?subjectid=${e://Field/ResponseID} to the end of the address

If the address of your Inquisit test is "https://mili2nd.co/aaa", for example, the complete forwarding url would look as follows:

https://mili2nd.co/aaa?subjectid=${e://Field/ResponseID}

The subjectid part of the URL specifies the name of the query variable. This variable is set to the value returned by ${e://Field/ResponseID}, which is an example of Qualtrics "Piped Text" that you to insert variables into a survey. This particular variable inserts each participants unique response id. For example, when participant with response id "1234" completes the survey, Qualtrics will forward them to the following url:

https://mili2nd.co/aaa?subjectid=1234

Once participants are forwarded to the Inquisit launch page, Inquisit will extract the value of the subjectid parameter to get their id, and that id will be recorded in the data.

Forwarding from Sona to Inquisit

See Sona's help topic for sharing participant ids between Sona and Inquisit.

Configuring Inquisit to Receive IDs from a 3rd Party Web Site

To configure Inquisit to read the participant id from the query parameter:

  1. Login to the Online Experiments page in your account
  2. Click " edit" next to the experiment
  3. Select the "Subject IDs" tab on the right of the screen (shown in the figure below).
  4. Where it says "Choose how subject ids should be generated, select URLQuery Parameter"
  5. Specify the name of parameter (e.g., "subjectid").
  6. Click the Save button

That's it. Inquisit will now extract this subject number from the url and record it in the data files.

Returning the Subject ID from Inquisit Back to 3rd Party Site

If you would like to forward the participant back to the survey package at the end of the Inquisit session, you can specify the url to the survey as the Finish Page when running through the experiment registration wizard. Inquisit will then redirect the participant to that web page at the end of the session.

In the above example, Inquisit will forward participants to https://www.surveysrus.com/coolsurvey/part2.html at the end of the experiment. Do not specify the subject id in the Finish Page url - Inquisit will automatically append the id using the same query parameter that it found when the subject arrived at the Inquisit launch page. To continue with the above examples, if the Finish Page is set to https://www.surveysrus.com/coolsurvey/part2.html, the actual forwarding url for subject 134 would be:

        https://www.surveysrus.com/coolsurvey/part2.html?subjectid=134

Your survey package can then retrieve the value of this query parameter to identify which subject is returning to the survey. Now the survey package can pick up where it left off with this participant.

Sending the Subject ID from Inquisit to 3rd Party Sites

If participants start with the Inquisit session before going to the 3rd party survey site, the subject id can be explicitly included on the finish page url so that it can be used by the 3rd party site. Using the above example, the following finish page would include the unique subject id for each participant:

       https://www.surveysrus.com/coolsurvey/part2.html?subjectid=<%script.subjectid%>

Add the end of each session, Inquisit will substitute "<%script.subjectid%>" with the actual ids for each of the subjects.


The Inquisit SR Research Plugin

The Inquisit SR Research Plugin enables integration of Inquisit scripts with gaze point and pupil data from SR Research's EyeLink eye trackers. The plugin enables gaze-contingent tasks along with sending rich metadata to the eye tracker to indicate stimulus onsets, stimulus content, areas of interest, trial variables, participant responses, and custom event markers.

Registering the Plugin

The Inquisit SR Research Plugin includes a 30-day free trial that begins when Inquisit Lab is installed. After the trial period ends, a license is required to use the plugin. Once you purchase a license, you can register it by selecting the "SR Research Registration..." command from Inquisit's Help menu. The registration window will appear with instructions for completing the registration. If you wish to move the license to a new computer, you can login into https://myaccount.millisecond.com/transfer and submit a transfer request.

Programming the Plugin

To record and utilize gaze point data from an SR Research eye tracker, you must first declare the eyetracker element in your script and and set the plugin to "srresearch":

<eyetracker>
/ plugin = "srresearch"
</eyetracker>

When the script is run, Inquisit loads the eye tracker plugin and attempts to locate the SR Research eye tracker on the network. Once connected, the plugin runs the calibration procedure and then interacts with the eye tracker according to the commands in the Inquisit script. Recording of gaze point data for a given trial can be enabled using the datastreams or inputdevice commands on the trial element. For dynamic procedures that change based on gaze point data, you can programmatically access gaze point data from the properties of the eyetracker element.

Using gaze data as response input

The plugin enables you to define trials in which gaze is treated as a response similar to a mouse click. For example, in a parafoveal priming paradigm, participants could be instructed to focus on a fixation point stimulus. When the eye tracker reports a fixation on the stimulus, it is logged as a response, and the prime stimulus is presented. As shown in the example below, this is accomplished by setting the inputdevice attribute to "eyetracker" and defining the fixation stimulus as a "validresponse".

<trial fixation>
/ stimulustimes = [1=fixation]
/ inputdevice = eyetracker
/ validresponse = (fixation)
/ branch = [trial.presentstimuli;]
</trial>

Supplementing manual response tasks with gaze point data

Eye tracker data can also be used with task that require other modes of responding such as mouse or keyboard. For example, imagine you wish to collect gaze point data to uncover how gaze affects memory performance on the Corsi Block Tapping Test. As show in the example below, this can be accomplished using the datastreams attribute, which causes the eyetracker to record gaze point data for the duration of the trial.

<trial showseq>
/ stimulusframes = [1=board,1,2,3,4,5,6,7,8,9]
/ validresponse = (noresponse)
/ trialduration = parameters.tapinterval
/ posttrialpause = parameters.posttapinterval
/ branch = [if(values.tapcount < values.seqlength) trial.showseq else trial.recallseq]
/ recorddata = false
/ datastreams = eyetracker
/ screencapture = true
</trial>

Sending stimulus data to the eye tracker

Inquisit automatically sends meta data about all visually presented stimuli to the eye tracker without requiring any special programming. For all visual stimuli, Inquisit notifies the eye tracker of the stimulus onset time and defines their screen regions as areas of interest. For picture stimuli, Inquisit also sends the file name so the images can be loaded by Data Viewer into their corresponding screen positions, and gaze points can be plotted over them. If you wish to replay entire sequences of stimuli in Data Viewer, all stimuli shoudl be defined as pictures.

If the screencapture attribute is set to true on the current trial, the screen as it appears at the end of the stimulus presentation sequence is captured to an image file. The name of the file is sent to the eye tracker and "back dated" to the start of the trial. This enables gaze points to be plotted over the entire screen (including presented text and shapes) within Data Viewer. Note that since the screen capture is just a static snapshot of the end result of all stimuli presented by the trial, it does not include temporal information to support the playback of a trial within Data Viewer. If playback is required, screen capture should be disabled, and the Inquisit script should present all visual stimuli (text, shapes, etc.) as images using the picture element.

The Eye Tracker Element

  • Attributes and properties for the SR Research plugin

Sample Scripts

Sample scripts for the SR Research Plugin can be downloaded from the Millisecond Test Library.


The Inquisit Tobii Plugin

Programming the Plugin

To record and utilize gaze point data from a Tobii eye tracker, you must declare the eyetracker element in your script and set the plugin to "tobii":

<eyetracker>
/ plugin = "tobii"
</eyetracker>

Once the eyetracker is defined in the script, whenever the script is run Inquisit loads the plugin and attempts to locate the Tobii eye tracker on the network. Once connected, the plugin receives and records the stream of gaze point data from the eye tracker. For dynamic task paradigms that change based on gaze point data, you can programmatically access gaze point data from the properties of the eyetracker element.

The Eye Tracker Element

  • Attributes and properties for the Tobii plugin

Sample Scripts

Sample scripts for the Tobii Plugin can be downloaded from the Millisecond Test Library.

Eye Tracker Data Recorded by the Plugin

The Inquisit Tobii Plugin retrieves and records the following data from the Tobii eye tracker. For more details on a given data field, see the Tobii documentation.

date | The date at the start of the session.
time | The time at the start of the session.
groupid | Group id entered for this session.
subjectid | Subject id entered for this session.
timestamp | The value should be interpreted as a time interval in microseconds measured from an arbitrary point in time. The source of this timestamp is the internal clock in the eye tracker hardware.
marker | A value sent by Inquisit to indicate the occurrence of a significant event (e.g., onset of a visual stimulus)
leftpixelx | The horizontal pixel location in display coordinates of the gaze point of the left eye.
leftpixely | The vertical pixel location in display coordinates of the gaze point of the left eye.
rightpixelx | The horizontal pixel location in display coordinates of the gaze point of the right eye.
rightpixely | The vertical pixel location in display coordinates of the gaze point of the right eye.
focuspixelx | The horizontal pixel location in display coordinates of the gaze point of binocular focus.
focuspixely | The vertical pixel location in display coordinates of the gaze point of binocular focus.
leftgazex | X coordinate of the gaze point of the left eye in the 3D User Coordinate System.
leftgazey | Y coordinate of the gaze point of the left eye in the 3D User Coordinate System.
leftgazez | Z coordinate of the gaze point of the left eye in the 3D User Coordinate System.
rightgazex | X coordinate of the gaze point of the right eye in the 3D User Coordinate System.
rightgazey | Y coordinate of the gaze point of the right eye in the 3D User Coordinate System.
rightgazez | Z coordinate of the gaze point of the right eye in the 3D User Coordinate System.
lefteyex | X coordinate of the location of the left eye in the 3D User Coordinate System.
lefteyey | Y coordinate of the location of the left eye in the 3D User Coordinate System.
lefteyez | Z coordinate of the location of the left eye in the 3D User Coordinate System.
righteyex | X coordinate of the location of the right eye in the 3D User Coordinate System.
righteyey | Y coordinate of the location of the right eye in the 3D User Coordinate System.
righteyez | Z coordinate of the location of the right eye in the 3D User Coordinate System.
leftpupilwidth | Width of the left pupil in millimeters
leftpupilheight | Height of the left pupil in millimeters.
rightpupilwidth | Width of the right pupil in millimeters.
rightpupilheight | Height of the right pupil in millimeters.
leftvalidity | An estimate of how certain the eye tracker is that the data given for the left eye really originates from that eye, with 0 indicating the eye was definitely found, and 4 indicating the eye was not found.
rightvalidity | An estimate of how certain the eye tracker is that the data given for the right eye really originates from that eye, with 0 indicating the eye was definitely found, and 4 indicating the eye was not found.


How to Set Markers in the Tobii Eye Tracker Data Stream

Sending Port Markers to Eyetracker Software with Inquisit

(I) Sending static markers (static = markers do not change values)

1) Create <port> elements

In order to send markers to eyetracker software (e.g. Tobii) to indicate the on- and/ or offset of stimuli, port elements for the markers have to be declared:

<port stimOnsetMarker> /*this marker sends value "1" to signal onset of stimulus
/port = eyetracker
/items = (1)
</port>

<port stimOffsetMarker>/*this marker sends value "0" to signal offset of stimulus
/port = eyetracker
/items = (0)
</port>

2) Include markers into relevant <trial> elements

The port elements then have to be included into the relevant trials.

<trial collectData>
/stimulustimes = [0 = stim, stimOnsetMarker; 1000 = eraseStim, stimOffsetMarker]
...
</trial>

(II) Sending dynamic markers (dynamic = markers can change value during runtime)

You can also dynamically set the value of your port markers.

Example:

You record participants' eye movements while they are looking at 2 different kinds of drinks; a soda can vs. a beer can. You test several different kinds of soda can images and several different kinds of beer can images and you counterbalance the screen positions of soda cans and beer cans.

You wish your marker to include information about stimulus positions and specific images presented.

1) Create <port> elements

<port dynamMarker>
/port = eyetracker
/items = (0) /*this value will change during runtime
</port>

And add a value for the value that should be send as your marker:

<values>
/marker = 0
</values>

2) Create a numeric code that incorporates all the relevant info

For example (many different ways are possible - this is just one way), you could dynamically create markers of the following kind:" 015027"

0 = indicates start of left stimulus
1 = soda (Note: 2 would signal beer was the left stimulus)
5 = Next digits until 0 code the item number of left image
0 = indicates start of right stimulus
2 = beer
7 = Next digits until end code item number of right image

3) Create and include markers into relevant <trial> elements

<trial SodaBeer> /*trial to present soda can left and beer can right
/ontrialbegin = [
    values.marker = "";				/*reset marker value
    values.marker = concat(values.marker, "01");	/*add '01' for soda is left
    values.marker = concat(values.marker, picture.sodaLeft.currentitemnumber); /* add current itemnumber for left image
    values.marker = concat(values.marker, "02");	/*add '02' for beer is right
    values.marker = concat(values.marker, picture.beerRight.currentitemnumber);	/* add current itemnumber for right image
    port.dynamMarker.setitem(values.marker, 1);	/*set the item for the marker you want to send
]
/stimulustimes = [0 = sodaLeft, beerRight, dynamMarker] /*sends 015027 at stimulusonset
…
</trial>


Automated Registration of Inquisit Lab

How to Register Inquisit Lab in Managed Automated Deployments

Inquisit Lab enables provies a user interface for manual registration of the product using an email and password. While this provides a simple mechanism for registering a few machines, the manual process is cumbersome for registering large numbers of machines in a managed IT environment.

For mass deployment and registration of Inquisit, registration can be accomplished by running an install script in the rollout immediately after installation of Inquisit Lab completes. This script calls the Inquisit application via command line, passing in the userid and password as arguments for retrieving the registration key. If the process has administrative privileges, Inquisit will register for all users on the machine. If the process only has user privileges, it will register the current user only.

To register Inquisit Lab from the command line, call the Inquisit executable with the following command line parameters:

[InstallDir]Inquisit.exe --register --userid myuserid@millisecond.com --password mypassword --account myaccount

The "--register" argument tells Inquisit to register the product.

The "--userid" argument is the email address of one of the users on the account.

The "--password" argument is the password associated with the user.

The "--account" argument is the name of the account for the licenses. This is only required if the specified user is a member of more than one account.


Introducing Inquisit 6 Web

Inquisit 6 Web extends the power and flexibility of the Inquisit 6 experiment engine to the web. With Inquisit Web, your experiments can be launched directly from a web page without having to manually install Inquisit on the client machine. Data gathered from the web can be saved back to a web site, ftp site, network share, or even an email address.

What are the benefits of Inquisit 6 Web?

Unlimited client licenses. With Inquisit Web, Inquisit experiments can be run on an unlimited number of client machines. This makes Inquisit Web an ideal tool for large scale data collection in laboratories, class rooms, or over the Internet.

Easy web deployment.Your participants can run your studies by simply browsing to a web page, download the Inquisit Web app, then clicking a link to start the study.

Power, flexibility, and accurate timing. The Inquisit Web engine affords the same power, flexibility, and timing accuracy as the Inquisit Lab engine. How is that possible? Because the Inquisit Web engine is the Lab engine. Literally. We've just repackaged it in a way that makes it easy to deploy over the web.

Compatible with Inquisit 6 Lab. Your Inquisit 6 scripts will run interchangeably between the lab and web engines. There is no need to maintain and test multiple versions of your scripts.

How does the Inquisit 6 Web work?

When you purchase a web license, we will create an account on millisecond.com where can login and use the online tools to upload and register experiments. Once you've registered an experiment, you will have a launch page on millisecond.com where you can direct participants. On the launch page, they can click a link to start the experiment. They will have to agree to download Inquisit Web, after which the experiment will start. Inquisit Web download all materials required to run the study at the very beginning, then runs the experiment locally on the participant's computer, and uploads the data at the end. Inquisit thus only requires the network prior to and after the experiment runs, but it does not rely on the network as the experiment is running.

You can see what the experience of launching an Inquisit Web study yourself by running any of the demos in the Inquisit Task Library.

How does licensing work with Inquisit 6 Web?

Unlike Inquisit Lab, Inquisit Web is not licensed based on the number of client computers that install and run Inquisit experiments. In fact, an Inquisit Web license entitles you to run Inquisit experiments on an unlimited number of client computers.

Inquisit Web licenses determine the number of experiments that can be run at a given point in time. An Inquisit Web license entitles you to run a single web experiment (as defined by a single Inquisit script). If you wish to run one web experiment at a time, you would only need a single Inquisit Web license. If you wish to collect data for five different experiments in parallel, you would need five Inquisit Web licenses.

Inquisit Web enforces the licensing policy at run time by checking whether the experiment it has been instructed to run is listed as an active experiment for the specified user account. If the experiment is active, the experiment runs as normal. If the experiment is not active, it can optionally be run, but no data will be collected. You may change your list of active experiments as often as you'd like. However, the number of active experiment you may specify is limited to the number of Inquisit Web licenses held by your account. Importantly, this means that Inquisit Web must be able to connect to www.millisecond.com from the client computer in order to collect data. Inquisit Web can not be used to collect data on machines that are not connected to the Internet.

What are the machine requirements for Inquisit 6 Web?

The client must be running Windows XP or later, or Mac OSX 10.5 or later. Sorry, no support for Linux.

The client must have a working Internet connection.

The client must be running an reasonably recent version of Chrome, Firefox, Internet Explorer, or Safari.

Where can I get Inquisit 6 Web?

To use Inquisit 6 Web, you must purchase a web license. This will enable you to login to your account on millisecond.com, where you can use our online tools for uploading experiments and accessing your data.


Sending Inquisit Web Data to Your Own Server

By default, Inquisit Web saves remote data to your account on millisecond.com, where you can login with your browser at anytime to download it. Inquisit currently has servers for running experiments and storing data in the United States and the European Union, with other regions to be added.

For those wishing to store data on your own servers, Inquisit Web offers two options. First, data can be sent to Millisecond's servers and then forwarded to an HTTPS endpoint of your choosing. Second, the script for your test can be configured to upload data directly to an HTTPS endpoint of your choosing.

Data Forwarding

Data forwarding can be easily enabled on the Advanced Settings panel of experiment settings, shown in the image below.

You can choose to save a copy of the data file in your Millisecond account or remove the file once it has been forwarded. Data forwarding supports four different protocols for sending data.

Multipart/Form-Data Post

With this method, data are forwarded as multipart/form-data using HTTP POST. A user id and password can be specified for basic authentication. This is a well-documented standard used by HTML forms to upload files to a server.

The POST includes the following fields:

  • "upload": The data file.
  • "ScriptPath": Full path to the script that produced the data file.
  • "SubjectId": Participant Id.
  • "GroupId": Participant's group number.
  • "SessionId": The session number.
  • "FileKey": The name generated by Inquisit Web of the data file.

REST: HTTP POST or PUT

With this method, data are forwarded the using REST convention with HTTP POST or PUT. A user id and password can be specified for basic authentication. The data file is contained in the body of the POST/POST.

The specified endpoint serves as the base path of the rest call. The REST call is made with the following query parameters:

  • "ScriptPath": Full path to the script that produced the data file.
  • "SubjectId": Participant Id.
  • "GroupId": Participant's group number.
  • "SessionId": The session number.
  • "FileKey": The name generated by Inquisit Web of the data file.

Amazon Web Services S3

With this method, data are sent to an arbitrary AWS S3 bucket. A user id and password can be specified for AWS authentication. The resulting data objects include the following metadata:

  • "ScriptPath": Full path to the script that produced the data file.
  • "SubjectId": Participant Id.
  • "GroupId": Participant's group number.
  • "SessionId": The session number.
  • "FileKey": The name generated by Inquisit Web of the data file.

Data Uploading

Data forwarding provides a simple, reliable way of transfering data from Millisecond's servers. In some situations, it may be preferrable for data to be sent from the participant directly to your own server without ever being processed by Millisecond. This is possible by modifying the script for your test, specifically the data element.

<data>
/ file = "https://www.example.com/upload"
/ password = "mypassword"
/ userid = "myuserid"
</data>

The file attribute specifies the endpoint to which data are sent via REST as an HTTP POST. The body of the POST contains the data file. Data files are usually uploaded in gzipped format, as indicated by the Content-Encoding header.

The userid and password attributes allows you to specify basic authentication login credentials for the HTTPS POST.

The REST call is made with the following query parameters:

  • "ExperimentId": Full path to the script that produced the data file.
  • "SubjectId": Participant Id.
  • "GroupId": Participant's group number.
  • "SessionId": The session number.
  • "DataFileName": The name generated by Inquisit Web of the data file.
  • "Folder": The subfolder for the data (e.g., "data", "soundcaptures", "screencaptures)".


Assigning Subject Numbers in Web Experiments

Subject numbers play a number of important roles in experiments. In longitudinal studies, they can be used to correlate data gathered from a subject at different times. For experiments with between-subject variables, subject numbers play a critical role in assigning participants into particular conditions. By using identification numbers such as student ids or telephone numbers, the subject number can also allow researchers to identify participants in cases where the research makes that necessary.

For traditional lab research, managing subject numbers with Inquisit is straightforward. The experimenter starts the Inquisit script and either enters the subject number herself, or she instructs the participant to enter the number. With web research, participants may be located anywhere in the world, in which case there is no experimenter overseeing the data collection session who can assign the appropriate subject number. In these cases, it is necessary to devise a system in which either participants can specify the number themselves, or the number is automatically assigned by the web site. This article will discuss several strategies for assigning subject numbers to web participants.

Subject numbers for between-subject variables

One of the most common uses of subject numbers by Inquisit is to assign subjects into a particular cell of a between-subjects variable. Subject numbers are mapped to conditions within the Inquisit script itself, either by the expt or the variables element. For example, in Figure 1 below the script uses the expt element to counterbalance the order of two blocks across even and odd numbered subjects:

Figure 1.

<expt>
/ subjects = (1 of 2)
/ blocks = [1=conditiona; 2=conditionb]
</expt>

<expt>
/ subjects = (2 of 2)
/ blocks = [1=conditionb; 2=conditiona]
</expt>

In most cases, the researcher wants to ensure that subjects are randomly assigned into the even or odd numbered group, and they want equal numbers of subjects in each condition.

Subject number assignment for scripts hosted on millisecond.com

If you choose to host your script on the millisecond.com server, there are several options for generating subject numbers that you can choose from: random generation, random generation without replacement, sequential, user entered, and user entered with confirmation prompt. You simply choose which option you want when running the Script Registration Wizard. There's no need to understand the technical details of how these work.

Random Assignment of Subject Numbers

The first sample page shows random generation of subject nunbers, which is the simplest way to achieve a random, approximately even distribution of subjects into different conditions. Let's take a look at how the reference page randomly assigns subject numbers. (You can see this first hand by browsing to the page and viewing the underlying source.) The first thing to note is the following section of JavaScript at the top of the page source:

In the source code for the page is a javascript method called "GetSubjectNumber" that is responsible for generating the subject number. For random generation, the method looks like this:

Figure 2.
function GetSubjectNumber()
{
   return (Math.floor(Math.random() * 1000000000));
}

The method contains a single line of code does the work of randomly generating the subject number. The function uses the javascrip method , Math.random(), to generate a random number from 0 to 1, then multiples that value by 1,000,000,000 and rounds it down to the nearest integer so that the final result is a random number between 1 and 1,000,000,000. Note that we are selecting numbers with replacement, so it is theoretically possible that two participants might be assigned the same subject number. However, the chances are slim indeed, and if it does happen, you can use the time of the session as logged in the "date" and "time" data columns to distinguish the subjects' data.

Prompting participants to enter a subject number

For some experiments, it may be necessary or convenient to use personal identification such as a telephone number, social security number, or student id as the subject number rather than an arbitrary, randomly generated number. To administer this kind of experiment over the web, the participant must be allowed to input their id number so that it can be recorded along with the data. The second option allow you to prompt the participant to enter an id number. The third option has the subject enter the number twice to avoid keying errors.

Let's take a look at the javascript for the third option, which is the more complicated method. In this case, the GetSubjectNumber() method contains the following javascript code, which prompts the subject to enter a 5 digit number, then prompts again to confirm the number, and provides error feedback if the number is invalid or they don't match.

Figure 3.

function GetSubjectNumber()
{
// This method prompts the subject for an id number and then prompts
    again to // confirm in order avoid mistyped numbers.

var intRegExp = /(^\d{5,5}$)/;
var promptMsg = "Please enter a 5 digit id number.";
var confirmMsg = "Please confirm the number you entered.";
var invalidMsg = "The number was invalid. Please enter a valid number.";
var matchMsg = "The numbers you entered did not match. Please enter the number again.";

var snum = window.prompt(promptMsg, "");

while ( snum != null && intRegExp.test(snum) == false )
{
// if the input was invalid, prompt again
    window.alert(invalidMsg);
    snum = window.prompt(promptMsg, "");
}

if ( snum == null )
{
    return null;
}

var sconfirm = window.prompt(confirmMsg, "");
while ( sconfirm != null && (sconfirm != snum || intRegExp.test(sconfirm) == false) )
{
    // if the input was invalid, prompt again
    if ( intRegExp.test(sconfirm) == false)
    {
        window.alert(invalidMsg);
    }

    // if the numbers do not match, alert the user and bail out so
        they can start over
    else if ( sconfirm != snum )
    {
        window.alert(matchMsg);
        return null;
    }

    sconfirm = window.prompt(confirmMsg, "");
}

return sconfirm;

}

The validation is done through the regular expression in the first line of code. You can change the validation by replacing the regular expression (which only verifies that the input is numeric and 5 digits long) with your own. If you don't understand regular expressions, don't worry, the web is abundant with ready made regular expressions for validating all kinds of input (integers, zip codes, telephone numbers, etc.). I found this one in seconds through Google.

Customized subject number generation

If you wish to use your own method for generating subject numbers, you can do so simply by editing the GetSubjectNumber() method in the source code. Remember, this javascript code runs on the participant's machine, not on the server, so it has no way to keep track of which subject numbers have already been assigned. For that, you would have to program some server code that tracks subject numbers in a database, then dynamically injects the subject number into this web page, and in particular, into the GetSubjectNumber(). If you host your scripts on millisecond.com, this is how the hosting service is able to generate sequential subject numbers and random selection without replacement.

These are just a few of the strategies for assigning subject numbers on the web. They are by no means the only techniques possible. Other strategies include deriving subject numbers from the date and time, the ip address of the client computer, or the session id. For those with some familiarity with web development, the web is an flexible and open programming environment that makes any number of schemes possible.


item element

The item element defines a set of stimulus items.

Syntax

<item itemname>
/ 2 = "item text"
/ 3 = "item text"
/ 4 = "item text"
/ 1 = "item text" or "path"
</item>

Properties

item.itemname.itemcount
item.itemname.items
item.itemname.name
item.itemname.typename

Functions

item.itemname.appenditem
item.itemname.clearitems
item.itemname.insertitem
item.itemname.item
item.itemname.removeitem
item.itemname.reset
item.itemname.setitem

Remarks

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", ... ).

For dynamically defined item sets, the items attribute specifies which trial generates the items. Each time the specified trial is run, the subject's response on that trial is added to the item set until the set is full.

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 %>

Examples

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>
Send comments on this topic:
Copyright Millisecond Software, LLC. All rights reserved.


clock element

The clock element presents a timer, stopwatch, or clock on the screen.

Syntax

<clock clockname>
/ animation = circle(duration, loopcount, start, end, xcenter, ycenter, radius) or path(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or points(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or size(duration, loopcount, startwidth, startheight, scale1, scale2, scale3, ...) or rotation(duration, loopcount, degrees1, degrees2, degrees3, ...)
/ format = clockformat
/ mode = clockmode
/ dropposition = (x value, y value) or (x constant, y constant)
/ dropsource = value or boolean
/ droptarget = property or boolean
/ erase = true(red value, green value, blue value) or true(color value) or true(color name) or false
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ halign = alignment
/ height = numeric expression
/ hposition = x expression
/ monitor = integer
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ position = (x value, y value)
/ resetrate = rate
/ rotation = degrees
/ scale = factor
/ size = (width variable, height variable)
/ timeout = integer expression
/ txbgcolor = (red value, green value, blue value) or (transparent) or color name or color value
/ txcolor = (red value, green value, blue value) or color name or color value
/ valign = alignment
/ vposition = y expression
/ width = numeric expression
</clock>

Properties

clock.clockname.bottom
clock.clockname.currenttime
clock.clockname.dropsource
clock.clockname.droptarget
clock.clockname.dropx
clock.clockname.dropy
clock.clockname.elapsedtime
clock.clockname.erase
clock.clockname.erasecolor
clock.clockname.erasecolorblue
clock.clockname.erasecolorgreen
clock.clockname.erasecolorred
clock.clockname.fontheight
clock.clockname.height
clock.clockname.heightpct
clock.clockname.heightpx
clock.clockname.hposition
clock.clockname.left
clock.clockname.monitor
clock.clockname.name
clock.clockname.remainingtime
clock.clockname.right
clock.clockname.rotation
clock.clockname.scale
clock.clockname.skip
clock.clockname.stimulusonset
clock.clockname.textbgcolor
clock.clockname.textbgcolorblue
clock.clockname.textbgcolorgreen
clock.clockname.textbgcolorred
clock.clockname.textcolor
clock.clockname.textcolorblue
clock.clockname.textcolorgreen
clock.clockname.textcolorred
clock.clockname.timeout
clock.clockname.timestamp
clock.clockname.top
clock.clockname.typename
clock.clockname.vposition
clock.clockname.width
clock.clockname.widthpct
clock.clockname.widthpx
clock.clockname.xpct
clock.clockname.xpx
clock.clockname.ypct
clock.clockname.ypx

Functions

clock.clockname.pause
clock.clockname.resettime
clock.clockname.start

Remarks

The clock element is used to display a timer, stopwatch, or clock on the screen. The clock is a convenient way to show participants how much time is left to complete the task.

Examples

The following presents a 5-minute timer spanning a block of trials with yellow letters against a black background:

<clock timer>
/ mode = timer
/ resetrate = block
/ erase = false
/ txcolor = yellow
/ txbgcolor = black
/ timeout = 300000
/ position = (50%, 10%)
/ format = "mm:ss"
</clock>

The following presents white stopwatch with black letters that spans a single trial:

<clock stopwatch>
/ mode = stopwatch
/ txcolor = black
/ txbgcolor = white
/ format = "hh:mm:ss"
/ position = (50%, 90%)
</clock>


picture element

The picture element defines a set of pictures items and controls how they are displayed.

Syntax

<picture picturename>
/ animation = circle(duration, loopcount, start, end, xcenter, ycenter, radius) or path(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or points(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or size(duration, loopcount, startwidth, startheight, scale1, scale2, scale3, ...) or rotation(duration, loopcount, degrees1, degrees2, degrees3, ...)
/ dropposition = (x value, y value) or (x constant, y constant)
/ dropsource = value or boolean
/ droptarget = property or boolean
/ erase = true(red value, green value, blue value) or true(color value) or true(color name) or false
/ halign = alignment
/ height = numeric expression
/ hposition = x expression
/ items = itemname or ("item", "item", "item",... ) or ("path", "path", "path",... )
/ monitor = integer
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ position = (x value, y value)
/ resetinterval = integer
/ rotation = degrees
/ scale = factor
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(listname) or listname
/ size = (width variable, height variable)
/ valign = alignment
/ vposition = y expression
/ width = numeric expression
</picture>

Properties

picture.picturename.bottom
picture.picturename.currentindex
picture.picturename.currentitem
picture.picturename.currentvalue
picture.picturename.dropsource
picture.picturename.droptarget
picture.picturename.dropx
picture.picturename.dropy
picture.picturename.erase
picture.picturename.erasecolor
picture.picturename.erasecolorblue
picture.picturename.erasecolorgreen
picture.picturename.erasecolorred
picture.picturename.height
picture.picturename.heightpct
picture.picturename.heightpx
picture.picturename.hposition
picture.picturename.itemcount
picture.picturename.items
picture.picturename.left
picture.picturename.name
picture.picturename.nextindex
picture.picturename.nextvalue
picture.picturename.playthrough
picture.picturename.resetinterval
picture.picturename.right
picture.picturename.rotation
picture.picturename.scale
picture.picturename.selectedcount
picture.picturename.skip
picture.picturename.stimulusonset
picture.picturename.timestamp
picture.picturename.top
picture.picturename.typename
picture.picturename.unselectedcount
picture.picturename.vposition
picture.picturename.width
picture.picturename.widthpct
picture.picturename.widthpx
picture.picturename.xpct
picture.picturename.xpx
picture.picturename.ypct
picture.picturename.ypx

Functions

picture.picturename.appenditem
picture.picturename.clearitems
picture.picturename.insertitem
picture.picturename.item
picture.picturename.removeitem
picture.picturename.resetselection
picture.picturename.setitem

Remarks

The picture element selects individual image files and presents them on the screen at the specified size, location, and rotation.

The following image formats are supported:
bmp, gif, jpeg, jpg, pbm, pgm, png, ppm, tif, tiff, wbmp, webp, xbm, xpm, svg

Examples

The following defines a set of picture items presented on the right side of the screen:

<picture moutains>
/ items = ("rainier.bmp", "baker.jpg", "sainthelens.gif")
/ position = (75, 50)
</picture>


port element

The port element defines a set of 8-bit signals to be sent through a serial or parallel port.

Syntax

<port portname>
/ erase = true("bits") or true(integer) or false
/ items = itemname or ("binary", "binary", "binary",... ) or (integer, integer, integer,... )
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ port = port name
/ resetinterval = integer
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(listname) or listname
/ subport = porttype
</port>

Properties

port.portname.currentindex
port.portname.currentitem
port.portname.currentvalue
port.portname.erase
port.portname.erasesignal
port.portname.itemcount
port.portname.items
port.portname.name
port.portname.nextindex
port.portname.nextvalue
port.portname.playthrough
port.portname.portnumber
port.portname.resetinterval
port.portname.selectedcount
port.portname.skip
port.portname.stimulusonset
port.portname.timestamp
port.portname.typename
port.portname.unselectedcount

Functions

port.portname.appenditem
port.portname.clearitems
port.portname.insertitem
port.portname.item
port.portname.removeitem
port.portname.resetselection
port.portname.setitem

Remarks

The port element determines which port the signal is sent through along with how individual signals are selected on each trial (e.g. randomly, in sequence, etc.).

Inquisit supports sending values to a serial (RS 232) port on Windows only. Inquisit supports parallel port signaling on both Windows and Mac. You'll need to first install a PCI Express parallel port card into an open PCI Express slot on your computer, or to the Mac Thunderbolt port via an adapter. See documentation for the parallel port monitor for details on connecting a parallel port to a Mac.

Examples

The following presents signals through the data register of the parallel port (LPT2). Items are selected based on the currently selected item of a another stimuli called "sometext".

<port somesignal>
/ port = LPT2
/ subport = data
/ items = ("00000001", "00000010", "00000100", "00001000")
/ erase = ("00000000")
/ select = current(sometext)
</port>


shape element

The shape element defines a single shape stimulus and specifies how the shape is presented.

Syntax

<shape shapename>
/ animation = circle(duration, loopcount, start, end, xcenter, ycenter, radius) or path(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or points(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or size(duration, loopcount, startwidth, startheight, scale1, scale2, scale3, ...) or rotation(duration, loopcount, degrees1, degrees2, degrees3, ...)
/ color = (red value, green value, blue value) or color name or color value
/ dropposition = (x value, y value) or (x constant, y constant)
/ dropsource = value or boolean
/ droptarget = property or boolean
/ erase = true(red value, green value, blue value) or true(color value) or true(color name) or false
/ halign = alignment
/ height = numeric expression
/ hposition = x expression
/ monitor = integer
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ position = (x value, y value)
/ rotation = degrees
/ scale = factor
/ shape = shapename
/ size = (width variable, height variable)
/ valign = alignment
/ vposition = y expression
/ width = numeric expression
</shape>

Properties

shape.shapename.bottom
shape.shapename.color
shape.shapename.colorblue
shape.shapename.colorgreen
shape.shapename.colorred
shape.shapename.dropsource
shape.shapename.droptarget
shape.shapename.dropx
shape.shapename.dropy
shape.shapename.erase
shape.shapename.erasecolor
shape.shapename.erasecolorblue
shape.shapename.erasecolorgreen
shape.shapename.erasecolorred
shape.shapename.height
shape.shapename.heightpct
shape.shapename.heightpx
shape.shapename.hposition
shape.shapename.left
shape.shapename.monitor
shape.shapename.name
shape.shapename.resetinterval
shape.shapename.right
shape.shapename.rotation
shape.shapename.scale
shape.shapename.skip
shape.shapename.stimulusonset
shape.shapename.timestamp
shape.shapename.top
shape.shapename.typename
shape.shapename.vposition
shape.shapename.width
shape.shapename.widthpct
shape.shapename.widthpx
shape.shapename.xpct
shape.shapename.xpx
shape.shapename.ypct
shape.shapename.ypx

Functions

None.

Remarks

Button stimuli provide a convenient means of overwriting previously presented stimuli during a presentation sequence, or for drawing background to be presented behind other stimuli.

Examples

The following defines a blue circle that appears on the right side of the screen:

<shape bluecircle>
/ shape = circle
/ color = (0, 0, 200)
/ position = (80%, 50%)
</shape>


sound element

The sound element defines a set of sound stimuli.

Syntax

<sound soundname>
/ erase = true(red value, green value, blue value) or true(color value) or true(color name) or false
/ items = itemname or ("item", "item", "item",... ) or ("path", "path", "path",... )
/ loop = boolean
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ pan = integer
/ playthrough = boolean
/ resetinterval = integer
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(listname) or listname
/ volume = integer
</sound>

Properties

sound.soundname.currentindex
sound.soundname.currentitem
sound.soundname.currentvalue
sound.soundname.erase
sound.soundname.itemcount
sound.soundname.items
sound.soundname.loop
sound.soundname.name
sound.soundname.nextindex
sound.soundname.nextvalue
sound.soundname.pan
sound.soundname.playthrough
sound.soundname.resetinterval
sound.soundname.selectedcount
sound.soundname.skip
sound.soundname.stimulusonset
sound.soundname.timestamp
sound.soundname.typename
sound.soundname.unselectedcount
sound.soundname.volume

Functions

sound.soundname.appenditem
sound.soundname.clearitems
sound.soundname.insertitem
sound.soundname.item
sound.soundname.removeitem
sound.soundname.resetselection
sound.soundname.setitem

Remarks

The sound element determines how individual items are selected on each trial (e.g. serially through item list, random selection without replacement, linked to the selection of items from another stimulus element) and how those items should be presented (e.g., left/right pan and volume).

Examples

The following defines a set of sounds to be presented to the left speaker:

<sound rock>
/ items = ("beatles.wav", "stones.wav", "thewho.wav")
/ pan = -10000
</sound>


systembeep element

Syntax

<systembeep>
This element has no attributes
</systembeep>

Properties

systembeep.currentindex
systembeep.currentvalue
systembeep.duration
systembeep.erase
systembeep.frequency
systembeep.itemcount
systembeep.items
systembeep.name
systembeep.nextindex
systembeep.nextvalue
systembeep.playthrough
systembeep.stimulusonset
systembeep.typename

Functions

None.

Remarks

The systembeep element is built-in, there is no need to explicitly declare it in the script. It is a type of stimulus, so it can be used wherever a stimulus element is valid. The systembeep is useful for providing audio feedback (e.g., to indicate an incorrect response). The advantage of using systembeep rather than the sound element is that it does not require a sound card. By default, the duration of the beep is 250 ms and the frequency is 750 hz.

Examples

The following trial presents a beep.

<trial beeptrial>
/ stimulustimes = [1=systembeep]
/ validresponse = (anyresponse)
</trial>


text element

The text element defines a set of text stimuli and determines how items are selected and displayed on the screen.

Syntax

<text textname>
/ animation = circle(duration, loopcount, start, end, xcenter, ycenter, radius) or path(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or points(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or size(duration, loopcount, startwidth, startheight, scale1, scale2, scale3, ...) or rotation(duration, loopcount, degrees1, degrees2, degrees3, ...)
/ dropposition = (x value, y value) or (x constant, y constant)
/ dropsource = value or boolean
/ droptarget = property or boolean
/ erase = true(red value, green value, blue value) or true(color value) or true(color name) or false
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ halign = alignment
/ height = numeric expression
/ hjustify = justification
/ hposition = x expression
/ items = itemname or ("item", "item", "item",... ) or ("path", "path", "path",... )
/ monitor = integer
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ position = (x value, y value)
/ resetinterval = integer
/ rotation = degrees
/ scale = factor
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(listname) or listname
/ size = (width variable, height variable)
/ txbgcolor = (red value, green value, blue value) or (transparent) or color name or color value
/ txcolor = (red value, green value, blue value) or color name or color value
/ valign = alignment
/ vjustify = justification
/ voiceover = boolena(language, gender, age, rate)
/ vposition = y expression
/ width = numeric expression
</text>

Properties

text.textname.bottom
text.textname.currentindex
text.textname.currentitem
text.textname.currentvalue
text.textname.dropsource
text.textname.droptarget
text.textname.dropx
text.textname.dropy
text.textname.erase
text.textname.erasecolor
text.textname.erasecolorblue
text.textname.erasecolorgreen
text.textname.erasecolorred
text.textname.fontheight
text.textname.height
text.textname.heightpct
text.textname.heightpx
text.textname.hposition
text.textname.itemcount
text.textname.items
text.textname.left
text.textname.monitor
text.textname.name
text.textname.nextindex
text.textname.nextvalue
text.textname.playthrough
text.textname.resetinterval
text.textname.right
text.textname.rotation
text.textname.scale
text.textname.selectedcount
text.textname.skip
text.textname.stimulusonset
text.textname.textbgcolor
text.textname.textbgcolorblue
text.textname.textbgcolorgreen
text.textname.textbgcolorred
text.textname.textcolor
text.textname.textcolorblue
text.textname.textcolorgreen
text.textname.textcolorred
text.textname.timestamp
text.textname.top
text.textname.typename
text.textname.unselectedcount
text.textname.voiceover
text.textname.vposition
text.textname.width
text.textname.widthpct
text.textname.widthpx
text.textname.xpct
text.textname.xpx
text.textname.ypct
text.textname.ypx

Functions

text.textname.appenditem
text.textname.clearitems
text.textname.insertitem
text.textname.item
text.textname.removeitem
text.textname.resetselection
text.textname.setitem

Remarks

The text element is used to display text stimuli on the screen. Typically, a single text element consists of a set of text items, and it specifies the method by which a given item is selected for presentation on a trial (e.g., randomly, in sequential order, linked to a different stimulus element, etc.). The text element also controls the appearance of the text on the screen, including font, size, color, justification, and location.

Examples

The following presents white text on a blue background:

<text sometext>
/ items = ("inquisit rocks")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
</text>

The following defines a set of text items to be selected in sequential order:

<text presidents>
/ items = ("George Washington", "John Adams", "Thomas Jefferson")
/ select = sequence
</text>


video element

The video element defines a set of video items and controls how they are displayed.

Syntax

<video videoname>
/ animation = circle(duration, loopcount, start, end, xcenter, ycenter, radius) or path(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or points(duration, loopcount, x1, y1, x2, y2, x3, y3, ...) or size(duration, loopcount, startwidth, startheight, scale1, scale2, scale3, ...) or rotation(duration, loopcount, degrees1, degrees2, degrees3, ...)
/ dropposition = (x value, y value) or (x constant, y constant)
/ dropsource = value or boolean
/ droptarget = property or boolean
/ erase = true(red value, green value, blue value) or true(color value) or true(color name) or false
/ halign = alignment
/ height = numeric expression
/ hposition = x expression
/ items = itemname or ("item", "item", "item",... ) or ("path", "path", "path",... )
/ monitor = integer
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ playthrough = boolean
/ position = (x value, y value)
/ resetinterval = integer
/ rotation = degrees
/ scale = factor
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(listname) or listname
/ size = (width variable, height variable)
/ stream = boolean
/ valign = alignment
/ vposition = y expression
/ width = numeric expression
</video>

Properties

video.videoname.bottom
video.videoname.currentindex
video.videoname.currentitem
video.videoname.currenttime
video.videoname.currentvalue
video.videoname.dropsource
video.videoname.droptarget
video.videoname.dropx
video.videoname.dropy
video.videoname.erase
video.videoname.erasecolorblue
video.videoname.erasecolorgreen
video.videoname.erasecolorred
video.videoname.height
video.videoname.heightpct
video.videoname.heightpx
video.videoname.hposition
video.videoname.isplaying
video.videoname.itemcount
video.videoname.items
video.videoname.left
video.videoname.loop
video.videoname.monitor
video.videoname.name
video.videoname.nextindex
video.videoname.nextvalue
video.videoname.playthrough
video.videoname.resetinterval
video.videoname.right
video.videoname.rotation
video.videoname.scale
video.videoname.selectedcount
video.videoname.skip
video.videoname.stimulusonset
video.videoname.timestamp
video.videoname.top
video.videoname.typename
video.videoname.unselectedcount
video.videoname.vposition
video.videoname.width
video.videoname.widthpct
video.videoname.widthpx
video.videoname.xpct
video.videoname.xpx
video.videoname.ypct
video.videoname.ypx

Functions

video.videoname.appenditem
video.videoname.clearitems
video.videoname.insertitem
video.videoname.item
video.videoname.removeitem
video.videoname.resetselection
video.videoname.setitem

Remarks

The video element determines how video files are selected on each trial (e.g. randomly, in sequence, etc.) and how those items should be presented. Inquisit can display a variety of different streaming formats, including asf, vod, mpeg-1, mpeg-2, mpeg-3, mpeg-4, avi, midi, mov, wav, snd, au, and aiff, animated gifs, and Adobe Flash animations. Note that not all video file containers and codecs are supported on all platforms. To present videos that will work on both Mac and Windows, use mpg file containers with the MPEG2 codec format, or use conditional include elements to select *.wmv versions of your videos on Windows and *.mov versions for Mac.

Examples

The following randomly selects from 3 video files and displays the video on the upper left quadrant of the screen. Responding is not permitted until the video clip is finished.

<video tvshows>
/ items = ("desparatehousewives.mpg", "thedailyshow.avi", "southpark.wmv")
/ playthrough = true
/ position = (25, 25)
</video>


xid element

The xid element enables interacting with XID-compatible devices such as Lumina fMRI Response Pads, RB-series Response Pads, and StimTracker from Cedrus.

Syntax

<xid xidname>
/ erase = true("bits") or true(integer) or false
/ items = itemname or ("binary", "binary", "binary",... ) or (integer, integer, integer,... )
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ product = product
/ pulseduration = positive integer or -1 to indicate a persistent signal
/ resetinterval = integer
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(listname) or listname
</xid>

Properties

xid.xidname.currentindex
xid.xidname.currentitem
xid.xidname.currentvalue
xid.xidname.erase
xid.xidname.erasesignal
xid.xidname.itemcount
xid.xidname.items
xid.xidname.lastevent
xid.xidname.lasteventaction
xid.xidname.lasteventbutton
xid.xidname.lasteventport
xid.xidname.lastlatency
xid.xidname.name
xid.xidname.nextindex
xid.xidname.nextvalue
xid.xidname.product
xid.xidname.resetinterval
xid.xidname.selectedcount
xid.xidname.skip
xid.xidname.stimulusonset
xid.xidname.timestamp
xid.xidname.typename
xid.xidname.unselectedcount

Functions

xid.xidname.appenditem
xid.xidname.clearitems
xid.xidname.insertitem
xid.xidname.item
xid.xidname.removeitem
xid.xidname.resetselection
xid.xidname.setitem

Remarks

The xid element can be used as a stimulus to send signals to a Cedrus StimTracker. To use the xid element in this mode, simply plug the StimTracker into the computer and ensure that product attribute is set to stimtracker. You can then define the signals as 8-bit values expressed as binary strings or as an object for setting and retrieving properties from a Cedrus RB-Series or Lumina response pad.

The xid element can also be used to get more detailed properties from Cedrus RB-Series or Lumina response pad. The element is not required in order to use a response pad but provides a way to access some of its advanced features. If you do not require access to the advanced properties of the device, you need only set the inputdevice attribute to "XID" and the validresponse and/or correctresponse attributes to the values of the buttons used for the task.

For more information on using Inquisit with Cedrus RB Series and Lumina response pads, see the following topic.

For more information on using Inquisit with a Cedrus StimTracker, see the following topic.

Examples

The following configures a StimTracker as a stimulus and presents the binary values of 1, 2, or 3 in sequential order.

<xid stimtracker>
/ product = stimtracker
/ items = ("000000001", "000000010", "00000011")
/ pulseduration = 100
/ selectionmode = sequence
</xid>

The following creates an element for an RB Series response box so that properties (e.g., xid.responsepad.lastevent) can be retrieved in the script.

<xid responsepad>
/ product = responsepad
</xid>

The following sets the default input device for responding to the XID response device that is plugged into the computer (i.e., RB-Series or Lumina response pad ).

<defaults>
/ inputdevice = XID
</defaults>


Expression Examples

Special characters

When you are creating text items or instruction pages, some characters require special treatment. For example, imagine that you are creating a text stimulus that contains quotes. Quotes play a special role in Inquisit syntax of marking the beginning and the end of a stimulus item, so Inquisit needs away to distinguish quotes that are part of the item from those that indicate the beginning and end. If a quote is preceded by the escape character '~', this tells Inquisit that the quote is not a delimiter, but should be included in the item.

For example, the following text stimulus:

<text mytext>
/ items = ("The man said ~"hello~".")
/ size = (300, 200)
</text>

appears on the screen as

The main said "hello".

The following text stimulus, however, will result in a warning that there is extra text at the end of the item definition because the quotes are treated as markers of the beginning and end of the item:

<text mytext>
/ items = ("The man said "hello".")
/ size = (300, 200)
</text>

Other special characters that are expressed using the escape character '~' include tabs, newlines, and carriage returns. The list of special characters is below.

Character | Escape sequence | Appearance on the screen
double quote | ~" | literal quote
tab | ~t | tab space
new line | ~n | line break (applies to instruction pages and text stimuli with the size attribute specified)


trial element

The trial element controls the timing and the content of stimulus presentation.

Syntax

<trial trialname>
/ beginresponseframe = integer expression
/ beginresponsetime = integer expression
/ branch = [if expression then event]
/ correctmessage = false or true(stimulusname, duration)
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ datastreams = (eyetracker) or eyetracker or false
/ draw = stimulusname or true(stimulusname) or false
/ dropsources = (stimulus, stimulus, stimulus, ...)
/ droptargets = (stimulus, stimulus, stimulus, ...)
/ errormessage = false or true(stimulusname, duration)
/ inputdevice = modality
/ inputmask = "bit mask"
/ iscorrectresponse = [expression; expression; expression; ...]
/ isvalidresponse = [expression; expression; expression; ...]
/ monkeyresponse = ("string", "string",...) or (scancode, scancode, ...) or (property, property, ...) or [expression; expression; expression;...]
/ numframes = integer
/ ontrialbegin = [expression; expression; expression; ...]
/ ontrialend = [expression; expression; expression; ...]
/ posttrialpause = integer expression
/ posttrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ pretrialpause = integer expression
/ pretrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ recorddata = boolean
/ response = responsename or timeout(milliseconds) or window(center, width, stimulusname) or responsemode
/ responseinterrupt = mode
/ responsemessage = (responsevalue, stimulusname, duration)
/ responsetrial = (response, trialname)
/ screencapture = boolean
/ showmousecursor = boolean
/ soundcapture = boolean
/ stimulusframes = [framenumber = stimulusname, stimulusname, ...; framenumber = stimulusname, ...] or [framenumber = list.name] or [framenumber = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stimulustimes = [time = stimulusname, stimulusname, ...; time = stimulusname, ...] or [time = list.name] or [time = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stop = [expression; expression; expression; ...]
/ timeout = integer expression
/ trialduration = integer expression
/ undodraw = [expression; expression; expression; ...]
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
</trial>

Properties

trial.trialname.beginresponseframe
trial.trialname.beginresponsetime
trial.trialname.correct
trial.trialname.correctcount
trial.trialname.correctstreak
trial.trialname.count
trial.trialname.error
trial.trialname.errorcount
trial.trialname.errorstreak
trial.trialname.inputmask
trial.trialname.inwindow
trial.trialname.lastdroplatency
trial.trialname.lastdropsource
trial.trialname.lastdroptarget
trial.trialname.latency
trial.trialname.maxlatency
trial.trialname.meanlatency
trial.trialname.medianlatency
trial.trialname.minlatency
trial.trialname.name
trial.trialname.percentcorrect
trial.trialname.percentinwindow
trial.trialname.posttrialpause
trial.trialname.pretrialpause
trial.trialname.response
trial.trialname.responsemonitor
trial.trialname.responsetext
trial.trialname.responsex
trial.trialname.responsey
trial.trialname.screencapture
trial.trialname.sdlatency
trial.trialname.showmousecursor
trial.trialname.sumlatency
trial.trialname.timestamp
trial.trialname.totalcorrectcount
trial.trialname.totalcount
trial.trialname.totalerrorcount
trial.trialname.totalmaxlatency
trial.trialname.totalmeanlatency
trial.trialname.totalmedianlatency
trial.trialname.totalminlatency
trial.trialname.totalnuminwindow
trial.trialname.totalpercentcorrect
trial.trialname.totalpercentinwindow
trial.trialname.totalsdlatency
trial.trialname.totalsumlatency
trial.trialname.totaltrialcount
trial.trialname.totalvarlatency
trial.trialname.trialcode
trial.trialname.trialcount
trial.trialname.trialduration
trial.trialname.typename
trial.trialname.varlatency

Functions

trial.trialname.clearstimulusframes
trial.trialname.insertstimulusframe
trial.trialname.insertstimulustime
trial.trialname.removestimulusframe
trial.trialname.removestimulustime
trial.trialname.resetstimulusframes
trial.trialname.setstimulusframe
trial.trialname.setstimulustime
trial.trialname.stimulusframe
trial.trialname.stimulustime

Remarks

The trial element is the primary tool for controlling the flow of an experimental task. Trials allow customization of stimulus presentation, response procedure, time constraints, and response feedback. Each time a trial is executed, a line of data is written to the data file. Inquisit supports a number of specialized kinds of trials that provide a simple way to configure specific, commonly used types of tasks. Specialized trials include openended, likert, and surveypage.

Examples

The following trial runs happytrial if the response is "a" and sadtrial if the response is "b":

<trial mytrial>
/ stimulusframes = [0=sometext]
/ validresponse = ("a", "b")
/ responsetrial = ("a", happytrial)
/ responsetrial = ("b", sadtrial)
</trial>

The following trial presents a rapid series of 5 pictures at 10 millisecond intervals. The subject may respond by clicking the left or right mouse button. If the left button is clicked, an error message appears. If the right button is clicked, a correct message appears.

<trial mytrial>
/ stimulustimes = [0=pic1; 10=pic2; 20=pic3; 30=pic4; 40=pic5]
/ inputdevice = mousekey
/ validresponse = (lbuttondown, rbuttondown)
/ errormessage = (redx, 500)
/ correctmessage = (greenstar, 500)
</trial>


likert element

The likert element is a specialized trial element for collecting likert ratings.

Syntax

<likert likertname>
/ anchorwidth = width expression
/ beginresponseframe = integer expression
/ beginresponsetime = integer expression
/ branch = [if expression then event]
/ buttonvalues = [point="value", point="value", point="value"]
/ correctmessage = false or true(stimulusname, duration)
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ datastreams = (eyetracker) or eyetracker or false
/ errormessage = false or true(stimulusname, duration)
/ iscorrectresponse = [expression; expression; expression; ...]
/ isvalidresponse = [expression; expression; expression; ...]
/ labels = ("label", "label", "label", ...)
/ position = (x variable, y variable)
/ monkeyresponse = ("string", "string",...) or (scancode, scancode, ...) or (property, property, ...) or [expression; expression; expression;...]
/ mouse = boolean
/ navigationbuttonfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ numframes = integer
/ numpoints = integer
/ ontrialbegin = [expression; expression; expression; ...]
/ ontrialend = [expression; expression; expression; ...]
/ posttrialpause = integer expression
/ posttrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ pretrialpause = integer expression
/ pretrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ quit = [expression; expression; expression; ...]
/ recorddata = boolean
/ response = responsename or timeout(milliseconds) or window(center, width, stimulusname) or responsemode
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ responseinterrupt = mode
/ responsemessage = (responsevalue, stimulusname, duration)
/ responsetrial = (response, trialname)
/ screencapture = boolean
/ showmousecursor = boolean
/ skip = [expression; expression; expression; ...]
/ stimulusframes = [framenumber = stimulusname, stimulusname, ...; framenumber = stimulusname, ...] or [framenumber = list.name] or [framenumber = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stimulustimes = [time = stimulusname, stimulusname, ...; time = stimulusname, ...] or [time = list.name] or [time = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stop = [expression; expression; expression; ...]
/ timeout = integer expression
/ trialduration = integer expression
</likert>

Properties

likert.likertname.anchorwidth
likert.likertname.beginresponseframe
likert.likertname.beginresponsetime
likert.likertname.correct
likert.likertname.correctcount
likert.likertname.correctstreak
likert.likertname.count
likert.likertname.error
likert.likertname.errorcount
likert.likertname.errorstreak
likert.likertname.fontheight
likert.likertname.inputmask
likert.likertname.inwindow
likert.likertname.latency
likert.likertname.maxlatency
likert.likertname.meanlatency
likert.likertname.medianlatency
likert.likertname.minlatency
likert.likertname.name
likert.likertname.numpoints
likert.likertname.percentcorrect
likert.likertname.percentinwindow
likert.likertname.posttrialpause
likert.likertname.pretrialpause
likert.likertname.response
likert.likertname.responsetext
likert.likertname.responsex
likert.likertname.responsey
likert.likertname.scalewidth
likert.likertname.sdlatency
likert.likertname.sumlatency
likert.likertname.timestamp
likert.likertname.totalcorrectcount
likert.likertname.totalcount
likert.likertname.totalerrorcount
likert.likertname.totalmaxlatency
likert.likertname.totalmeanlatency
likert.likertname.totalmedianlatency
likert.likertname.totalminlatency
likert.likertname.totalnuminwindow
likert.likertname.totalpercentcorrect
likert.likertname.totalpercentinwindow
likert.likertname.totalsdlatency
likert.likertname.totalsumlatency
likert.likertname.totaltrialcount
likert.likertname.totalvarlatency
likert.likertname.trialcode
likert.likertname.trialcount
likert.likertname.trialduration
likert.likertname.typename
likert.likertname.varlatency

Functions

likert.likertname.clearstimulusframes
likert.likertname.insertstimulusframe
likert.likertname.insertstimulustime
likert.likertname.removestimulusframe
likert.likertname.removestimulustime
likert.likertname.resetstimulusframes
likert.likertname.setstimulusframe
likert.likertname.setstimulustime
likert.likertname.stimulusframe
likert.likertname.stimulustime

Remarks

The likert element controls the timing and the content of stimulus presentation as well as the appearance and behavior of the likert scale used to obtain ratings. Every time a likert element is executed, a line of data is written to the data file. Likert supports responding by keyboard (number and arrow keys to select a response, and ENTER key to submit it) or mouse (click the response button to submit a response). The default is mouse input.

Examples

The following shows a five point likert scale at the bottom of the screen with evaluative labels:

<likert ratingquestion>
/ stimulusframes=[1=sometext]
/ anchors=[1="excellent"; 2="good"; 3="satisfactory"; 4="bad"; 5="awful"]
/ position=(50, 90)
</likert>


openended element

The openended element is a specialized trial element for gathering free recall, openended responses.

Syntax

<openended openendedname>
/ beginresponseframe = integer expression
/ beginresponsetime = integer expression
/ branch = [if expression then event]
/ buttonlabel = "string"
/ charlimit = integer
/ correctmessage = false or true(stimulusname, duration)
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ datastreams = (eyetracker) or eyetracker or false
/ defaultresponse = "text" or property or expression
/ errormessage = false or true(stimulusname, duration)
/ iscorrectresponse = [expression; expression; expression; ...]
/ isvalidresponse = [expression; expression; expression; ...]
/ linelength = integer
/ mask = constraint or regular expression
/ monkeyresponse = ("string", "string",...) or (scancode, scancode, ...) or (property, property, ...) or [expression; expression; expression;...]
/ mouse = boolean
/ multiline = boolean
/ navigationbuttonfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ numframes = integer
/ numlines = integer
/ ontrialbegin = [expression; expression; expression; ...]
/ ontrialend = [expression; expression; expression; ...]
/ position = (x value, y value)
/ posttrialpause = integer expression
/ posttrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ pretrialpause = integer expression
/ pretrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ quit = [expression; expression; expression; ...]
/ range = (minimum, maximum)
/ recorddata = boolean
/ required = boolean
/ response = responsename or timeout(milliseconds) or window(center, width, stimulusname) or responsemode
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ responseinterrupt = mode
/ responsemessage = (responsevalue, stimulusname, duration)
/ responsetrial = (response, trialname)
/ screencapture = boolean
/ showmousecursor = boolean
/ size = (width variable, height variable)
/ skip = [expression; expression; expression; ...]
/ stimulusframes = [framenumber = stimulusname, stimulusname, ...; framenumber = stimulusname, ...] or [framenumber = list.name] or [framenumber = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stimulustimes = [time = stimulusname, stimulusname, ...; time = stimulusname, ...] or [time = list.name] or [time = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stop = [expression; expression; expression; ...]
/ timeout = integer expression
/ trialduration = integer expression
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
</openended>

Properties

openended.openendedname.beginresponseframe
openended.openendedname.beginresponsetime
openended.openendedname.buttonlabel
openended.openendedname.charlimit
openended.openendedname.correct
openended.openendedname.correctcount
openended.openendedname.correctstreak
openended.openendedname.count
openended.openendedname.defaultresponse
openended.openendedname.error
openended.openendedname.errorcount
openended.openendedname.errorstreak
openended.openendedname.fontheight
openended.openendedname.height
openended.openendedname.heightpct
openended.openendedname.heightpx
openended.openendedname.inputmask
openended.openendedname.inwindow
openended.openendedname.latency
openended.openendedname.maxlatency
openended.openendedname.maxvalue
openended.openendedname.meanlatency
openended.openendedname.medianlatency
openended.openendedname.minlatency
openended.openendedname.minvalue
openended.openendedname.multiline
openended.openendedname.name
openended.openendedname.percentcorrect
openended.openendedname.percentinwindow
openended.openendedname.posttrialpause
openended.openendedname.pretrialpause
openended.openendedname.required
openended.openendedname.response
openended.openendedname.responsetext
openended.openendedname.responsex
openended.openendedname.responsey
openended.openendedname.sdlatency
openended.openendedname.sumlatency
openended.openendedname.timestamp
openended.openendedname.totalcorrectcount
openended.openendedname.totalcount
openended.openendedname.totalerrorcount
openended.openendedname.totalmaxlatency
openended.openendedname.totalmeanlatency
openended.openendedname.totalmedianlatency
openended.openendedname.totalminlatency
openended.openendedname.totalnuminwindow
openended.openendedname.totalpercentcorrect
openended.openendedname.totalpercentinwindow
openended.openendedname.totalsdlatency
openended.openendedname.totalsumlatency
openended.openendedname.totaltrialcount
openended.openendedname.totalvarlatency
openended.openendedname.trialcode
openended.openendedname.trialcount
openended.openendedname.trialduration
openended.openendedname.typename
openended.openendedname.varlatency
openended.openendedname.width
openended.openendedname.widthpct
openended.openendedname.widthpx
openended.openendedname.xpct
openended.openendedname.xpx
openended.openendedname.ypct
openended.openendedname.ypx

Functions

openended.openendedname.clearstimulusframes
openended.openendedname.insertstimulusframe
openended.openendedname.insertstimulustime
openended.openendedname.removestimulusframe
openended.openendedname.removestimulustime
openended.openendedname.resetstimulusframes
openended.openendedname.setstimulusframe
openended.openendedname.setstimulustime
openended.openendedname.stimulusframe
openended.openendedname.stimulustime

Remarks

The openended element controls the timing and the content of stimulus presentation as well as how open-ended responses are obtained. Every time a openended element is executed, a line of data is written to the data file.

The respondent can advance past this trial by hitting ENTER if openended is single line expecting keyboard input, and Ctrl+ENTER if it's multiline or set to mouse input. The default input for openended is mouse input, which enables the respondent to advance by clicking the openended element's button.

Examples

The following displays a text entry box at the bottom of the screen, sets the line length to 40 characters, and the total number of lines in the box to 3:

<openended question>
/ stimulusframes=[1=sometext]
/ position = (50, 90)
/ linelength = 40
/ numlines = 3
</openended>


surveypage element

The surveypage element presents a page of survey questions.

Syntax

<surveypage surveypagename>
/ backbuttonposition = (x value, y value)
/ backlabel = "label"
/ branch = [if expression then event]
/ caption = "text"
/ datastreams = (eyetracker) or eyetracker or false
/ finishlabel = "label"
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ inputmask = "bit mask"
/ itemfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ itemspacing = height or expression
/ navigationbuttonfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ navigationbuttonsize = (width variable, height variable)
/ nextbuttonposition = (x value, y value)
/ nextlabel = "label"
/ numframes = integer
/ ontrialbegin = [expression; expression; expression; ...]
/ ontrialend = [expression; expression; expression; ...]
/ orientation = layout
/ posttrialpause = integer expression
/ posttrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ pretrialpause = integer expression
/ pretrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ questions = [questionnumber, questionnumber = questionname; questionnumber-questionnumber = selectmode(questionname, questionname,...); questionnumber, questionnumber-questionnumber = questionname]
/ recorddata = boolean
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ screencapture = boolean
/ showbackbutton = boolean
/ shownextbutton = boolean
/ showpagenumbers = boolean
/ showquestionnumbers = boolean
/ skip = [expression; expression; expression; ...]
/ soundcapture = boolean
/ stimulusframes = [framenumber = stimulusname, stimulusname, ...; framenumber = stimulusname, ...] or [framenumber = list.name] or [framenumber = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stimulustimes = [time = stimulusname, stimulusname, ...; time = stimulusname, ...] or [time = list.name] or [time = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stop = [expression; expression; expression; ...]
/ subcaption = "text"
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ timeout = integer expression
/ txcolor = (red value, green value, blue value) or color name or color value
</surveypage>

Properties

surveypage.surveypagename.backlabel
surveypage.surveypagename.caption
surveypage.surveypagename.correct
surveypage.surveypagename.correctcount
surveypage.surveypagename.correctstreak
surveypage.surveypagename.count
surveypage.surveypagename.currentquestionnumber
surveypage.surveypagename.error
surveypage.surveypagename.errorcount
surveypage.surveypagename.errorstreak
surveypage.surveypagename.finishlabel
surveypage.surveypagename.fontheight
surveypage.surveypagename.inputmask
surveypage.surveypagename.inwindow
surveypage.surveypagename.itemfontheight
surveypage.surveypagename.itemspacing
surveypage.surveypagename.latency
surveypage.surveypagename.leftmargin
surveypage.surveypagename.maxlatency
surveypage.surveypagename.meanlatency
surveypage.surveypagename.medianlatency
surveypage.surveypagename.minlatency
surveypage.surveypagename.name
surveypage.surveypagename.navigationbuttonheight
surveypage.surveypagename.navigationbuttonwidth
surveypage.surveypagename.nextlabel
surveypage.surveypagename.percentcorrect
surveypage.surveypagename.percentinwindow
surveypage.surveypagename.posttrialpause
surveypage.surveypagename.pretrialpause
surveypage.surveypagename.response
surveypage.surveypagename.responsefontheight
surveypage.surveypagename.rightmargin
surveypage.surveypagename.sdlatency
surveypage.surveypagename.showbackbutton
surveypage.surveypagename.shownextbutton
surveypage.surveypagename.showpagenumbers
surveypage.surveypagename.showquestionnumbers
surveypage.surveypagename.subcaption
surveypage.surveypagename.subcaptionfontheight
surveypage.surveypagename.sumlatency
surveypage.surveypagename.topmargin
surveypage.surveypagename.totalcorrectcount
surveypage.surveypagename.totalcount
surveypage.surveypagename.totalerrorcount
surveypage.surveypagename.totalmaxlatency
surveypage.surveypagename.totalmeanlatency
surveypage.surveypagename.totalmedianlatency
surveypage.surveypagename.totalminlatency
surveypage.surveypagename.totalnuminwindow
surveypage.surveypagename.totalpercentcorrect
surveypage.surveypagename.totalpercentinwindow
surveypage.surveypagename.totalsdlatency
surveypage.surveypagename.totalsumlatency
surveypage.surveypagename.totaltrialcount
surveypage.surveypagename.totalvarlatency
surveypage.surveypagename.trialcode
surveypage.surveypagename.trialcount
surveypage.surveypagename.trialduration
surveypage.surveypagename.typename
surveypage.surveypagename.varlatency

Functions

surveypage.surveypagename.clearstimulusframes
surveypage.surveypagename.insertstimulusframe
surveypage.surveypagename.insertstimulustime
surveypage.surveypagename.removestimulusframe
surveypage.surveypagename.removestimulustime
surveypage.surveypagename.resetstimulusframes
surveypage.surveypagename.setstimulusframe
surveypage.surveypagename.setstimulustime
surveypage.surveypagename.stimulusframe
surveypage.surveypagename.stimulustime

Remarks

The surveypage element is a specialized type of trial that presents one or more survey questions. A survey page may be presented as part of a sequence of pages in a survey element, or it can be presented like as a trial trials in a block element. Survey pages can present multiple choice, free text, and slider questions, as well as plain text, images, and even rapid sequences of stimuli (pictures, video, text, sound, port signals) just like regular trials.

Examples

The following surveypage displays three questions:

<surveypage mypage>
/caption = "Please answer the following items to the best of your ability"
/ questions=[1=q1; 2=q2; 3=q3]
</surveypage>

The following surveypage displays three questions, no back button, a custom label on the next button. At the end of the page, it sets a custom value based on the response to the first question.

<surveypage mypage>
/caption = "Please answer the following items to the best of your ability"
/ questions=[1=q1; 2=q2; 3=q3]
/ showbackbutton=false
/ nextlabel="Forward"
/ ontrialend = [if (radiobuttons.q1.response == 1) values.sex = "female"]
</surveypage>


response element

The response element specifies the procedure for obtaining and measuring responses.

Syntax

<response responsename>
/ mode = responsemode
/ rwcenter = integer
/ rwdeccondition = [(percentcorrect, latency), (percentcorrect, latency), ...]
/ rwdecunit = integer
/ rwhitduration = integer
/ rwhitstimulus = stimulusname
/ rwinccondition = [(percentcorrect, latency), (percentcorrect, latency), ...]
/ rwincunit = integer
/ rwlatencymetric = latencymetric
/ rwmaxcenter = integer
/ rwmincenter = integer
/ rwmissstimulus = stimulusname
/ rwstimulus = stimulusname
/ rwwidth = integer
/ srsignal = voicesignal
/ timeout = integer expression
</response>

Properties

response.responsename.name
response.responsename.timeout
response.responsename.typename
response.responsename.windowcenter
response.responsename.windowdecthreshold
response.responsename.windowdecunit
response.responsename.windowhitduration
response.responsename.windowincthreshold
response.responsename.windowincunit
response.responsename.windowmaxcenter
response.responsename.windowmincenter
response.responsename.windowoffset
response.responsename.windowonset
response.responsename.windowwidth

Functions

None.

Remarks

Once a response element has been defined, it can be assigned to the response attribute of expt, block, or trial element in order to define the response procedure. Trial settings taking precedence over block settings, and block settings take precedence over expt settings.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>

The following response specifies that trial advances when either a correct response is given or a two second timeout elapses.

<response myresponse>
/ mode = correct
/ timeout = 2000
</response>


Keyboard Scan Codes

Inquisit records the Scan Code of the subject's response in the response column of the data file. Each key on the keyboard has a single, unique scan code, given in the table below.

Scancode | Keyboard Key
1 | ESC
2 | 1
3 | 2
4 | 3
5 | 4
6 | 5
7 | 6
8 | 7
9 | 8
10 | 9
11 | 0
12 | -
13 | =
14 | bs
15 | Tab
16 | Q
17 | W
18 | E
19 | R
20 | T
21 | Y
22 | U
23 | I
24 | O
25 | P
26 | [
27 | ]
28 | Enter
29 | CTRL
30 | A
31 | S
32 | D
33 | F
34 | G
35 | H
36 | J
37 | K
38 | L
39 | ;
40 | '
41 | `
42 | LShift
43 | \
44 | Z
45 | X
46 | C
47 | V
48 | B
49 | N
50 | M
51 | ,
52 | .
53 | /
54 | RShift
55 | PrtSc
56 | Alt
57 | Space
58 | Caps
59 | F1
60 | F2
61 | F3
62 | F4
63 | F5
64 | F6
65 | F7
66 | F8
67 | F9
68 | F10
69 | Num
70 | Scroll
71 | Home (7)
72 | Up (8)
73 | PgUp (9)
74 | -
75 | Left (4)
76 | Center (5)
77 | Right (6)
78 | +
79 | End (1)
80 | Down (2)
81 | PgDn (3)
82 | Ins
83 | Del


block element

The block element defines a sequence of trials and instruction pages to be run.

Syntax

<block blockname>
/ bgstim = (stimulusname, stimulusname, stimulusname)
/ blockfeedback = (metric, metric, metric, ...)
/ branch = [if expression then event]
/ correctmessage = false or true(stimulusname, duration)
/ correcttarget = (property, target, maxblocks)
/ datastreams = (eyetracker) or eyetracker or false
/ errormessage = false or true(stimulusname, duration)
/ latencytarget = (property, target, maxblocks)
/ onblockbegin = [expression; expression; expression; ...]
/ onblockend = [expression; expression; expression; ...]
/ ontrialbegin = [expression; expression; expression; ...]
/ ontrialend = [expression; expression; expression; ...]
/ postinstructions = (pagename, pagename, pagename, ...)
/ preinstructions = (pagename, pagename, pagename, ...)
/ quit = [expression; expression; expression; ...]
/ recorddata = boolean
/ response = responsename or timeout(milliseconds) or window(center, width, stimulusname) or responsemode
/ screencapture = boolean
/ screencolor = (red value, green value, blue value) or color name or color value
/ showmousecursor = boolean
/ skip = [expression; expression; expression; ...]
/ soundcapture = boolean
/ stop = [expression; expression; expression; ...]
/ timeout = integer expression
/ trials = [trialnumber, trialnumber = trialname; trialnumber-trialnumber = selectmode(trialname, trialname,...); trialnumber, trialnumber-trialnumber = trialname] or [trialnumber-trialnumber = list.name]
</block>

Properties

block.blockname.correct
block.blockname.correctcount
block.blockname.correctstreak
block.blockname.count
block.blockname.currentblocknumber
block.blockname.currenttrialnumber
block.blockname.elapsedtime
block.blockname.error
block.blockname.errorcount
block.blockname.errorstreak
block.blockname.inwindow
block.blockname.latency
block.blockname.maxlatency
block.blockname.meanlatency
block.blockname.medianlatency
block.blockname.minlatency
block.blockname.name
block.blockname.percentcorrect
block.blockname.percentinwindow
block.blockname.recorddata
block.blockname.response
block.blockname.responsemonitor
block.blockname.responsetext
block.blockname.responsex
block.blockname.responsey
block.blockname.screencapture
block.blockname.screencolor
block.blockname.screencolorblue
block.blockname.screencolorgreen
block.blockname.screencolorred
block.blockname.sdlatency
block.blockname.showmousecursor
block.blockname.sumlatency
block.blockname.timeout
block.blockname.timestamp
block.blockname.totalcorrectcount
block.blockname.totalcount
block.blockname.totalerrorcount
block.blockname.totalmaxlatency
block.blockname.totalmeanlatency
block.blockname.totalmedianlatency
block.blockname.totalminlatency
block.blockname.totalnuminwindow
block.blockname.totalpercentcorrect
block.blockname.totalpercentinwindow
block.blockname.totalsdlatency
block.blockname.totalsumlatency
block.blockname.totaltrialcount
block.blockname.totalvarlatency
block.blockname.trialcount
block.blockname.trialscount
block.blockname.typename
block.blockname.varlatency

Functions

None.

Remarks

The primary function of the block element is to define a randomly selected or sequentially ordered set of trials to run. The block element also controls whether instructions are provided at the beginning and end of the block, and whether summary performance feedback (average latency, percent correct) is given at the block's conclusion.

By default, all random selection pools for trials and stimulus items are reset at the end of a block. For example, if any stimulus items are selected without replacement (the default selection algorithm), all of the stimuli are replaced into the selection pool after each block is finished. To preserve selection pools across multiple blocks, use the resetinterval attribute.

Examples

The following block runs ten trials, randomly selecting trial1 and trial2 for five trials each. The block also presents two background stimuli.

<block myblock>
/ trials=[1-10=noreplace(trial1, trial2)]
/ bgstim=(remindertext, instructiontext)
</block>

The following block runs ten trials, selecting trial1 for the first five and trial2 for the second five. Three instruction pages are displayed before and after the trials are run.

<block myblock>
/ trials=[1-5=trial1; 6-10=trial2]
/ preinstructions=(page1, page2, page3)
/ postinstructions=(page4, page5, page6)
</block>


survey element

The survey element defines a sequence of one or more pages containing question and response items.

Syntax

<survey surveyname>
/ backbuttonposition = (x value, y value)
/ backlabel = "label"
/ branch = [if expression then event]
/ file = "location"
/ datastreams = (eyetracker) or eyetracker or false
/ encrypt = true("password") or false
/ finishlabel = "label"
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ itemfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ itemspacing = height or expression
/ navigationbuttonfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ navigationbuttonsize = (width variable, height variable)
/ nextbuttonposition = (x value, y value)
/ nextlabel = "label"
/ nextlabel = "label"
/ onblockbegin = [expression; expression; expression; ...]
/ onblockend = [expression; expression; expression; ...]
/ ontrialbegin = [expression; expression; expression; ...]
/ ontrialend = [expression; expression; expression; ...]
/ orientation = layout
/ pagefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ pages = [pagenumber, pagenumber = pagename; pagenumber-pagenumber = selectmode(pagename, pagename,...); pagenumber, pagenumber-pagenumber = pagename]
/ password = "string"
/ recorddata = boolean
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ screencolor = (red value, green value, blue value) or color name or color value
/ showbackbutton = boolean
/ shownextbutton = boolean
/ showpagenumbers = boolean
/ showquestionnumbers = boolean
/ skip = [expression; expression; expression; ...]
/ soundcapture = boolean
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ timeout = integer expression
/ txcolor = (red value, green value, blue value) or color name or color value
/ userid = "string"
</survey>

Properties

survey.surveyname.backlabel
survey.surveyname.correct
survey.surveyname.correct
survey.surveyname.correctcount
survey.surveyname.correctcount
survey.surveyname.correctstreak
survey.surveyname.correctstreak
survey.surveyname.count
survey.surveyname.count
survey.surveyname.currentblocknumber
survey.surveyname.currentpagenumber
survey.surveyname.currentquestionnumber
survey.surveyname.currenttrialnumber
survey.surveyname.elapsedtime
survey.surveyname.error
survey.surveyname.errorcount
survey.surveyname.errorstreak
survey.surveyname.finishlabel
survey.surveyname.fontheight
survey.surveyname.inwindow
survey.surveyname.inwindow
survey.surveyname.itemfontheight
survey.surveyname.itemspacing
survey.surveyname.latency
survey.surveyname.latency
survey.surveyname.leftmargin
survey.surveyname.maxlatency
survey.surveyname.maxlatency
survey.surveyname.meanlatency
survey.surveyname.meanlatency
survey.surveyname.medianlatency
survey.surveyname.medianlatency
survey.surveyname.minlatency
survey.surveyname.minlatency
survey.surveyname.name
survey.surveyname.name
survey.surveyname.navigationbuttonheight
survey.surveyname.navigationbuttonwidth
survey.surveyname.nextlabel
survey.surveyname.pagefontheight
survey.surveyname.percentcorrect
survey.surveyname.percentcorrect
survey.surveyname.percentinwindow
survey.surveyname.percentinwindow
survey.surveyname.recorddata
survey.surveyname.response
survey.surveyname.responsefontheight
survey.surveyname.rightmargin
survey.surveyname.screencolorblue
survey.surveyname.screencolorblue
survey.surveyname.screencolorgreen
survey.surveyname.screencolorgreen
survey.surveyname.screencolorred
survey.surveyname.screencolorred
survey.surveyname.sdlatency
survey.surveyname.showbackbutton
survey.surveyname.shownextbutton
survey.surveyname.showpagenumbers
survey.surveyname.showquestionnumbers
survey.surveyname.subcaptionfontheight
survey.surveyname.sumlatency
survey.surveyname.topmargin
survey.surveyname.totalcorrectcount
survey.surveyname.totalcount
survey.surveyname.totalerrorcount
survey.surveyname.totalmaxlatency
survey.surveyname.totalmeanlatency
survey.surveyname.totalmedianlatency
survey.surveyname.totalminlatency
survey.surveyname.totalnuminwindow
survey.surveyname.totalpercentcorrect
survey.surveyname.totalpercentinwindow
survey.surveyname.totalsdlatency
survey.surveyname.totalsumlatency
survey.surveyname.totaltrialcount
survey.surveyname.totalvarlatency
survey.surveyname.trialcount
survey.surveyname.trialscount
survey.surveyname.trialscount
survey.surveyname.typename
survey.surveyname.typename
survey.surveyname.varlatency

Functions

None.

Remarks

Examples

The following survey contains 3 pages and allows forward navigation only.

<survey customersat>
/ pages=[1=page1; 2=page2; 3=page3]
/ showbackbutton=false
/ finishlabel = "Thank you!"
/ screencolor = white
</survey>


instruct element

The instruct element specifies how instruction pages are presented in the script.

Syntax

<instruct>
/ finishlabel = "label"
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ inputdevice = modality
/ navigationbuttonfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ nextkey = ("character") or (scancode) or (signal)
/ nextlabel = "label"
/ prevkey = ("character") or (scancode) or (signal)
/ prevlabel = "label"
/ screencolor = (red value, green value, blue value) or color name or color value
/ timeout = integer expression
/ txcolor = (red value, green value, blue value) or color name or color value
/ voiceover = boolena(language, gender, age, rate)
/ wait = integer
/ windowsize = (width variable, height variable)
</instruct>

Properties

instruct.backlabel
instruct.finishlabel
instruct.fontheight
instruct.height
instruct.heightpct
instruct.heightpx
instruct.name
instruct.nextlabel
instruct.screencolor
instruct.screencolorblue
instruct.screencolorgreen
instruct.screencolorred
instruct.textcolor
instruct.textcolorblue
instruct.textcolorgreen
instruct.textcolorred
instruct.timeout
instruct.typename
instruct.voiceover
instruct.wait
instruct.width
instruct.widthpct
instruct.widthpx

Functions

None.

Remarks

The instruct element allows customization of how instruction pages are displayed on the screen and the means by which subjects can navigate backwards and forwards through the pages. Only one instruct element may be defined in a script.

Examples

The following sets the font and size of the instruction pages and indicates that the page must be displayed for at least one second before the participant can advance.

<instruct>
/ fontstyle = ("Verdana", 12pt, true)
/ windowsize = (800px, 600px)
/ wait = 1000
</instruct>


page element

The page element defines a page of instruction or feedback text.

Syntax

<page pagename>
This element has no attributes
</page>

Properties

page.pagename.content
page.pagename.expression
page.pagename.name
page.pagename.typename

Functions

None.

Remarks

The page element is used to define simple pages of text to be displayed as instructions using the preinstructions or postinstructions attribute. Tab and space characters occuring within the page definition will also appear in the instruction page as displayed. Line breaks, however, are stripped out prior to display. To force a line break, use the special character "^".

Inquisit provides built-in support for reporting accuracy, latency and response window measures at the end of a block of trials using the blockfeedback attribute. The page element also supports customized reporting of a wide variety of performance statistics factored by trial or block type and aggregated over the course of a single block or the entire experiment. The current value of a given measure for a given trial or block can be inserted anywhere within the text of an instruction page by specifying the type of element, element's name, and the name of the measure as follows:
<% type.name.property %>

The text of pages can be richly formatted using a subset of supported HTML markup tags. For example, markup tags can be used to make selected words appear in bold, italics, a different font, or a different color. For more information on formatting options, see Using HTML Markup in Text

Examples

The following page reports various latency measures for a "nonword" trial:

<page report>
^^ Your average response time on nonword trials was <% trial.nonword.meanlatency %> milliseconds.
^^ Your fastest response on nonword trials was <% trial.nonword.minlatency %> milliseconds.
^^ Your slowest response on nonword trials was <% trial.nonword.maxlatency %> milliseconds.
</page>


htmlpage element

The htmlpage element defines an HTML formatted instruction page.

Syntax

<htmlpage htmlpagename>
/ file = "path"
</htmlpage>

Properties

htmlpage.htmlpagename.file
htmlpage.htmlpagename.name
htmlpage.htmlpagename.typename

Functions

None.

Remarks

The htmlpage element is used to define pages of text to be displayed as instructions using the preinstructions or postinstructions attribute. The htmlpage element is useful when complete control over formatting and content of instruction pages is required, otherwise the page element provides an easier way to display text with basic formatting. The actual content of the page is contained in a separate HTML file located on the local machine or the web.

Inquisit provides built-in support for reporting accuracy, latency and response window measures at the end of a block of trials using the blockfeedback attribute. The htmlpage element also supports customized reporting of a wide variety of performance statistics factored by trial or block type and aggregated over the course of a single block or the entire experiment. The current value of a given measure for a given trial or block can be inserted anywhere within the text of an instruction page by specifying the type of element, element's name, and the name of the measure as follows:

<% type.name.property%>

Examples

The following htmlpage consists of content in an html file located on millisecond.com.

<htmlpage intro>
/ file="https://www.millisecond.com/pages/intro.htm"
</htmlpage>


batch element

The batch element allows a group of Inquisit scripts to be run in sequence.

Syntax

<batch>
/ directory = "location"
/ file = "path"
/ groupassignment = assignment
/ groups = (integer, integer, integer, ... of modulus)
/ onscriptbegin = value
/ onscriptend = value
/ requiredpermissions = (permission, permission, ...)
/ selectionmode = selectionmode or expression
/ sessions = (integer, integer, integer, ... of modulus)
</batch>

Properties

batch.currentgroupnumber
batch.currentscript
batch.directory
batch.file
batch.groupcount
batch.name
batch.typename

Functions

None.

Remarks

The batch element should be defined in a separate script file. The batch element may not include own script file in its list of files.

Examples

The following batch runs three scripts files in sequence. The files are located in the same directory as the batch file.

<batch>
/ file="script1.iqx"
/ file="script2.iqx"
/ file="script3.iqx"
</batch>

The following batch runs three scripts files in different orders for even and odd numbered group ids. The files are located in the same directory as the batch file.

<batch>
/ groups=(1 of 2)
/ file="script1.iqx"
/ file="script2.iqx"
/ file="script3.iqx"
</batch>

<batch>
/ groups=(2 of 2)
/ file="script3.iqx"
/ file="script2.iqx"
/ file="script1.iqx"
</batch>

The following batch runs one of three depending on the session number. The files are located in the same directory as the batch file.

<batch>
/ sessions=(1 of 3)
/ file="phase1.iqx"
</batch>

<batch>
/ sessions=(2 of 3)
/ file="phase2.iqx"
</batch>

<batch>
/ sessions=(3 of 3)
/ file="phase3.iqx"
</batch>


expt element

The expt element defines a sequence of blocks and instruction pages to be run.

Syntax

<expt exptname>
/ blocks = [blocknumber, blocknumber = blockname;blocknumber = list.name; blocknumber-blocknumber = selectmode(blockname, blockname,...); blocknumber, blocknumber-blocknumber = blockname]
/ correctmessage = false or true(stimulusname, duration)
/ datastreams = (eyetracker) or eyetracker or false
/ errormessage = false or true(stimulusname, duration)
/ groupassignment = assignment
/ groups = (integer, integer, integer, ... of modulus)
/ onblockbegin = [expression; expression; expression; ...]
/ onblockend = [expression; expression; expression; ...]
/ onexptbegin = [expression; expression; expression; ...]
/ onexptend = [expression; expression; expression; ...]
/ ontrialbegin = [expression; expression; expression; ...]
/ ontrialend = [expression; expression; expression; ...]
/ postinstructions = (pagename, pagename, pagename, ...)
/ preinstructions = (pagename, pagename, pagename, ...)
/ quit = [expression; expression; expression; ...]
/ recorddata = boolean
/ response = responsename or timeout(milliseconds) or window(center, width, stimulusname) or responsemode
/ screencapture = boolean
/ sessions = (integer, integer, integer, ... of modulus)
/ showmousecursor = boolean
/ skip = [expression; expression; expression; ...]
/ soundcapture = boolean
/ stop = [expression; expression; expression; ...]
/ subjects = (integer, integer, integer, ... of modulus)
/ timeout = integer expression
</expt>

Properties

expt.exptname.blockscount
expt.exptname.correct
expt.exptname.correctcount
expt.exptname.correctstreak
expt.exptname.count
expt.exptname.currentblocknumber
expt.exptname.currentgroupnumber
expt.exptname.currenttrialnumber
expt.exptname.elapsedtime
expt.exptname.error
expt.exptname.errorcount
expt.exptname.errorstreak
expt.exptname.groupcount
expt.exptname.inwindow
expt.exptname.latency
expt.exptname.maxlatency
expt.exptname.meanlatency
expt.exptname.medianlatency
expt.exptname.minlatency
expt.exptname.name
expt.exptname.percentcorrect
expt.exptname.percentinwindow
expt.exptname.recorddata
expt.exptname.response
expt.exptname.responsemonitor
expt.exptname.responsetext
expt.exptname.responsex
expt.exptname.responsey
expt.exptname.screencapture
expt.exptname.sdlatency
expt.exptname.showmousecursor
expt.exptname.sumlatency
expt.exptname.timeout
expt.exptname.timestamp
expt.exptname.totalcorrectcount
expt.exptname.totalcount
expt.exptname.totalerrorcount
expt.exptname.totalmaxlatency
expt.exptname.totalmeanlatency
expt.exptname.totalmedianlatency
expt.exptname.totalminlatency
expt.exptname.totalnuminwindow
expt.exptname.totalpercentcorrect
expt.exptname.totalpercentinwindow
expt.exptname.totalsdlatency
expt.exptname.totalsumlatency
expt.exptname.totaltrialcount
expt.exptname.totalvarlatency
expt.exptname.trialcount
expt.exptname.typename
expt.exptname.varlatency

Functions

None.

Remarks

The primary function of the expt element is to define a randomly selected or sequentially ordered set of blocks to run. The expt element also controls whether instructions are provided at the beginning and end of the script.

Examples

The following expt runs one practice block followed by ten test blocks. An "intro" instruction page is displayed at the beginning of the script, and an "end" instruction page is displayed at the end.

<expt>
/ blocks=[1=practice; 2-11=test]
/ preinstructions = (intro)
/ postinstructions = (end)
</expt>


include element

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

Syntax

<include includename>
/ file = "path"
/ file = "path"
/ file = "path"
/ precondition = [expression; expression; expression; ...]
</include>

Properties

include.includename.file
include.includename.name
include.includename.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=[computer.platform == "win"]
/ file="wmv_videos.iqx"
</include>

            <include>
/ precondition=[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>


data element

The data element specifies how data is recorded in the data file.

Syntax

<data>
/ columns = (columnname, columnname, columnname, property, property, property)
/ file = "location"
/ encrypt = true("password") or false
/ filter = [expression; expression; expression; ...]
/ labels = ("label", "label", "label", ...)
/ password = "string"
/ separatefiles = boolean
/ userid = "string"
</data>

Properties

data.encrypt
data.encryptionkey
data.file
data.name
data.password
data.recorddata
data.typename
data.userid

Functions

None.

Remarks

The data element allows customization of data recording, including specifying which data is recorded, the format of the data file, and the location where the data are saved. If no data element is defined, Inquisit uses a default data recording scheme.

Examples

The following records 10 columns to an encrypted data file on an web server.

<data>
/ columns=[subject, blockcode, trialcode, trialnum, latency, response, stimulusitem, stimulusnumber, stimulusitem, stimulusnumber]
/ file="https://storage.millisecond.com/mydata/"
/ userid="sean"
/ password="open sesame"
/ encrypt=true("password")
</data>


summarydata element

The summarydata element specifies a set of summary data for to be recorded for a given participant.

Syntax

<summarydata>
/ file = "location"
/ encrypt = true("password") or false
/ password = "string"
/ separatefiles = boolean
/ columns = (property, property, property, ...)
/ userid = "string"
</summarydata>

Properties

summarydata.encrypt
summarydata.encryptionkey
summarydata.file
summarydata.name
summarydata.password
summarydata.recorddata
summarydata.typename
summarydata.userid

Functions

None.

Remarks

The summarydata element enables a script to record a single row of summary data for each participant that runs a script. Typically, the summarydata element is used to save metrics that capture participants' overall performance on the script. The summary statics are saved to a separate file as the raw, trail-by-trial data file. Recording all of the relevant performance metrics into a summary data file can simplify data analysis by avoiding the often complicated process of calculating these metrics from the raw data. Summary data are saved as tab-delimited text.

Examples

The following records the subject id, start date, start time, and three performance metrics for each participant.

<summarydata>
/ columns=[script.subjectid, script.startdate, script.starttime, expressions.da, expressions.db, expressions.d]
/ file="iat_summary.iqdat"
</summarydata>


monkey element

The monkey element enables you to customize the performance of the Inquisit test monkey.

Syntax

<monkey>
/ latencydistribution = constant(mean) or normal(mean, sd) or uniform(min, max)
/ percentcorrect = integer
</monkey>

Properties

monkey.maxlatency
monkey.meanlatency
monkey.minlatency
monkey.monkeymode
monkey.percentcorrect
monkey.sdlatency

Functions

None.

Remarks

For help on using the monkey, see How to Test an Experiment. Please treat the monkey kindly.

Examples

The following specifies that the monkey's latencies are randomly selected from a normal distibution, with a mean of 200 and standard deviation of 10. Each response is 95% likely to be correct.

<monkey>
/ latencydistribution = normal(200, 10)
/ percentcorrect = 95
</monkey>

The following specifies that the monkey's latencies are randomly selected from a uniform distribution ranging from 100 to 500 milliseconds. Each response is 50% likely to be correct.

<monkey>
/ latencydistribution = uniform(100, 500)
/ percentcorrect = 50
</monkey>

The following specifies that the monkey's latencies are always 250 milliseconds. Each response is 75% likely to be correct.

<monkey>
/ latencydistribution = constant(250)
/ percentcorrect = 75
</monkey>


Inquisit Data Output

Inquisit saves test results in a non-proprietary tab-delimited text format that can be easily imported into other data processing applications such as Excel, SPSS, etc. Data files are encoded as UTF-8, and can thus handle any character set.

Most tests in the Millisecond Library are configured to output both raw and a summary data files. The summary data file contains a single line of summary data for the session. This includes the date and time of the session, participant identifier, whether the test was completed, and custom metrics summarizing their performance on the measure. The raw data file contains a complete audit of the session (including every stimulus, response, response time, etc.) and can be used to compute custom metrics and deeper analyses not captured in the summary data file.

For help understanding what each field in a data file means, see the User Manual for the test, which can be found at the top of the test script as well as on the test page in the Millisecond Test Library.

Inquisit Lab

By default, Inquisit Lab saves data files in a directory called "data" located under the folder containing the test script. For example, if you copy a test to the directory "C:\MyExperiments\" on your computer, the data files will be saved to "C:\MyExperiments\data\". You can customize the data output folder by setting the file attribute on the data element. Network drives are supported.

Data from each session are saved as separate files. You can combine all of the summary or raw files across sessions using the Merge Data Files... command on Inquisit Lab's file menu. You can export the data as an Excel spreadsheet using the "Export to Excel..." command on the File menu.

These files can be freely copied, moved, or deleted using standard operating tools. Backing up your data is highly recommended and can be easily accomplished by adding data folders to the include list of your preferred backup software. Windows and Mac both provide mechanisms to encrypt your data folders to prevent access if the machine is lost or stolen. If your Inquisit Lab registration expires, or you uninstall Inquisit Lab, your test scripts and data files will remain on the computer.

Inquisit Web

Data files from each session on Inquisit Web are uploaded into your account on millisecond.com at the end of the session. You can login to https://myaccount.millisecond.com/data and download the combined files as Tab-delimited, CSV, or Excel format. You can also download the separate files packaged in a zip.

Customizing Data Output

The data recorded by a given test is fully customizable using the data element. The columns attribute on the data element allows you to specify any property or field defined within the test as a data field so it's value is recorded in the data file.

If no columns are specified, Inquisit outputs the following defaults:

  1. Current date (mmddyy)

  2. Experiment starting time (hh:mm)

  3. Group id

  4. Subject id

  5. Block number

  6. Trial number

  7. Trial code

  8. Pretrialpause (ms)

  9. Posttrialpause (ms)

  10. Scan code of the key with which the subject responded

  11. Whether or not the given response was the correct response

  12. Response latency (ms following the end of the last display frame).

  13. The next N variables are the item numbers of the stimuli shown on each trial recorded in the order in which those stimuli were presented. N is equal to the greatest number of stimuli presented on any single trial defined in the script. For trials on which less than N stimuli were presented, a value of 0 is recorded in the extra columns.


caption element

The caption element defines a survey item consisting of just a caption and subcaption.

Syntax

<caption captionname>
/ caption = "text"
/ defaultresponse = "text" or property or expression
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ position = (x value, y value)
/ size = (width variable, height variable)
/ subcaption = "text"
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ txcolor = (red value, green value, blue value) or color name or color value
</caption>

Properties

caption.captionname.caption
caption.captionname.fontheight
caption.captionname.height
caption.captionname.heightpct
caption.captionname.heightpx
caption.captionname.hposition
caption.captionname.name
caption.captionname.subcaption
caption.captionname.subcaptionfontheight
caption.captionname.typename
caption.captionname.vposition
caption.captionname.width
caption.captionname.widthpct
caption.captionname.widthpx
caption.captionname.xpct
caption.captionname.xpx
caption.captionname.ypct
caption.captionname.ypx

Functions

None.

Remarks

The caption element allows you to insert additional text and instructions into a survey that do not require a response from participants.

Examples

The following caption item displays a caption and subcaption.

<caption q1>
/ caption="Remember to tell the experimenter when you are finished with the survey"
/ subcaption="(The experimenter is sitting in the adjacent room.)"
</caption>


checkboxes element

The checkboxes element defines a survey item that allows respondents to check off one or more options.

Syntax

<checkboxes checkboxesname>
/ caption = "text"
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ defaultresponse = "text" or property or expression
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ monkeyresponse = ("string", "string",...) or (scancode, scancode, ...) or (property, property, ...) or [expression; expression; expression;...]
/ options = ("label", "label", "label", ...)
/ optionvalues = ("value", "value", "value", ...)
/ order = order mode
/ orientation = layoutoption
/ other = "caption" or textbox
/ position = (x value, y value)
/ range = (minimum, maximum)
/ required = boolean
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ size = (width variable, height variable)
/ subcaption = "text"
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ txcolor = (red value, green value, blue value) or color name or color value
/ txcolor = (red value, green value, blue value) or color name or color value
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
</checkboxes>

Properties

checkboxes.checkboxesname.caption
checkboxes.checkboxesname.fontheight
checkboxes.checkboxesname.height
checkboxes.checkboxesname.heightpct
checkboxes.checkboxesname.heightpx
checkboxes.checkboxesname.hposition
checkboxes.checkboxesname.maxvalue
checkboxes.checkboxesname.minvalue
checkboxes.checkboxesname.name
checkboxes.checkboxesname.required
checkboxes.checkboxesname.response
checkboxes.checkboxesname.responsefontheight
checkboxes.checkboxesname.selected
checkboxes.checkboxesname.selectedcaption
checkboxes.checkboxesname.selectedcount
checkboxes.checkboxesname.selectedcount
checkboxes.checkboxesname.selectedvalue
checkboxes.checkboxesname.subcaption
checkboxes.checkboxesname.subcaptionfontheight
checkboxes.checkboxesname.typename
checkboxes.checkboxesname.vposition
checkboxes.checkboxesname.width
checkboxes.checkboxesname.width
checkboxes.checkboxesname.widthpct
checkboxes.checkboxesname.widthpx
checkboxes.checkboxesname.xpct
checkboxes.checkboxesname.xpx
checkboxes.checkboxesname.ypct
checkboxes.checkboxesname.ypx

Functions

None.

Remarks

Checkboxes are useful for questions in which the respondent may choose more than one option.

Examples

The following checkbox item requires the respondent to select at least one option.

<checkboxes q1>
/ caption="Pick one or more of the following numbers:"
/ required = true
/ options=("one", "eight", "seventy-two")
</checkboxes>


dropdown element

The dropdown element defines a survey item in which respondents select an option from a dropdown list.

Syntax

<dropdown dropdownname>
/ caption = "text"
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ defaultresponse = "text" or property or expression
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ listsize = (width, height)
/ options = ("label", "label", "label", ...)
/ optionvalues = ("value", "value", "value", ...)
/ order = order mode
/ orientation = layout
/ position = (x value, y value)
/ required = boolean
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ size = (width variable, height variable)
/ subcaption = "text"
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ txcolor = (red value, green value, blue value) or color name or color value
/ txcolor = (red value, green value, blue value) or color name or color value
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
</dropdown>

Properties

dropdown.dropdownname.caption
dropdown.dropdownname.fontheight
dropdown.dropdownname.height
dropdown.dropdownname.heightpct
dropdown.dropdownname.heightpx
dropdown.dropdownname.hposition
dropdown.dropdownname.listheight
dropdown.dropdownname.listwidth
dropdown.dropdownname.name
dropdown.dropdownname.option
dropdown.dropdownname.optionvalue
dropdown.dropdownname.required
dropdown.dropdownname.response
dropdown.dropdownname.responsefontheight
dropdown.dropdownname.selected
dropdown.dropdownname.selectedcaption
dropdown.dropdownname.selectedcount
dropdown.dropdownname.selectedvalue
dropdown.dropdownname.subcaption
dropdown.dropdownname.subcaptionfontheight
dropdown.dropdownname.typename
dropdown.dropdownname.vposition
dropdown.dropdownname.width
dropdown.dropdownname.width
dropdown.dropdownname.widthpct
dropdown.dropdownname.widthpx
dropdown.dropdownname.xpct
dropdown.dropdownname.xpx
dropdown.dropdownname.ypct
dropdown.dropdownname.ypx

Functions

None.

Remarks

Dropdowns provide a space efficient user interface for selecting from mutually exclusive options.

Examples

The following dropdown item requires the respondent to select at least one option.

<dropdown q1>
/ caption="Who was the first president of the United States:"
/ options=("George Washington", "Abraham Lincoln", "Thomas Jefferson")
/ required=true
</dropdown>


image element

The image element defines a survey item that presents a captioned image.

Syntax

<image imagename>
/ caption = "text"
/ defaultresponse = "text" or property or expression
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ imagesize = (width variable, height variable)
/ items = itemname or ("path", "path", "path",... )
/ position = (x value, y value)
/ size = (width variable, height variable)
/ subcaption = "text"
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ txcolor = (red value, green value, blue value) or color name or color value
</image>

Properties

image.imagename.caption
image.imagename.fontheight
image.imagename.height
image.imagename.heightpct
image.imagename.heightpx
image.imagename.hposition
image.imagename.imageheight
image.imagename.imagewidth
image.imagename.name
image.imagename.subcaption
image.imagename.subcaptionfontheight
image.imagename.typename
image.imagename.vposition
image.imagename.width
image.imagename.widthpct
image.imagename.widthpx
image.imagename.xpct
image.imagename.xpx
image.imagename.ypct
image.imagename.ypx

Functions

None.

Remarks

The image element allows you to insert an image into a survey that does not require a response from participants.

Examples

The following image item displays a picture of a logo and a caption.

<image q1>
/ caption="Logo for Brand X"
/ items=("logox.jpg")
</image>


listbox element

The listbox element defines a survey item in which respondents select an option from a list.

Syntax

<listbox listboxname>
/ caption = "text"
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ defaultresponse = "text" or property or expression
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ listsize = (width, height)
/ options = ("label", "label", "label", ...)
/ optionvalues = ("value", "value", "value", ...)
/ order = order mode
/ orientation = layout
/ position = (x value, y value)
/ required = boolean
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ size = (width variable, height variable)
/ subcaption = "text"
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ txcolor = (red value, green value, blue value) or color name or color value
/ txcolor = (red value, green value, blue value) or color name or color value
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
</listbox>

Properties

listbox.listboxname.caption
listbox.listboxname.fontheight
listbox.listboxname.height
listbox.listboxname.heightpct
listbox.listboxname.heightpx
listbox.listboxname.hposition
listbox.listboxname.listheight
listbox.listboxname.listwidth
listbox.listboxname.name
listbox.listboxname.option
listbox.listboxname.optionvalue
listbox.listboxname.required
listbox.listboxname.response
listbox.listboxname.responsefontheight
listbox.listboxname.selected
listbox.listboxname.selectedcaption
listbox.listboxname.selectedcount
listbox.listboxname.selectedvalue
listbox.listboxname.subcaption
listbox.listboxname.subcaptionfontheight
listbox.listboxname.typename
listbox.listboxname.vposition
listbox.listboxname.width
listbox.listboxname.width
listbox.listboxname.widthpct
listbox.listboxname.widthpx
listbox.listboxname.xpct
listbox.listboxname.xpx
listbox.listboxname.ypct
listbox.listboxname.ypx

Functions

None.

Remarks

Examples

The following listbox item requires the respondent to select at least one option.

<listbox q1>
/ caption="Who was the first president of the United States:"
/ options=("George Washington", "Abraham Lincoln", "Thomas Jefferson")
/ required=true
</listbox>


radiobuttons element

The radiobuttons element defines a survey item in which respondents select from a list of mutually exclusive options.

Syntax

<radiobuttons radiobuttonsname>
/ caption = "text"
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ defaultresponse = "text" or property or expression
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ options = ("label", "label", "label", ...)
/ optionvalues = ("value", "value", "value", ...)
/ order = order mode
/ orientation = layoutoption
/ other = "caption" or textbox
/ position = (x value, y value)
/ required = boolean
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ size = (width variable, height variable)
/ subcaption = "text"
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ txcolor = (red value, green value, blue value) or color name or color value
/ txcolor = (red value, green value, blue value) or color name or color value
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
</radiobuttons>

Properties

radiobuttons.radiobuttonsname.caption
radiobuttons.radiobuttonsname.fontheight
radiobuttons.radiobuttonsname.height
radiobuttons.radiobuttonsname.heightpct
radiobuttons.radiobuttonsname.heightpx
radiobuttons.radiobuttonsname.hposition
radiobuttons.radiobuttonsname.name
radiobuttons.radiobuttonsname.option
radiobuttons.radiobuttonsname.optionvalue
radiobuttons.radiobuttonsname.required
radiobuttons.radiobuttonsname.response
radiobuttons.radiobuttonsname.responsefontheight
radiobuttons.radiobuttonsname.selected
radiobuttons.radiobuttonsname.selectedcaption
radiobuttons.radiobuttonsname.selectedcount
radiobuttons.radiobuttonsname.selectedvalue
radiobuttons.radiobuttonsname.subcaption
radiobuttons.radiobuttonsname.subcaptionfontheight
radiobuttons.radiobuttonsname.typename
radiobuttons.radiobuttonsname.vposition
radiobuttons.radiobuttonsname.width
radiobuttons.radiobuttonsname.width
radiobuttons.radiobuttonsname.widthpct
radiobuttons.radiobuttonsname.widthpx
radiobuttons.radiobuttonsname.xpct
radiobuttons.radiobuttonsname.xpx
radiobuttons.radiobuttonsname.ypct
radiobuttons.radiobuttonsname.ypx

Functions

None.

Remarks

Examples

The following radiobuttons item requires the respondent to select at least one option.

<radiobuttons q1>
/ caption="Who was the first president of the United States:"
/ options=("George Washington", "Abraham Lincoln", "Thomas Jefferson")
/ required=true
</radiobuttons>


slider element

The slider element defines a survey item in which responses are made by sliding a thumb control along a continuous line.

Syntax

<slider slidername>
/ caption = "text"
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ defaultresponse = "text" or property or expression
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ handlescale = factor
/ increment = integer
/ labels = ("label", "label", "label", ...)
/ orientation = layout
/ position = (x value, y value)
/ range = (minimum, maximum)
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ showticks = boolean
/ size = (width variable, height variable)
/ slidersize = (width variable, height variable)
/ subcaption = "text"
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ txcolor = (red value, green value, blue value) or color name or color value
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
</slider>

Properties

slider.slidername.caption
slider.slidername.fontheight
slider.slidername.height
slider.slidername.heightpct
slider.slidername.heightpx
slider.slidername.hposition
slider.slidername.name
slider.slidername.response
slider.slidername.responsefontheight
slider.slidername.sliderheight
slider.slidername.sliderwidth
slider.slidername.subcaption
slider.slidername.subcaptionfontheight
slider.slidername.typename
slider.slidername.vposition
slider.slidername.width
slider.slidername.widthpct
slider.slidername.widthpx
slider.slidername.xpct
slider.slidername.xpx
slider.slidername.ypct
slider.slidername.ypx

Functions

None.

Remarks

Examples

The following slider item asks the respondent to rate their feelings from cold to hot.

<slider q1>
/ caption="How do you feel about bananas?"
/ labels=("Cold", "Hot")
/ range = (0, 100)
/ increment = 1
</slider>


textbox element

The textbox element defines a survey item in which respondents enter free text.

Syntax

<textbox textboxname>
/ caption = "text"
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ defaultresponse = "text" or property or expression
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ mask = constraint or regular expression
/ maxchars = integer
/ minchars = integer
/ multiline = boolean
/ orientation = layout
/ position = (x value, y value)
/ range = (minimum, maximum)
/ required = boolean
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ size = (width variable, height variable)
/ subcaption = "text"
/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ textboxsize = (width variable, height variable)
/ txcolor = (red value, green value, blue value) or color name or color value
/ txcolor = (red value, green value, blue value) or color name or color value
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
</textbox>

Properties

textbox.textboxname.caption
textbox.textboxname.defaultresponse
textbox.textboxname.fontheight
textbox.textboxname.height
textbox.textboxname.heightpct
textbox.textboxname.heightpx
textbox.textboxname.hposition
textbox.textboxname.maxchars
textbox.textboxname.maxvalue
textbox.textboxname.minchars
textbox.textboxname.minvalue
textbox.textboxname.name
textbox.textboxname.required
textbox.textboxname.response
textbox.textboxname.responsefontheight
textbox.textboxname.subcaption
textbox.textboxname.subcaptionfontheight
textbox.textboxname.textboxheight
textbox.textboxname.textboxwidth
textbox.textboxname.typename
textbox.textboxname.vposition
textbox.textboxname.width
textbox.textboxname.widthpct
textbox.textboxname.widthpx
textbox.textboxname.xpct
textbox.textboxname.xpx
textbox.textboxname.ypct
textbox.textboxname.ypx

Functions

None.

Remarks

The textbox element has a powerful set of features for validating and constraining the range of permissible input. See the mask attribute for details.

Examples

The following textbox item asks the respondent to enter their age, constraining the response to be a positive integer between 18 and 120.

<textbox q1>
/ caption="Please enter your age."
/ mask=positiveinteger
/ range = (18, 120)
</textbox>


list element

The list element is a general purpose class for storing and selecting any type of item.

Syntax

<list listname>
/ itemprobabilities = (value, value, value, ...] or [expression; expression; expression; ...] or distribution
/ items = (item item item item item item ...) or [expression; expression; expression;...]
/ maxrunsize = integer expression
/ not = (item item item item item item ...) or [expression; expression; expression]
/ poolsize = integer expression
/ replace = boolean
/ resetinterval = integer
/ selectionmode = selectionmode or expression
/ selectionrate = rate
</list>

Properties

list.listname.currentindex
list.listname.currentvalue
list.listname.itemcount
list.listname.itemprobabilities
list.listname.items
list.listname.maximum
list.listname.maxrunsize
list.listname.mean
list.listname.median
list.listname.minimum
list.listname.name
list.listname.nextindex
list.listname.nextvalue
list.listname.poolitems
list.listname.poolsize
list.listname.replace
list.listname.selectedcount
list.listname.selectionmode
list.listname.selectionrate
list.listname.standarddeviation
list.listname.typename
list.listname.unselectedcount
list.listname.variance

Functions

list.listname.appenditem
list.listname.clearitems
list.listname.indexof
list.listname.insertitem
list.listname.item
list.listname.removeitem
list.listname.reset
list.listname.resetselection
list.listname.setitem
list.listname.sort

Remarks

The list element is a data structure for storing ordered sets of items, whether they are strings, values, properties, expressions, or compbinations thereof. It also provides simple and powerful methods for retrieving items from the list. Retrieval can be filtered through built-in algorithms for sequential access and random selection with or without replacement according to uniform or normal distributions. Items can also be retrieved according to custom expressions. Items can also be directly accessed by index through properties or functions.

List can be created statically using the items attribute, or dynamically using the appenditem, insertitem, removeitem, and clearitems functions. An ordered list of integers can be quickly be created by setting the poolsize property. The values in the list will be null, but the currentindex and nextindex could be used for random selection of integers ranging from 1 to the poolsize.

A list can be used drive stimulus item selection by setting /select = list.listName.nextvalue or /select = list.listName.nextindex on the stimulus.

The list element provides a simpler and more predictable implementation of the functionality provided by the counter element and also introduced new functionality. Although the counter element will continue to function as it has, where possible script developers should the list element instead.

Examples

The following list stores a reverse sequence of numbers, selecting them in sequential order:

<list backwards>
/ items = (5, 4, 3, 2, 1)
/ selectionmode = sequence
</list>

The following randomly selects the name of a president without replacement:

<list presidents>
/ items = ("George Washington", "John Adams", "Thomas Jefferson")
</list>

The following selects a countdown of numbers:

<list countdown>
/ selectionmode = sequence
/ items = (3 2 1)
</list>

The following selects a value of 2 for odd numbered trials and 1 for even numbered trials:

<list evenodd>
/ selectionmode = sequence
/ items = [if ( floor(mod(block.test.currenttrialnumber, 2)) == 0 ) 1 else 2]
</list>

The following creates a list of 200 null values and randomly selects without replacement. All items are replaced after 10 blocks or after all of them have been selected.

<list stimulusTracker>
/ poolsize = 200
/ resetinterval = 10
</list>

<picture targetPics>
/ items = targetItems
/ select = list.stimulusTracker.nextindex
</picture>


counter element

The counter element defines a sequential or randomly selected set of values used to vary experimental conditions.

Syntax

<counter countername>
/ allowrepeats = boolean
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(countername) or countername
/ items = (value, value, value,... )
/ not = (stimulusname, stimulusname, stimulusname) or (countername, countername, countername)
/ resetinterval = integer
/ selectionrate = rate
</counter>

Properties

counter.countername.currentitem
counter.countername.item
counter.countername.itemcount
counter.countername.name
counter.countername.selectedcount
counter.countername.selectedindex
counter.countername.selectedvalue
counter.countername.selectionmode
counter.countername.selectionrate
counter.countername.typename
counter.countername.unselectedcount

Functions

None.

Remarks

The counter element can be used to determine which stimulus items are selected from trial to trial, providing more control over item selection than is given by the stimulus element itself. Counters can also be used to specify the values from trial to trial of variable attributes (for example, the horizontal and vertical screen position of stimuli).

Examples

The following counter returns a sequence of numbers counting backwards from 5.

<counter backwards>
/ select = sequence(5, 4, 3, 2, 1)
</counter>

The following counter randomly selects values from 1 to 200 without replacement. All items are replaced after 10 blocks or after all of them have been selected.

<counter mycounter>
/ select = noreplace(1-200)
/ resetinterval = 10
</counter>


values element

The values element contains custom variables that can be retrieved and updated throughout the course of a script.

Syntax

<values>
/ valuename1
/ valuename2
/ valuename3
</values>

Properties

values.name
values.typename
values.valuename1
values.valuename2
values.valuename3

Functions

None.

Remarks

The values element allows you to store and update values for purposes of tracking, scoring, and displaying information in an experiment. For example, values can be used to count the occurrence of a particular event, tally scores, and keep trial by trial statistics.

Examples

The following defines and initializes 3 variables for tracking the total score under different conditions.

<values>
/ congruentscore=0
/ incongruentscore=0
/ neutralscore=0
</values>

The following defines a variable that tracks the sum of squares of response latencies.

<values>
/ latencysumofsquares=0</values>


expressions element

The expressions element contains custom expressions that can be used throughout the script.

Syntax

<expressions>
/ expressionname1
/ expressionname2
/ expressionname3
</expressions>

Properties

expressions.expressionname1
expressions.expressionname2
expressions.expressionname3
expressions.name
expressions.typename

Functions

None.

Remarks

Sometimes a script may use long and complicated expressions, or reuse a given expression in a number of places. The expression element allows you to define such expressions and assign them a name. You can then conveniently refer to the expression by its name wherever it is used in the script. Expressions are dynamically evaluated each time they are used so that they always reflect up to date values. Expressions may include other expressions defined, although you should avoid circular references.

Examples

The following defines an expression that reflects the total score across three different conditions.

<expressions>
/ totalscore = values.congruentscore + values.incongruentscore + values.neutralscore
</expressions>

The following defines an expression the returns whether the current trial is even or odd.

<expressions>
/ isoddnumberedtrial = (mod(script.trialcount) > 0) </expressions>


computer element

The computer element is a built-in element that exposes a number of properties of the current computer.

Syntax

<computer>
This element has no attributes
</computer>

Properties

computer.availablememory
computer.countrycode
computer.cpuspeed
computer.haskeyboard
computer.ipaddress
computer.language
computer.languagecode
computer.macaddress
computer.memory
computer.os
computer.osmajorversion
computer.osminorversion
computer.platform
computer.timerresolution
computer.touch

Functions

computer.chartoscancode
computer.scancodetochar

Remarks

The computer element is a built-in object and can not be explicitly declared in a script. It exposes a number of useful properties, however, that can be referenced in expressions throughout the script.

Examples

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


display element

The display element is a built-in element that exposes properties of the display system.

Syntax

<display>
This element has no attributes
</display>

Properties

display.canvasheight
display.canvaswidth
display.colordepth
display.height
display.refreshinterval
display.refreshrate
display.screenheight
display.screenwidth
display.width

Functions

display.getmmx
display.getmmy
display.getpercentx
display.getpercenty
display.getpixelsx
display.getpixelsy

Remarks

The display element is a built-in object and can not be explicitly declared in a script. It exposes a number of useful properties, however, that can be referenced in expressions throughout the script.

Examples

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


inquisit element

The inquisit element is a built-in element that exposes a number of properties about the Inquisit application running a given script.

Syntax

<inquisit>
This element has no attributes
</inquisit>

Properties

inquisit.applicationmode
inquisit.build
inquisit.releasedate
inquisit.version

Functions

None.

Remarks

The inquisit element is a built-in object and can not be explicitly declared in a script. It exposes a number of useful properties, however, that can be referenced in expressions throughout the script.

Examples

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


joystick element

The joystick element is a built-in element that exposes a number of properties reflecting the current state of the joystick.

Syntax

<joystick>
This element has no attributes
</joystick>

Properties

joystick.button
joystick.buttona
joystick.buttonb
joystick.buttoncenter
joystick.buttondown
joystick.buttonguide
joystick.buttonl1
joystick.buttonl2
joystick.buttonl3
joystick.buttonleft
joystick.buttonr1
joystick.buttonr2
joystick.buttonr3
joystick.buttonright
joystick.buttonselect
joystick.buttonstart
joystick.buttonup
joystick.buttonx
joystick.buttony
joystick.leftx
joystick.lefty
joystick.pov
joystick.rightx
joystick.righty
joystick.rx
joystick.ry
joystick.rz
joystick.slider
joystick.x
joystick.y
joystick.z

Functions

None.

Remarks

The joystick element is a built-in object and can not be explicitly declared in a script. It exposes a number of useful properties, however, that can be referenced in expressions throughout the script.

Examples

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


mouse element

The mouse element is a built-in element that exposes a number of properties reflecting the current state of the mouse.

Syntax

<mouse>
This element has no attributes
</mouse>

Properties

mouse.monitor
mouse.x
mouse.y

Functions

None.

Remarks

The mouse element is a built-in object and can not be explicitly declared in a script. It exposes a number of useful properties, however, that can be referenced in expressions throughout the script.

Examples

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


script element

The script element is a built-in element that exposes a number of script level properties .

Syntax

<script>
This element has no attributes
</script>

Properties

script.completed
script.currentblock
script.currentblocknumber
script.currentexpt
script.currenttime
script.currenttrial
script.currenttrialnumber
script.elapsedtime
script.filename
script.fullpath
script.groupassignmentcode
script.groupid
script.sessionid
script.startdate
script.starttime
script.subjectid
script.trialcount

Functions

script.abort
script.debugbreak
script.debugtrace

Remarks

The script element is a built-in object and can not be explicitly declared in a script. It exposes a number of useful properties, however, that can be referenced in expressions throughout the script.

Examples

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


eyetracker element

The eyetracker element enables Inquisit to receive and record real-time gaze data from an eyetracker.

Syntax

<eyetracker>
/ aoidurationthreshold = maxfixationtime
/ calibrationmode = mode
/ calibrationpointcolor = (red value, green value, blue value) or color name or color value
/ calibrationstimulus = stimulus
/ calibrationtargetcolor = (red value, green value, blue value) or color name or color value
/ file = "location"
/ columns = (eyecolumn, eyecolumn, eyecolumn, property, property, property)
/ framerate = framerate
/ ipaddress = ipaddress
/ labels = ("label", "label", "label", ...)
/ plugin = "plugin name"
/ screencolor = (red value, green value, blue value) or color name or color value
</eyetracker>

Properties

eyetracker.aoidurationthreshold
eyetracker.framerate
eyetracker.framerates
eyetracker.lastex
eyetracker.lastey
eyetracker.lastfixationx
eyetracker.lastfixationy
eyetracker.lasthasfixation
eyetracker.lastleftfixationx
eyetracker.lastleftfixationy
eyetracker.lastlefthasfixation
eyetracker.lastleftpupilheight
eyetracker.lastleftpupilwidth
eyetracker.lastleftvalidity
eyetracker.lastleftx
eyetracker.lastlefty
eyetracker.lastmarker
eyetracker.lastpupilheight
eyetracker.lastpupilwidth
eyetracker.lastrightfixationx
eyetracker.lastrightfixationy
eyetracker.lastrighthasfixation
eyetracker.lastrightpupilheight
eyetracker.lastrightpupilwidth
eyetracker.lastrightvalidity
eyetracker.lastrightx
eyetracker.lastrighty
eyetracker.lasttimestamp
eyetracker.lastx
eyetracker.lasty
eyetracker.maxleftpupilheight
eyetracker.maxleftpupilwidth
eyetracker.maxpupilheight
eyetracker.maxpupilwidth
eyetracker.maxrightpupilheight
eyetracker.maxrightpupilwidth
eyetracker.meanleftpupilheight
eyetracker.meanleftpupilwidth
eyetracker.meanpupilheight
eyetracker.meanpupilwidth
eyetracker.meanrightpupilheight
eyetracker.meanrightpupilwidth
eyetracker.minleftpupilheight
eyetracker.minleftpupilwidth
eyetracker.minpupilheight
eyetracker.minpupilwidth
eyetracker.minrightpupilheight
eyetracker.minrightpupilwidth
eyetracker.plugin

Functions

None.

Remarks

The eyetracker requires a custom plugin for a given make of eyetracker that can be purchased separately from Inquisit Lab. To date, we have released a plugin for Tobii eyetrackers, although plugins for other eyetrackers may be released in the future. (Note - Inquisit can send markers to any eye tracker that accepts parallel or serial port input without the use of this element and associated plugin.)

To initialize the plugin and enable access to gaze point data, simply specify the eye tracker element and set the plugin attribute to the name of the plugin (e.g., "tobii"). Each plugin may optionally support additional proprietary attributes specific to the eyetracker (see plugin-specific documentation). The eyetracker element supports a set of properties common to all plugins. These properties report gaze point and pupil size along with basic statistics on those data. The properties can be stored in the data file or used to dynamically determine experimental flow.

Currently available eye tracker plugins:
* Inquisit 6 Tobii Plugin

Examples

The following defines an eyetracker element that communicates with a Tobii eyetracker. The eyetracker element has properties that enable programmatic access to gaze data for use in gaze-contingent tasks.

<eyetracker>
/ plugin = "tobii"
</eyetracker>


eyetracker element

Inquisit Tobii Plugin

The following attributes and properties are supported by the Tobii Eyetracker plugin. To use these extensions, the plugin attribute must be set to "tobii".

To use Inquisit with Tobii eye trackers, perform the following steps:
* Set up the eyetracker according to Tobii's instructions. Make sure it is plugged into your local network.
* Open an Inquisit script that defines the eyetracker element with plugin attribute set to "tobii" (sample scripts are available from our library)
* Run the script. You will be asked to register the Inquisit 6 Tobii Plugin if you haven't already.

How to Program the Tobii Eye Tracker Plugin

Syntax

<eyetracker>
/ aoidurationthreshold = maxfixationtime
/ calibrationmode = mode
/ file = "location"
/ encrypt = true("password") or false
/ columns = (eyecolumn, eyecolumn, eyecolumn, property, property, property)
/ fixationwindowlength = fixationwindowlength
/ framerate = framerate
/ hostname = value
/ illuminationmode = value
/ ipaddress = ipaddress
/ labels = ("label", "label", "label", ...)
/ lowblinkmode = value
/ maxfixationtime = maxfixationtime
/ minfixationtime = minfixationtime
/ plugin = "tobii"
/ saccadethreshold = saccadethreshold
/ unitname = value
</eyetracker>

Properties

eyetracker.aoidurationthreshold
eyetracker.encrypt
eyetracker.encryptionkey
eyetracker.file
eyetracker.filename
eyetracker.fixationwindowlength
eyetracker.framerate
eyetracker.framerates
eyetracker.fullpath
eyetracker.ipaddress
eyetracker.lastex
eyetracker.lastey
eyetracker.lastfixationx
eyetracker.lastfixationy
eyetracker.lasthasfixation
eyetracker.lastlefteyex
eyetracker.lastlefteyey
eyetracker.lastlefteyez
eyetracker.lastleftfixationx
eyetracker.lastleftfixationy
eyetracker.lastleftgazex
eyetracker.lastleftgazey
eyetracker.lastleftgazez
eyetracker.lastlefthasfixation
eyetracker.lastleftpupilheight
eyetracker.lastleftpupilwidth
eyetracker.lastleftvalidity
eyetracker.lastleftx
eyetracker.lastlefty
eyetracker.lastmarker
eyetracker.lastpupilheight
eyetracker.lastpupilwidth
eyetracker.lastrighteyex
eyetracker.lastrighteyey
eyetracker.lastrighteyez
eyetracker.lastrightfixationx
eyetracker.lastrightfixationy
eyetracker.lastrightgazex
eyetracker.lastrightgazey
eyetracker.lastrightgazez
eyetracker.lastrighthasfixation
eyetracker.lastrightpupilheight
eyetracker.lastrightpupilwidth
eyetracker.lastrightvalidity
eyetracker.lastrightx
eyetracker.lastrighty
eyetracker.lasttimestamp
eyetracker.lastx
eyetracker.lasty
eyetracker.maxfixationtime
eyetracker.maxfixationtime
eyetracker.maxleftpupilheight
eyetracker.maxleftpupilwidth
eyetracker.maxleftpupilwidth
eyetracker.maxpupilheight
eyetracker.maxpupilwidth
eyetracker.maxrightpupilheight
eyetracker.maxrightpupilwidth
eyetracker.maxrightpupilwidth
eyetracker.meanleftpupilheight
eyetracker.meanleftpupilwidth
eyetracker.meanpupilheight
eyetracker.meanpupilwidth
eyetracker.meanrightpupilheight
eyetracker.meanrightpupilwidth
eyetracker.minfixationtime
eyetracker.minfixationtime
eyetracker.minleftpupilheight
eyetracker.minleftpupilwidth
eyetracker.minpupilheight
eyetracker.minpupilwidth
eyetracker.minrightpupilheight
eyetracker.minrightpupilwidth
eyetracker.plugin
eyetracker.recorddata
eyetracker.saccadethreshold
eyetracker.saccadethreshold

Functions

None.

Remarks

Examples

The following defines an eyetracker element that connects to a Tobii eyetracker at the given network ip address.

<eyetracker>
/ plugin = "tobii"
/ ipaddress = "168.192.0.22"
</eyetracker>

The following defines a text element that displays the current width of the right pupil:

<text rightpupil>
/ items = ("Right Pupil Width: <% eyetracker.lastrightpupilwidth %>")
</text>


defaults element

The defaults element specifies global default values for attributes in the script.

Syntax

<defaults>
/ bidirectional = boolean
/ blockfeedback = (metric, metric, metric, ...)
/ canvasaspectratio = (width, height)
/ canvasposition = (x value, y value)
/ canvassize = (width variable, height variable)
/ combaudrates = (port = baudrate, port = baudrate, port = baudrate, ...)
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ finishpage = "url"
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ halign = alignment
/ inputdevice = modality
/ joystickthreshold = integer
/ lptaddresses = (port = address, port = address, port = address, ...)
/ minimumversion = "version"
/ posttrialpause = integer expression
/ pretrialpause = integer expression
/ quitcommand = (command key + scancode)
/ requiredpermissions = (permission, permission, ...)
/ screencolor = (red value, green value, blue value) or color name or color value
/ skipcommand = (command key + scancode)
/ txbgcolor = (red value, green value, blue value) or (transparent) or color name or color value
/ txcolor = (red value, green value, blue value) or color name or color value
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ valign = alignment
/ voicekeythreshold = integer
/ windowsize = (width variable, height variable)
</defaults>

Properties

defaults.finishpage
defaults.fontheight
defaults.name
defaults.posttrialpause
defaults.pretrialpause
defaults.typename
defaults.windowcenter
defaults.windowdecunit
defaults.windowhitduration
defaults.windowincunit
defaults.windowmaxcenter
defaults.windowmincenter
defaults.windowoffset
defaults.windowonset
defaults.windowwidth

Functions

None.

Remarks

The default element provides a convenient way to specify global settings that apply throughout the entire script. For example, if a script contains multiple text elements that use a 12 point Arial font, the font can be specified in the defaults element and each text element will automatically use that font. This is much more convenient than specifying the font repeatedly for each text element. If the local element redefines a default attribute, the local setting takes precedent over the default setting.

Examples

The following sets the default screen color to blue, font to Arial, and input device to mouse.

<default>
/ screencolor = (0,0,255)
/ fontstyle = ("Arial", 14pt, true)
/ inputdevice = mouse
</default>


Comments in Inquisit

Comments are text snippets in the script that the author intends to be ignored by Inquisit's script parser. Typically, comments are notes the author writes in the script describing the purpose of the script, how it works, or other useful information. Comments can make a script easier to understand for others, and they can serve as reminders about easily forgotten details.

Inquisit's rules for comments are as follows:

  1. Comments may appear anywhere outside of an element definition. In other words, they may not appear between <element and </element>, where element is any Inquisit script element (e.g., <trial>, <block>, <picture>, <defaults>, etc.) Such comments can include any text except the beginning of an element definition. That is, comments may not include "<element", where element is any Inquisit script element (e.g., <trial>, <block>, <picture>, <defaults>, etc.)
  2. Single line comments can appears within elements using "//". All text that appears on the same line after this comment indicator is treated as a comment.


Formatting Text Using HTML Markup

Inquisit supports two ways of formatting text to be displayed during an experiment. Inquisit can display complete HTML documents using <html> and <htmlpage> elements. Using these elements, you have access to all of the power and richness of HTML including text formatting, layout control, and display of multimedia such as images, sound, and movies.

In some cases, a complete HTML document may be overkill, however, such as when you simply wish to present a block of text with a particular phrase shown in bold or italics. With Inquisit 6, you can selectively format snippets of text in your script by enclosing the those snippets in HMTL tags without creating a separate HTML document. Formatting is specified using a subset of HTML 4 markup tags. Inquisit supports display of richly formatted text in a number of different contexts including text elements, page elements, and survey captions.

Inquisit automatically detect HTML markup and display rich text accordingly. For example, setting a <text> element's item attribute as follows:

<text>
/ items = ("<b>Hello</b> <i>Inquisit!</i>")
<text>

will result in the text displaying like this:

Hello Inquisit!

When HTML markup is used for text, Inquisit follows the rules defined by the HTML 4 specification. This includes default properties for text layout, such as the direction of the text flow (left-to-right) which can be changed by applying the "dir" attribute to blocks of text.

Supported Tags

The following table lists the HTML tags supported by Inquisit's rich text formatting engine:

Tag | Description | Comment
a | Anchor or link | Supports the href and name attributes.
address | Address |
b | Bold |
big | Larger font |
blockquote | Indented paragraph |
body | Document body | Supports the bgcolor attribute, which can be a color name or a #RRGGBB color specification.
br | Line break |
center | Centered paragraph |
cite | Inline citation | Same as i.
code | Code | Same as tt.
dd | Definition data |
dfn | Definition | Same as i.
div | Document division | Supports the standard block attributes.
dl | Definition list | Supports the standard block attributes.
dt | Definition term | Supports the standard block attributes.
em | Emphasized | Same as i.
font | Font size, family, and/or color | Supports the following attributes: size, face, and color (color names or #RRGGBB).
h1 | Level 1 heading | Supports the standard block attributes.
h2 | Level 2 heading | Supports the standard block attributes.
h3 | Level 3 heading | Supports the standard block attributes.
h4 | Level 4 heading | Supports the standard block attributes.
h5 | Level 5 heading | Supports the standard block attributes.
h6 | Level 6 heading | Supports the standard block attributes.
head | Document header |
hr | Horizontal line | Supports the width attribute, which can be specified as an absolute or relative (%) value.
html | HTML document |
i | Italic |
img | Image | Supports the src, source, width, and height attributes.
kbd | User-entered text |
meta | Meta-information | Encoding is stored using a meta tag, for example: <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" />
li | List item |
nobr | Non-breakable text |
ol | Ordered list | Supports the standard list attributes.
p | Paragraph | Left-aligned by default. Supports the standard block attributes.
pre | Preformated text |
s | Strikethrough |
samp | Sample code | Same as tt.
small | Small font |
span | Grouped elements |
strong | Strong | Same as b.
sub | Subscript |
sup | Superscript |
table | Table | Supports the following attributes: border, bgcolor (color names or #RRGGBB), cellspacing, cellpadding, width (absolute or relative), and height.
tbody | Table body | Does nothing.
td | Table data cell | Supports the standard table cell attributes.
tfoot | Table footer | Does nothing.
th | Table header cell | Supports the standard table cell attributes.
thead | Table header | If the thead tag is specified, it is used when printing tables that span multiple pages.
title | Document title |
tr | Table row | Supports the bgcolor attribute, which can be a color name or a #RRGGBB color specification.
tt | Typewrite font |
u | Underlined |
ul | Unordered list | Supports the standard list attributes.
var | Variable | Same as i.

Block Attributes

The following attributes are supported by the div, dl, dt, h1, h2, h3, h4, h5, h6, p tags:

  • align (left, right, center, justify)
  • dir (ltr, rtl)

List Attributes

The following attribute is supported by the ol and ul tags:

  • type (1, a, A, square, disc, circle)

Table Cell Attributes

The following attributes are supported by the td and th tags:

  • width (absolute, relative, or no-value)
  • bgcolor (color names or #RRGGBB)
  • colspan
  • rowspan
  • align (left, right, center, justify)
  • valign (top, middle, bottom)

CSS Properties

The following table lists the CSS properties supported by Inquisit's rich text formatting:

Property | Values | Description
background-color | <color> | Background color for elements
background-image | <uri> | Background image for elements
color | <color> | Text foreground color
font-family | <family name> | Font family name
font-size | [ small | medium | large | x-large | xx-large ] | <size>pt | <size>px | Font size relative to the document font, or specified in points or pixels
font-style | [ normal | italic | oblique ] |
font-weight | [ normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 ] | Specifies the font weight used for text.
text-decoration | none | [ underline || overline || line-through ] | Additional text effects
font | [ [ <'font-style'> || <'font-weight'> ]? <'font-size'> <'font-family'> ] | Font shorthand property
text-indent | <length>px | First line text indentation in pixels
white-space | normal | pre | nowrap | pre-wrap | Declares how whitespace in HTML is handled.
margin-top | <length>px | Top paragraph margin in pixels
margin-bottom | <length>px | Bottom paragraph margin in pixels
margin-left | <length>px | Left paragraph margin in pixels
margin-right | <length>px | Right paragraph margin in pixels
padding-top | <length>px | Top table cell padding in pixels
padding-bottom | <length>px | Bottom table cell padding in pixels
padding-left | <length>px | Left table cell padding in pixels
padding-right | <length>px | Right table cell padding in pixels
padding | <length>px | Shorthand for setting all the padding properties at once.
vertical-align | baseline | sub | super | middle | top | bottom | Vertical text alignment. For vertical alignment in text table cells only middle, top, and bottom apply.
border-collapse | collapse | separate | Border Collapse mode for text tables. If set to collapse, cell-spacing will not be applied.
border-color | <color> | Border color for text tables and table cells.
border-top-color | <color> | Top border color for table cells.
border-bottom-color | <color> | Bottom border color for table cells.
border-left-color | <color> | Left border color for table cells.
border-right-color | <color> | Right border color for table cells.
border-style | none | dotted | dashed | dot-dash | dot-dot-dash | solid | double | groove | ridge | inset | outset | Border style for text tables and table cells.
border-top-style | <color> | Top border style for table cells.
border-bottom-style | <color> | Bottom border style for table cells.
border-left-style | <color> | Left border style for table cells.
border-right-style | <color> | Right border style for table cells.
border-width | <width>px | Width of table or cell border
border-top-width | <length>px | Top border width for table cells.
border-bottom-width | <length>px | Bottom border width for table cells.
border-left-width | <length>px | Left border width for table cells.
border-right-width | <length>px | Right border width for table cells.
border-top | <width>px <border-style> <border-color> | Shorthand for setting top border width, style and color
border-bottom | <width>px <border-style> <border-color> | Shorthand for setting bottom border width, style and color
border-left | <width>px <border-style> <border-color> | Shorthand for setting left border width, style and color
border-right | <width>px <border-style> <border-color> | Shorthand for setting right border width, style and color
border-top | <width>px <border-style> <border-color> | Shorthand for setting top border width, style and color
border-bottom | <width>px <border-style> <border-color> | Shorthand for setting bottom border width, style and color
border | <width>px <border-style> <border-color> | Shorthand for setting all four border's width, style and color
background | [ <'background-color'> || <'background-image'> ] | Background shorthand property
page-break-before | [ auto | always ] | Make it possible to enforce a page break before the paragraph/table
page-break-after | [ auto | always ] | Make it possible to enforce a page break after the paragraph/table
float | [ left | right | none ] | Specifies where an image or a text will be placed in another element. Note that the float property is only supported for tables and images.
text-transform | [ uppercase | lowercase ] | Select the transformation that will be performed on the text prior to displaying it.
font-kerning | [ normal | none ] | Enables or disables kerning between text characters.
font-variant | small-caps | Perform the smallcaps transformation on the text prior to displaying it.
word-spacing | <width>px | Specifies an alternate spacing between each word.

Supported CSS Selectors

All CSS 2.1 selector classes are supported except pseudo-class selectors such as :first-child, :visited and :hover.


Expressions

Inquisit supports a variety logical and arithmetic expressions. Expressions are a powerful feature that enable you to create sophisticated and flexible scripts that dynamically adapt based on a wide range of inputs such as the participant's responses, elapsed time, the computer's capabilities, and more. Best of all, expressions allow you to express adaptive scripts in a natural, intuitive way, making it much easier than before to program adaptive tasks.

If you are familiar with imperative programming languages like JavaScript, Java, C#, PHP, or C, Inquisit's expression language syntax will be immediately recognizable to you. Inquisit's basic expression syntax follows the same rules as these other languages.

Simple Statements

If an expression consists of a set of statements, each statement must be delimited by a ";". For example, the following to statements keep a running total of the sum of all response latencies and the total correct responses:

values.sumlatency = values.sumlatency + trial.test.latency;
values.totalcorrect = values.totalcorrect + trial.test.correct;

Compound Statements

In addition to simple statements, Inquisit expressions can also consist of compound statements such as "if", "else if", and "else". For example, the following statement updates the sum of latencies only if the response latency falls within a certain range:

if (trial.test.latency &gt; 300 && trial.test.latency &lt; 10000)
    values.sumlatency = values.sumlatency + trial.test.latency;

Multiple statements can be nested under and an "if" condition by placing the statements inside "{" and "}". In the following example, the sum of latencies and total correct are updated only if the latency falls within the designated range:

if (trial.test.latency &gt; 300 && trial.test.latency &lt; 10000)
{
    values.sumlatency = values.sumlatency + trial.test.latency;
    values.totalcorrect = values.totalcorrect + trial.test.correct;
}

"If" conditionals can be accompanied by "else" statements to designated statements to be executed only if the "if" conditional fails. If the following example, if the response latency falls outside the given range, a value tracking the number of discarded trials is incremented by 1:

if (trial.test.latency &gt; 300 && trial.test.latency &lt; 10000)
{
    values.sumlatency = values.sumlatency + trial.test.latency;
    values.totalcorrect = values.totalcorrect + trial.test.correct;
}
else
{
    values.discardedtrialscount += 1;
}

"Else if" statements allow you to include multiple conditionals. For example, the following updates a points counter based on speed at which a response that was given, rewarding faster responses with more points:

if (trial.test.latency &lt; 500)
{
    values.points += 10;
}
else if (trial.test.latency &gt;= 500 && trial.test.latency &lt; 1000)
{
    values.points += 5;
}
else if (trial.test.latency &gt;= 100 && trial.test.latency &lt; 1500 )
{
    values.points += 1;
}
else
{
    values.points -= 1;
}

Nested Statements

Conditional statements can also be nested within each other. The following updates a points counter based on speed at which a response that was given, but only if the response was correct:

if (trial.response.correct )
{
    if (trial.test.latency &gt; 500)
    {
        values.points += 10;
    }
    else if (trial.test.latency &gt;= 500 && trial.test.latency &lt; 1000)
    {
        values.points += 5;
    }
    else if (trial.test.latency &gt;= 100 && trial.test.latency &lt; 1500 )
    {
        values.points += 1;
    }
    else
    {
        values.points -= 1;
    }
}

Operator reference. This topic covers the syntax for mathematical operations such as addition, subtraction, multiplication, equality. It also covers logical operations such as tests for equality, inequality, greater than, less than, logical AND, logical OR, and so on.

Function Reference. Inquisit contains numerous built in functions that can be used by expressions. Examples include functions for returning the maximum of two values, rounding real numbers to integers, computing the natural logarithm of a value, and more.

Incorporating expressions into a script

There are a number of different Inquisit elements and attributes that make use of expressions. The following provides an overview of how expressions can be used in a script. The reference topics elements and attributes provide more detailed information on where expressions are valid.

Simple Attributes

Simple attributes are just regular old attributes that can be set to a single numeric value, or possibly a set of numeric values. For example, the timeout attribute consists of a single numeric value, for example /timeout = 1000. The size attribute consists of two numeric attributes, for example /size = (200, 300). Inquisit allows you to set these attribute values to either a constant number such as "5" or a numeric expression such as "sqrt(5) + 22 - text.target.currentitemnumber".

As an example, imagine you are running a task in which subjects try to answer as many questions as possible in 5 minutes. When their time is up, the current trial is interrupted and no more trials are run. One way to achieve this is to set the timeout of each trial as a function of the time elapsed since the task started. This might look like the following:

<trial timedtaska>
/ stimulustimes = [1=question]
/ validresponse = ("a", "b")
/ correctresponse = ("a")
/ timeout = 18000000 - block.timedtask.elapsedtime
</trial>

The above example computes the number of milliseconds remaining in the 5 minute period by subtracting the number of milliseconds that have elapsed since the start of the block from 18000000, which is the number of millisecond in a 5 minute interval.

There is a problem with this expression however, namely that it might return a negative number, which is not a valid timeout value, or it might return 0, which Inquisit interprets to mean no timeout at all. We can fix this by uses Inquisit's "max" function, which returns the maximum value of two expressions. The following ensures that the timeout is never set to a value less than 1 millisecond.

<trial timedtaska>
/ stimulustimes = [1=question]
/ validresponse = ("a", "b")
/ correctresponse = ("a")
/ timeout = max(18000000 - block.timedtask.elapsedtime, 1)
</trial>

Event Attributes

Inquisit 6 introduces a set of event attributes that allow you to execute logic at a particular time in the experiment, such as at the beginning or end of a certain type of trial or block. These attributes allow you to configure aspects of the script based on prior performance or tally up custom scores and metrics. Event attributes include ontrialbegin, ontrialend, onblockbegin, onblockend, onexptbegin, and onexptend.

As an example, imagine a decision making task in which you award points based on correct decisions. There are two types of decisions, a relative easy type worth 2 points and a harder type worth 5 points. Using the ontrialend attribute, this is easily accomplished.

First, we'll define a custom value called "score" used to store respondent's running score.

<values>
/ score = 0
</values>

Next, we'll define the ontrialend attribute on our easy trial to add 2 points to the score with each correct response.

<trial easydecision>
/ stimulusframes = [1 = easydecisions]
/ validresponse = ("a", "b")
/ ontrialend=[values.score = values.score + 2 * trial.easydecision.correct]
</trial>

Note that the trial.easydecision.correct property is set to 1 for a correct response and 0 for an incorrect response, so we can simply multiply this property by 2 and add the result to the score. Another way to accomplish the same thing would be to use conditional logic as follows.

<trial easydecision>
/ stimulusframes = [1 = easydecisions]
/ validresponse = ("a", "b")
/ ontrialend= [
    if (trial.easydecision.correct == 1)
        values.score = values.score + 2;
]
</trial>

Here, we check if the response was correct, and if so, we add two 2 points.

The last step is to define the ontrialend attribute on our difficult trial, which adds 5 points for each correct response.

<trial harddecision>
/ stimulusframes = [1 = harddecisions]
/ validresponse = ("a", "b")
/ ontrialend = [
    values.score = values.score + 5 * trial.harddecision.correct;
]
</trial>

Task Flow Attributes

Task flow attributes allow you to conditionally determine the flow of a procedure based on prior performance. For example, a script might repeat a practice block of trials until the percent of correct responses meets some criteria before moving on to the critical blocks. Another script may skip a certain type of trial based on the response to a previous question. Flow attributes include branch, skip, repeat, and stop.

As an example, imagine you wish to provide adaptive feedback to participants based on how well they perform a task. Specifically, if they make 5 correct responses in a row, they are shown a message of encouragement. If they make 3 incorrect responses in a row, they are shown a message warning them to slow down and concentrate on the task.

First, we'll define the two trials used to display the encouragement and warning feedback. Note that since these are just feedback trials, we use the recorddata command to prevent the data from these trials from being added to the data file.

<trial encouragement>
/ stimulusframes = [1 = encouragingwords]
/ validresponse = (" ")
/ recorddata = false
</trial>
<trial warning>
/ stimulusframes = [1 = warningwords]
/ validresponse = (" ")
/ recorddata = false
</trial>

Next, we'll define the trial that runs the main task. This trial includes two branch commands, the first of which runs the encouraging feedback trial and the second that runs the warning.

<trial maintask>
/ stimulusframes = [1 = taskstimulus]
/ validresponse = ("a", "b")
/ branch = [
    if (mod(trial.maintask.correctstreak, 5) == 0 && trial.maintask.correctstreak != 0)
        trial.encouragement;
]
/ branch = [
    if (mod(trial.maintask.errorstreak, 3) == 0 && trial.maintask.errorstreak 1 != 0)
        trial.warning;
]
</trial>

The first branch uses the mod function, which returns the remainder when the first argument, trial.maintask.correctstreak, is divided by the second argument, 5. If the correctstreak is a multiple of 5 (e.g., 5, 10, 15, ...), the remainder is 0 and the first statement in the condition is true. However, the mod function also returns 0 if the correctstreak is 0, in which case we don't want to show the encouragement trial. So, a second statement checking whether the correctstreak is 0 has been added. Now the encouragement trial is run after ever streak of 5 correct responses.

The second branch is similar, except that it shows a warning trial for every streak of 3 incorrect responses.

Stimulus Items

Expressions can also be incorporated into stimulus items in order to be displayed on the screen. For example, a text stimulus might include expressions representing their performance, a score, or the amount of time remaining in a task. In order to distinguish regular text from text that should be evaluated as an expression, expressions must appear between <% and %>. Anything appearing between these delimiters will be evaluated as an expression. Otherwise, the text is displayed as is.

The following example shows a text item that displays a participant's total score on a judgment and decision making task by adding subscores from phase 1 and 2:

<text score>
/ items = ("Total score: <% values.phase1score + values.phase2score %>")
/ position = (50%, 5%)
</text>

The following text shows the number of minutes that have passed since the start of the session. Since the script.elapsedtime property returns the duration in millisecond, the value is divided by 60000 and rounded to the nearest integer to convert it to minutes:

<text elapsedminutes>
/ items = ("Total minutes: <% round(script.elapsedtime / 60000) %>")
/ position = (50%, 5%)
</text>

Instruction Pages

Just like stimulus items, expressions can also be inserted into instruction pages. Again, anything appearing between expressions must appear between <% and %> is evaluated as an expression. Otherwise the text or html is displayed as it is.

The following instruction page shows the mean latency on a block rounded to the nearest integer.

<page feedback>
Your average response time was <% round(block.test.meanlatency) %>
</page>


Operators

Inquisit expressions supports all of the basic operators for doing arithmetic, comparing values, and creating logical statements. The complete list of operators and their syntax is listed below.

Arithmetic Operators

Arithmetic operators are used to perform additional, subtraction, multiplication, and division.

Operator | Description | Examples
+ | Adds numeric operands or concatenates two or more strings. | trial.condition1.correctcount + trial.condition2.correctcount values.firstscore + values.secondscore response.rw.windowcenter + 500
- | Subtracts numeric operands. | 100 - trial.mytrial.percentcorrect block.incompat.meanlatency - block.compat.meanlatency
* | Multiplies numeric operands. | trial.test.correctcount * 5 trial.test.trialcount * trial.test.meanlatency
/ | Divides numeric operands. | trial.mytrial.percentcorrect / 100 block.myblock.sumlatency / block.myblock.trialcount
+= | Adds the value of an expression to the value of a variable and assigns the result to the variable. | values.trialcount += 1 values.totalfalsealarms += values.falsealarmcount
-= | Subtracts the value of an expression to the value of a variable and assigns the result to the variable. | values.remainingtrialcount -= 1 values.totalpoints -= values.errorcount

Comparison Operators

Comparison operators compare the values of the right and left operands and return a Boolean value of true or false.

Operator | Description | Examples
== | True if the right and left values are equal. Otherwise false. | trial.iat.trialcount == 100 block.compat.percentcorrect == 0 trial.foo.correct == 1
!= | True if the left and right values are not equal. Otherwise false. | trial.iat.trialcount != 1 block.compat.percentcorrect != 100 response.rw.windowcenter != 0
< | True if the left value is less than the right. Otherwise false. | trial.iat.trialcount < 25 block.compat.percentcorrect < 100 trial.test.latency < 500
<= | True if the left value is less than or equal to the right. Otherwise false. | trial.iat.trialcount <= 25 block.compat.percentcorrect <= 100 trial.test.latency <= 500
> | True if the left value is greater than the right. Otherwise false. | trial.iat.currenttrialnumber > 25 block.compat.percentcorrect > 50 trial.test.latency > 500
>= | True if the left value is greater than or equal to the right. Otherwise false. | trial.iat.currenttrialnumber >= 25 block.compat.percentcorrect >= 50 trial.test.latency >= 500

Assignment Operator

The assigment operator assigns a value to a property. Note that the operand on the left must be a writable property. Many properties (computer.cpuspeed, for example) are read-only values that can not be changed. An expression that attempts to assign a value to a read-only property will fail.

Operator | Description | Examples
= | Sets the value of the left operand to that of the right. | items.targets.item.1 = trial.gettargets.response response.rw.windowcenter = response.rw.windowcenter - 100 values.score = trial.game.correctcount * 5

Logical Operators

Logical operators return true or false depending on whether the operands are true or false. These operators are especially useful in conditional if-else statements that involve multiple conditions.

Operator Description Examples
&& Logical AND. True if both the left AND right operators are true. False if either operand is false.

if (block.test1.percentcorrect == 100 && block.test2.percentcorrect == 100) values.perfectscore = true

if (block.test.percentcorrect < 70 && block.test.medianlatency > 500) response.rw.windowcenter = 600

|| Logical OR. True if either the left OR right operand is true. False if both operands are false.

if (block.test1.percentcorrect < 100 || block.test2.percentcorrect < 100) values.perfectscore = false

if (trial.test.latency < 100 || trial.test.latency > 1000) values.discard = true

! Logical NOT. True if the operand is NOT true. False if the operand is NOT false. values.imperfect = !values.perfect

Conditional Statements

Conditional statements consist of two parts, a condition that evaluates to true or false, and a statement that is evaluated if the condition part is true. Conditional statements are often referred to as "if-else" statements. These are useful for event logic that conditionally updates values. They are also used by the branch attribute to determine whether any branching should occur.

Statement Description Examples
if ... else if ... else If the condition is true, then evaluate the first statement, otherwise evaluate the second statement.

if (block.test1.percentcorrect == 100 && block.test2.percentcorrect == 100) values.perfectscore = true

if (block.test.percentcorrect < 70 && block.test.medianlatency > 500) response.rw.windowcenter = 600

if (block.test1.percentcorrect < 100 || block.test2.percentcorrect < 100) values.perfectscore = false else values.perfectscore = true

Precedence and Grouping

You can use parentheses to set the order in which operations are applied, or to make your statements easier to read.

Delimiter | Description | Examples
() | Contains a set of statements that should be evaluated as a unit. | values.imperfect = (trial.test2.sumlatency + trial.test1.sumlatency) / (trial.test2.trialcount + trial.test1.trialcount)

Multiple Statements

Multiple statements can be expressed in event logic by separating each statement with a semi-colon.

Delimiter | Description | Examples
; | Delimiter for multiple statements | values.imperfect = !values.perfect; items.targets.item.1 = trial.gettargets.response; values.score = trial.game.correctcount * 5


Inquisit Language Reference

Global Functions

Inquisit supports the following list of built-in global functions.

Functions

abs

acos

asin

atan

atan2

capitalize

ceil

clear

clip

concat

constant

contains

correctcount

correctstreak

cos

cosh

count

deg

endswith

errorcount

errorstreak

evaluate

exp

floor

format

fpart

getitem

ifelse

insert

inwindowcount

inwindowstreak

ipart

length

ln

log

logn

max

maxlatency

meanlatency

medianlatency

min

minlatency

mod

noreplace

noreplacecorrect

noreplaceerror

noreplacenorepeat

notinwindowcount

notinwindowstreak

percentcorrect

percentinwindow

pofz

pow

rad

rand

randbernoulli

randbinomial

randchisquared

randexponential

randgamma

randgaussian

randgeometric

randlognormal

randpoisson

random

remove

replace

replaceall

replacenorepeat

reset

round

sdlatency

search

select

selectedcount

sequence

sin

sinh

sqrt

startswith

substring

sumlatency

tan

tanh

tolower

totalcorrectcount

totalcount

totalerrorcount

totalinwindowcount

totalmaxlatency

totalmeanlatency

totalmedianlatency

totalminlatency

totalnotinwindowcount

totalnumcorrect

totalpercentcorrect

totalpercentinwindow

totalsdlatency

totalsumlatency

totaltrialcount

totalvarlatency

toupper

trialcount

trim

trimleft

trimright

unselectedcount

varlatency

zofp


Constants

Inquisit includes a number of built-in constants that provide a convenient way to represent commonly used mathematical values in expressions.

Name | Description | Value
m_e | The base of natural logarithms, e. | e (2.71828182845904523536)
m_log2e | The base 2 logarithm of e. | log2(e) (1.44269504088896340736)
m_log10e | The base 2 logarithm of e. | log10(e) (0.434294481903251827651)
m_ln2 | The natural logarithm of 2. | ln(2) (0.693147180559945309417)
m_ln10 | The natural logarithm of 10. | ln(10) (2.30258509299404568402)
m_pi | The circumference of a circle with diameter 1, π. | π (3.14159265358979323846)
m_pi_2 | Half of π. | π/2 (1.57079632679489661923)
m_pi_4 | A quarter of π. | π/4 (0.785398163397448309616)
m_1_pi | The inverse of π. | 1/π (0.318309886183790671538)
m_2_pi | Twice the inverse of π. | 2/π (0.636619772367581343076)
m_2_sqrtpi | The inverse of the square root of π. | 2/(√ π) (1.12837916709551257390)
true | boolean true | 1
false | boolean false | 0
null | nothing or unspecified | 0


Copyright

Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user.

Millisecond Software may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Millisecond Software, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Copyright Millisecond Software, LLC. All rights reserved.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.


Inquisit 6 Help

Table of Contents

  • Inquisit Help
  • Introduction
  • Inquisit Tutorials
    • IAT with Custom Categories and Items
    • Standard Picture IAT
    • Simplified IAT
    • Subliminal Priming Task
    • Covert Attention Task
    • Dot Probe Task
    • Demographic Survey Tutorial
  • How To
    • How to Run an Experiment
    • Launch Inquisit Using Command Line Parameters
    • Run Individual Blocks, Trials, and Stimuli
    • Present Stimulus Items Provided by Subjects
    • Present Stimulus Pairs
    • Test a Script
    • Debug a Script
    • Interrupt an Experiment
    • Erase Stimuli
    • Analyze Voice Recordings
    • Adjust the Response Window
    • Control Response Timing
    • Control Trial Duration and Inter-Trial Intervals
    • Setup Speech Recognition
    • Present TTL Signals Through the Parallel Port (Windows and Mac)
    • Use the Parallel Port Monitor Tool (Windows and Mac)
    • Cedrus RB Series and Lumina Response Boxes with Inquisit
    • Cedrus StimTracker with Inquisit
    • Record Responses from a Serial Response Box
    • Run an Inquisit 6 Experiment on the Web
    • Combine Multiple Data Files into a Single File
    • Conditional Branching
    • Running Sequences of Inquisit Scripts and Other Applications
    • Combine Multiple Scripts
    • Interoperate Inquisit Web with Online Survey Packages
    • The Inquisit SR Research Eye Tracking Plugin
    • The Inquisit Tobii Eye Tracking Plugin
    • Set Event Markers in the Tobii Gazepoint Data Stream
    • Passing Parameters and Values Between Different Scripts in a Batch
    • Automated Registration of Inquisit Lab
  • Inquisit Web
    • Introducing Inquisit 6 Web
    • How to Run an Inquisit Experiment on the Web
    • Gathering Data Over the Web
    • Assigning Subject Numbers in Web Experiments
  • Inquisit Language Reference
    • Stimuli
      • html
      • clock
      • picture
      • port
      • shape
      • sound
      • systembeep
      • text
      • video
      • xid
      • item
      • Special Characters
    • Trials and Tasks
      • trial
      • likert
      • openended
      • slidertrial
      • surveypage
      • response
      • Keyboard Scan Codes
    • Blocks of Trials
      • block
      • survey
    • Instructions
      • instruct
      • page
      • htmlpage
    • Experiments
      • batch
      • expt
      • include
    • Data Recording
      • Data Format
      • data
      • summarydata
      • monkey
    • Surveys
      • caption
      • checkboxes
      • dropdown
      • image
      • listbox
      • radiobuttons
      • slider
      • survey
      • surveypage
      • textbox
    • Selection and Randomization
      • counter
      • list
    • Values and Expressions
      • expressions
      • parameters
      • values
    • Implicit Elements
      • computer
      • display
      • inquisit
      • joystick
      • mouse
      • script
    • Eye Tracking
      • eyetracker
      • eyetracker (tobii)
    • defaults
    • Comments
    • Expression Language
      • Overview
      • Logical and Arithmetic Operators
      • Global Constants
      • Global Functions


Repeatedly Presenting Stimulus Items Until a Correct Response is Given

A common requirement for learning tasks is to require that subjects correctly respond to every stimulus in a set before advancing to the next phase of the experiment. Such a procedure might randomly select items from the stimulus set to be presented, and participants are instructed to classify the stimulus item according to some set of choices. If the item is correctly classified, it is removed from the selection pool. If the participant makes an error, the item is replaced into the selection pool so that it may be selected and presented on a future trial. Once the subject correctly classifies each stimulus, their learning task is complete.

Implementing such a task in Inquisit is surprisingly simple with the addition of two features, 1) the noreplacecorrect option for controlling random seletion, and 2) the selectedcount variable for tracking the number of selected items in a stimulus set.

For the sake of example, our task will require that a set of words be correctly classified as pleasant or unpleasant. The first step in creating our learning task is to define the stimulus set. Our pleasant and unpleasant text stimuli are defined below.

<text pleasant>
/ items = pleasant
/ select = noreplacecorrect
</text>

<text unpleasant>
/ items = unpleasant
/ select = noreplacecorrect
</text>

<item pleasant>
/ 1 = "        HONOR        "
/ 2 = "        LUCKY        "
/ 3 = "       DIAMOND       "
/ 4 = "        LOYAL        "
/ 5 = "       FREEDOM       "
/ 6 = "       RAINBOW       "
/ 7 = "         LOVE        "
/ 8 = "        HONEST       "
/ 9 = "        PEACE        "
/10 = "        HEAVEN       "
</item>

<item unpleasant>
/ 1 = "         EVIL        "
/ 2 = "        CANCER       "
/ 3 = "       SICKNESS      "
/ 4 = "       DISASTER      "
/ 5 = "       POVERTY       "
/ 6 = "        VOMIT        "
/ 7 = "         BOMB        "
/ 8 = "        ROTTEN       "
/ 9 = "        ABUSE        "
/10 = "        MURDER       "
</item>

Note that the selection option is set to noreplacecorrect. This option instructs inquisit to randomly select stimulus items without replacing them if a correct response is given. If an incorrect response is given, the item is replaced.

The next step is to define the trials that present the pleasant or unpleasant stimuli and record the participants' classifications.

<trial pleasant>
/ stimulusframes = [1=pleasant]
/ validresponse = ("a", "5")
/ correctresponse = ("5")
/ branch = (text.pleasant.selectedcount, EQ, 0, unpleasant)
/ branch = (text.unpleasant.selectedcount, EQ, 0, pleasant)
</trial>

<trial unpleasant>
/ stimulusframes = [1=unpleasant]
/ validresponse = ("a", "5")
/ correctresponse = ("a")
/ branch = (text.unpleasant.selectedcount, EQ, 0, pleasant)
</trial>

The first trial presents pleasant stimuli and defines the "5" key as the correct response. The second trial presents the unpleasant stimuli and defines the "a" key as the correct response. In either case, if

Finally, we'll define a block that keeps running these trials until runs until

The batch element must be defined in its own seperate file. To run the batch element, simply open the script containing the batch element definition in Inquisit and run it as you would run any other script.

This is a very simple approach, but it is also somewhat limited. The batch provides no way to launch other programs besides Inquisit, and it does not allow you to counterbalance the order in which the scripts are run. For that, we can rely on Windows batch files.


Passing Parameters and Values Between Different Scripts in a Batch

Batch Parameters allow you to send input data to a script. The input data could be used, for example, to set a test's difficulty based on performance on a prior test, or incorporate responses from a prior test. For each batch <parameters> defined in the batch file, any <parameters> of the same name defined in the batch's script files will be set to whatever value the batch <parameters> has when the script starts.

Batch Values allow you to get output data from a script. The output data could be used, for example, store performance metrics from one test to be used in configuring a subsequent test. For each batch <values> defined in the batch file, if a test has a <values> with the same name, the batch <values> is set to whatever value the test <values> has when the test script ends.

Thus, data is exchanged between the batch and the scripts it runs by <parameters> and <values> with the same name. If no matching parameters names are found between batch and scripts, no data is exchanged.

Example: Sharing points across scripts

In the following example, a batch element called "example" calls two scripts, "scriptA.iqx" and "scriptB.iqx. Although scriptA and scriptB are different tasks, participants can earn points in each script and get paid for their total points earned in BOTH scripts at the end of scriptB.

ScriptA.iqx needs to have a way to send its total points to scriptB. The points from scriptA.iqx are first saved using batch values. Those values are then passed into scriptB.iqx using batch parameters.

Batch Script

* Here we define the batch parameters *
<parameters>
/ startPoints = 0
</parameters>

* Here we defined the batch values *
<values>
/totalPoints_scriptA = 0
</values>

<batch example>
/ file = "scriptA.iqx"
/ file = "scriptB.iqx"
/ onscriptend = [
    if (batch.example.currentscript == "scriptA.iqx")
    {
        parameters.startPoints = values.totalPoints_scriptA;
    }
]
</batch>

The batch script defines a value called "totalPoints_scriptA" that captures the points earned in scriptA.iqx. It also defines a parameter called "startPoints" that will be used to pass the points from scriptA.iqx to scriptB.iqx. These are are initialized to zero.

The batch element uses the onscriptend atribute to set the startPoints parameters after scriptA.iqx is finished. Specfically, the code checks to see whether the script that just finished was scrriptA.iqx, and if so, it sets parameters.startPoints = values.totalPoints_scriptA.

Script A

In order get the points from scriptA.iqx, that script must define a value named "totalPoints_scriptA", and it must set this to whatever the total number of points was at the end of the script. The relevant snippets from scriptA.iqx are below:

* Here we define the script value corresponding to the batch value *
<values>
/totalPoints_scriptA = 0
</values>

<trial A>
...
/ ontrialend = [
    if(trial.A.correct)
    {
        values.totalPoints_scriptA += 10;
    }
]
...
</trial>

Script B

To get points earned from scriptA.iqx, scriptB.iqx defines a parameter called "startPoints". This parameter is set by the batch at the start of the script, and at the beginning of the experiment (onexptbegin attribute), the points for scriptB.iqx are initialized to that parameter value.

* Here we define the script parameter corresponding to the batch parameter *
<parameters>
/ startPoints = 0
</parameters>

<values>
/ totalPoints_scriptB = 0
</values>

<expt B>
...
/ onexptbegin = [
    values.totalPoints_scriptB = parameters.startPoints;
]
...
</expt>


Inquisit Color Keywords

Colors

Color attributes can be assigned any of the following built in color names.

Color Names
aliceblue
antiquewhite
aqua
aquamarine
azure
beige
bisque
black
blanchedalmond
blue
blueviolet
brown
burlywood
cadetblue
chartreuse
chocolate
coral
cornflowerblue
cornsilk
crimson
cyan
darkblue
darkcyan
darkgoldenrod
darkgray
darkgreen
darkgrey
darkkhaki
darkmagenta
darkolivegreen
darkorange
darkorchid
darkred
darksalmon
darkseagreen
darkslateblue
darkslategray
darkslategrey
darkturquoise
darkviolet
deeppink
deepskyblue
dimgray
dimgrey
dodgerblue
firebrick
floralwhite
forestgreen
fuchsia
gainsboro
ghostwhite
gold
goldenrod
gray
green
greenyellow
grey
honeydew
hotpink
indianred
indigo
ivory
khaki
lavender
lavenderblush
lawngreen
lemonchiffon
lightblue
lightcoral
lightcyan
lightgoldenrodyellow
lightgray
lightgreen
lightgrey
lightpink
lightsalmon
lightseagreen
lightskyblue
lightslategray
lightslategrey
lightsteelblue
lightyellow
lime
limegreen
linen
magenta
maroon
mediumaquamarine
mediumblue
mediumorchid
mediumpurple
mediumseagreen
mediumslateblue
mediumspringgreen
mediumturquoise
mediumvioletred
midnightblue
mintcream
mistyrose
moccasin
navajowhite
navy
oldlace
olive
olivedrab
orange
orangered
orchid
palegoldenrod
palegreen
paleturquoise
palevioletred
papayawhip
peachpuff
peru
pink
plum
powderblue
purple
red
rosybrown
royalblue
saddlebrown
salmon
sandybrown
seagreen
seashell
sienna
silver
skyblue
slateblue
slategray
slategrey
snow
springgreen
steelblue
tan
teal
thistle
tomato
transparent
turquoise
violet
wheat
white
whitesmoke
yellow
yellowgreen


Inquisit Language Reference

Language Reference

The following is an exhaustive list of elements supported by the Inquisit scripting language. For help on attributes, properties, and the syntax for each element, click the element name below. You can also browse this list and additional language topics by selecting the "Contents" tab on the left and expanding the "Language Reference" node in the tree.

Stimuli

clock: Presents a timer or clock on the screen.
html: Selects and presents html content.
picture: Selects and presents graphics stimuli.
port: Selects and presents 8-bit codes through a serial or parallel port.
shape: Selects and presents rectangle, triangle, or circle stimuli.
sound: Selects and presents sound stimuli.
systembeep: Presents a beep using the internal system speaker.
text: Selects and presents text-based stimuli.
video: Selects and presents video stimuli.
xid: Selects and presents xid signals to Cedrus devices.
item: Defines the items in a stimulus set.

Trials and Tasks

trial: Presents stimulus sequences and measuring responses.
likert: Presents stimuli and gathers likert ratings.
openended: Presents stimuli and gathers openended responses.
surveypage : Presents a page of survey questions.
response: Defines a response procedure for use by expt, block or trial.

Block of Trials

block: Runs sequences of trials and presents instructions.
survey: Presents a sequence of survey pages.

Instructions

instruct: Controls instruction page browser.
page: Presents text as instruction page.
htmlpage: Presents html as instruction page.

Experiments

batch: Defines a batch element that runs a sequence of scripts.
expt: Runs sequences of blocks and presents instructions.
include: List of other script files to parse along with the current script.

Data Recording

data: Defines how data is recorded to file.
summarydata: Defines how a single line of summary data is recorded to file.
monkey: Defines performance characteristics for the Inquisit test monkey.

Surveys

survey: Presents a sequence of survey pages.
surveypage : Presents a page of survey questions.
caption: Presents a survey item consisting of only a caption.
checkboxes: Presents a checkbox survey item.
dropdown: Presents a dropdown list survey item of mutually exclusive response options.
image: Presents a survey item consisting only of a image and optional caption.
listbox: Presents a listbox survey item of mutually exclusive response options.
radiobuttons: Presents a radiobutton survey item of mutually exclusive response options.
slider: Presents a slider survey item for selection of a response along a continuum.
textbox: Presents a textbox survey item for text entry.

Selection and Randomization

list: A list data structure for storing and selecting arbitrary items.
counter: Deprecated list structure for storing and selecting arbitrary items.

Values and Expressions

values: Stores values that can be retrieved and updated throughout the experiment.
expressions: Stores expressions that can be used throughout the experiment.

Implicit Elements

script: Exposes properties representing the script and data collection session.
display: Exposes properties of the graphics display system.
computer: Exposes properties of the computer.
inquisit: Exposes properties of the currently running instance of Inquisit.
joystick: Exposes properties indicating the current state of a DirectX-compliant joystick. (Windows only)
mouse: Exposes properties indicating the current state of the mouse.

Eye Tracking

eyetracker: Core functionality for interacting with eye trackers.
eyetracker (Tobii): Tobii-specific extensions of eyetracker element for use with Tobii eye tracking systems.
eyetracker (SR Research Eyelink): EyeLink-specific extensions of eyetracker element for use with SR Research EyeLink eye tracking systems.

Other Elements

defaults: Sets default values for key attributes of elements.


How to Control Response Timing

By default, Inquisit measures response latency as the interval beginning at the onset of the last stimlus frame of the trial and ending when the subject issues a valid response. Responses made before the onset of the last stimulus frame are ignored.

The beginning of the response interval can be customized using the beginresponsetime or beginresponseframe members of <trial>. Beginresponsetime specifies how many milliseconds after the onset of the first frame the response interval should begin. Responseframe specifies how many frames after the first frame the response interval should begin.

For example, in the following trial, the response interval begins when the first stimulus, "prime", is presented.

<trial mytrial>
/ stimulusframes=[1=prime; 10=target]
/ beginresponseframe=1
</trial>


allowrepeats attribute

The allowrepeats attribute specifies whether a counter can select the same item more than once in a row.

Member of

<counter>

Syntax

/ allowrepeats = boolean

Parameters

boolean A value of true or false.

Remarks

This attribute assigns text labels to points on the Likert scale. Labels can be specified for any subset of points. The labels can be any string of text including blanks. Only one label can be assigned to a given point on the scale, and labels can not be assigned to points less than 0 or greater than the number of points specified in the numpoints attribute.

Examples

The following shows a five point Likert scale with evaluative labels:

<counter somecounter>
/ select=noreplace(1-10)
/ allowrepeats=false
</counter>


anchors attribute

The anchors attribute specifies the labels for the points of a Likert scale.

Member of

<likert>

Syntax

/ anchors = [point = "label"; point = "label"; point = "label"]

Parameters

point | An integer specifying a point on the Likert scale.
label | Specifies the label (in quotes) for a given point on the Likert scale.

Remarks

This attribute assigns text labels to points on the Likert scale. Labels can be specified for any subset of points. The labels can be any string of text including blanks. Only one label can be assigned to a given point on the scale, and labels can not be assigned to points less than 0 or greater than the number of points specified in the numpoints attribute.

Examples

The following shows a five point Likert scale with evaluative labels:

<likert ratingquestion>
/ stimulusframes=[1=sometext]
/ anchors=[1="excellent"; 2="good"; 3="satisfactory"; 4="bad"; 5="awful"]
</likert>


anchorwidth attribute

The anchorwidth attribute specifies the width, in pixels, of each anchor on the Likert scale.

Member of

Syntax

/ anchorwidth = width expression

Parameters

width expression An number specifying the width of each anchor on the Likert scale in pixels (default), percent, or points.

Remarks

The anchorwidth attribute controls the amount of space provided for the anchor labels, and thus the width of the entire scale. By default, the spacing between anchors is automatically computed as the minimum space required to display the anchor labels without overlapping them.

Examples

The following shows a five point Likert scale, the width of which affords 150 pixels to display each anchor:

<likert ratingquestion>
/ stimulusframes=[1=sometext]
/ anchors=[1="excellent"; 2="good"; 3="satisfactory"; 4="bad"; 5="awful"]
/ anchorwidth=150px
</likert>

The following shows a five point Likert scale, the width of which affords 3% of the screen to display each anchor:

<likert ratingquestion>
/ stimulusframes=[1=sometext]
/ anchors=[1="excellent"; 2="good"; 3="satisfactory"; 4="bad"; 5="awful"]
/ anchorwidth=3%
</likert>


animation attribute

The animation attribute changes the position of a visual stimulus over time.

Member of

<button> <clock> <picture> <shape> <text> <video>

Syntax

/ animation = circle(duration, loopcount, start, end, xcenter, ycenter, radius)

or

/ animation = path(duration, loopcount, x1, y1, x2, y2, x3, y3, ...)

or

/ animation = points(duration, loopcount, x1, y1, x2, y2, x3, y3, ...)

or

/ animation = size(duration, loopcount, startwidth, startheight, scale1, scale2, scale3, ...)

or

/ animation = rotation(duration, loopcount, degrees1, degrees2, degrees3, ...)

Parameters

duration | The duration in milliseconds of the entire animation.
loopcount | The number of times the animation should loop, or -1 for continuous looping.
start | The starting point on the circle as a percentage of the circular arc, ranging from 0 (top of the circle) to 100 (back to the top of the circle).
end | The ending point on the circle as a percentage of the circular arc, ranging from 0 (top of the circle) to 100 (back to the top of the circle). If the end point is greater than or equal to the starting point, the direction is clockwise, otherwise direction is counter-clockwise.
startwidth | The bounding width for the start of a size animation.
startheight | The bounding height for the start of a size animation.
xcenter | The horizontal coordinate of center point of the circle.
ycenter | The vertical coordinate of the center of the circle.
radius | The radius of the circle.
x1 | The horizontal position.
y1 | The vertical position.
x2 | The horizontal position.
y2 | The vertical position.
h1 | The height.
w1 | The width.
scale1 | The factor to scale a size animation.
degrees1 | The degrees of rotation for a rotation animation.

Remarks

The animation attribute enables the position of a stimulus to change throughout the course of a trial. The circle option moves the stimulus in a circle. The path option moves the stimulus on a continuous path across a set of given points. The points option repositions the stimulus across a set of discrete points. The size animation scales the stimulus larger or smaller based on a set of scale values. The rotation animation rotates the stimulus accordign to the specified degrees.

Examples

The following runs a repeating loop animation that moves a circle shape to move from the top-center to the bottom-center of the screen over 5 seconds.

<shape circle>
/ shape=circle
/ animation=path(5000, -1, 50%, 0%, 50%, 100%)
</shape>

The following runs an animation that moves a rectangle twice around a circular path that is centered on the screen with a radius half the height of the screen.

<shape circle>
/ shape=rectangle
/ animation=circle(5000, 2, 0, 100, 50%, 50%, 100%)
</shape>

The following runs a repeating loop animation that repositions a circle shape on two discrete points over a 5 second interval.

<shape circle>
/ shape=circle
/ animation=points(5000, -1, 50%, 0%, 50%, 100%)
</shape>

The following runs a repeating loop animation that doubles the size of a circle shape over a 5 second interval.

<shape circle>
/ shape=circle
/ animation=size(5000, -1, 20%, 20%, 1, 2)
</shape>

The following runs a repeating loop animation that spins a triangle shape 360 degrees over a 5 second interval.

<shape triangle>
/ shape=triangle
/ animation=rotation(5000, -1, 0, 360)
</shape>


aoidurationthreshold attribute

The AOI duration threshold attribute determines how long participants must gaze within an area of interest (i.e. an image) before a hit is scored.

Member of

<eyetracker> <eyetracker> <eyetracker>

Syntax

/ aoidurationthreshold = maxfixationtime

Parameters

maxfixationtime The maximum fixation time to use in the real-time determination of fixation points.

Remarks

Examples

The following sets the aoi duration threshold to 500 ms with a Tobii eye tracker:

<eyetracker>
/ framerate = "tobii"
/ aoidurationthreshold = 500
</eyetracker>

The following sets the aoi duration threshold to 500 ms with an EyeLink eye tracker:

<eyetracker>
/ framerate = "srresearch"
/ aoidurationthreshold = 500
</eyetracker>


aoihitcountthreshold attribute

Member of

Syntax

Parameters

Remarks

Examples

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


audit attribute

Member of

Syntax

Parameters

Remarks

Examples

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


backbuttonposition attribute

The backbuttonposition attribute sets the position on the screen of the back button on survey page.

Member of

<survey> <surveypage>

Syntax

/ backbuttonposition = (x value, y value)

Parameters

x value | The horizontal screen coordinate in pixels, percent(default), or points.
y value | The vertical screen coordinate in pixels, percent(default), or points.

Remarks

Horizontal backbuttonposition is relative to the left side. 0% is the left edge of the screen and 100% is the right edge. Vertical position is relative to the top of the screen, with 0% placing the stimulus at the top and 100% placing it at the bottom edge. The inverse is true for bidirectional locales such as Hebrew and Arabic. Percentages may be specified as decimals (e.g., 52.968) for increased precision.

Examples

The following sets back button position to the lower left corner of the screen:

<survey somesurvey>
/ pages=[1=page1; 2=page2; 3=page3]
/ nextbuttonposition = (90%, 90%)
/ backbuttonposition = (0%, 90%)
/ navigationbuttonfontstyle = ("Arial", 10%, true)
/ navigationbuttonsize = (10%, 10%)
</survey>

The following sets back button position to the upper left corner of a 1280 x 1024 resolution screen:

<surveypage page1>
/ pages=[1=page1; 2=page2; 3=page3]
/ nextbuttonposition = (774px, 0px)
/ backbuttonposition = (0px, 0px)
/ navigationbuttonfontstyle = ("Tahoma", 25px, false, true)
/ navigationbuttonsize = (250px, 50px)
</surveypage>


backlabel attribute

The backlabel attribute determines the text appearing on the back button on a survey or instruction page.

Member of

<survey> <surveypage>

Syntax

/ backlabel = "label"

Parameters

label A string in quotes serving as text for the button.

Remarks

The default value is "Back".

Examples

The following sets the back button label to "Previous Page":

<survey somesurvey>
/ backlabel = ("Previous Page")
</survey>


beginresponseframe attribute

Specifies the stimulus frame number at which Inquisit begins Registering responses.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ beginresponseframe = integer expression

Parameters

integer expression The frame number, or -1 to recognize all responses made during the trial.

Remarks

The beginresponseframe attribute enables tasks that allow subjects to respond before or during the presentation of stimuli. By default, Inquisit recognizes responses that occur after all stimulus frames have been presented. Responses given prior to or during presentation are ignored. Values 0 and 1 both refer to the first frame. A value of -1 tells Inquisit to recognize responses given at any point during the trial. Response latency is measured relative to the point specified by beginresponseframe, which is the beginning of the trial if set to -1.

Examples

The following trial presents a sequence of stimuli, allowing the subject to respond at any point during the sequence:

<trial mytrial>
/ stimulusframes = [1=sometext1; 10=sometext2; 20=sometext3; 30=sometext4; 40=sometext5]
/ beginresponseframe = 0
/ validresponse = (" ")
</trial>

The following trial presents a sequence of stimuli, allowing the subject to respond at any point after the 3rd stimulus is presented but not before:

<trial mytrial>
/ stimulusframes = [1=sometext1; 10=sometext2; 20=sometext3; 30=sometext4; 40=sometext5]
/ beginresponseframe = 20
/ validresponse = (" ")
</trial>


beginresponsetime attribute

Specifies the time, relative to the beginning of the stimulus presentation sequence, at which Inquisit begins registering responses.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ beginresponsetime = integer expression

Parameters

integer expression The time in milliseconds, or -1 to recognize responses made at any point during the trial.

Remarks

The beginresponsetime attribute enables tasks that allow subjects to respond before or during the presentation of stimuli. By default, Inquisit recognizes responses that occur after the stimulus presentation sequence, and responses given during the presentation are ignored. A value of -1 tells Inquisit to recognize responses given at any point during the trial. Response latency is measured relative to the point specified by beginresponsetime, which is the beginning of the trial if set to -1.

Examples

The following trial presents a sequence of stimuli, allowing the subject to respond at any point during the sequence:

<trial mytrial>
/ stimulustimes = [0=sometext1; 100=sometext2; 200=sometext3; 300=sometext4; 400=sometext5]
/ beginresponsetime = 0
/ validresponse = (" ")
</trial>

The following trial presents a sequence of stimuli, allowing the subject to respond at any point after the 3rd stimulus is presented but not before:

<trial mytrial>
/ stimulustimes = [0=sometext1; 100=sometext2; 200=sometext3; 300=sometext4; 400=sometext5]
/ beginresponsetime = 200
/ validresponse = (" ")
</trial>


bgstim attribute

The bgstim attribute specifies a set of background stimuli to present at the beginning of a block of trials.

Member of

<block>

Syntax

/ bgstim = (stimulusname, stimulusname, stimulusname)

Parameters

stimulusname The name of a stimulus element defined elsewhere in the script.

Remarks

This attribute is useful for presenting ambient background stimuli that hang around on the screen throughout a block of trials. Common uses include brief instructions to remind the subject how to respond (e.g., "Press the "a" for pleasant or "b" for unpleasant" or "Respond as quickly and accurately as you can"). The background stimuli are not erased until the block is finished, although they can be overwritten by other stimuli presented during the trials.

Examples

The following block presents two background stimuli:

<block myblock>
/ trials=[1-10=noreplace(trial1, trial2)]
/ bgstim=(remindertext, instructiontext)
</block>


bidirectional attribute

The bidirectional attribute specifies whether the experiment should present user controls such as checkboxes and dropdown lists in right-to-left format as required by Hebrew and Arabic script.

Member of

<defaults>

Syntax

/ bidirectional = boolean

Parameters

boolean A value of true or false.

Remarks

By default, Inquisit determines the layout of survey pages by examining the language settings on the computer. If the system locale on the computer is English, for example, survey questions start to the left and proceed rightward. If the system locale is Hebrew, however, survey questions start at the right of the screen and proceed rightward (i.e., mirroring).

The bidirectional attribute specifies a layout direction to use regardless of the system locale. This is useful, for example, if an English experiment is run on Arabic or Hebrew computers, or an Arabic experiment may be run on a western computer.

If bidirectional is false, the layout is left to right. If bidirectional is true, the layout is right to left (mirrored).

Note that Hebrew and Arabic text are always presented in right to left order regardless of this setting.

Examples

The following sets the text to bidirectional (right to left):

<defaults>
/ bidirectional= true
</defaults>


blockfeedback attribute

The blockfeedback attribute specifies which performance feedback the subject receives at the end of the block.

Member of

<block> <defaults>

Syntax

/ blockfeedback = (metric, metric, metric, ...)

Parameters

metric One of the following performance metrics:
Value | Description
meanlatency | The average response latency for the block in milliseconds.
medianlatency | The median response latency for the block in milliseconds.
window | The percentage of responses occurring within the response window in the block.
correct | The percentage of correct responses made in the block.

Remarks

If blockfeedback is specified, an special instruction screen appears at the end of the block reporting the subject's performance. If you wish to present additional performance feedback or to customize the appearance of the feedback page, you may do so using instruction pages with variable replacement expressions for the desired performance metrics.

Examples

The following block reports the subject's average latency and percent correct once at the end.

<block myblock>
/ trials=[1-20=noreplace(testtrials, distractortrials)]
/ blockfeedback = (meanlatency, correct)
</block>


blocks attribute

The blocks attribute specifies the sequence of blocks to run in the experiment.

Member of

<expt>

Syntax

/ blocks = [blocknumber, blocknumber = blockname;blocknumber = list.name; blocknumber-blocknumber = selectmode(blockname, blockname,...); blocknumber, blocknumber-blocknumber = blockname]

Parameters

blocknumber | A non-negative integer specifying the block number.
list.name | The name of a list element containing a set of blocks.
blockname | The name of a block defined elsewhere in the script to be run on this block.
selectmode One of the following values:
Value | Description
noreplace | Randomly selects without replacement which block in the group to run.
noreplacenorepeat | Randomly selects which block in the group to present without replacement and without selecting any single block consecutively.
replace | Randomly selects with replacement which block in the group to run.
replacenorepeat | Randomly selects which block in the group to present with replacement and without selecting any single block consecutively.
sequence | Runs each block in the group.

Remarks

The integers to the left of the equal signs represent ordinal positions within the sequence of blocks. Blocks can be directly assigned to a position in the sequence using the equals sign. A block can be simultaneously assigned to multiple positions by separating the position numbers with commas (equivalent to "and") or dashes (equivalent to "through"). All block positions in the block must be assigned to a block or set of blocks.

Examples

This example runs five blocks selected from a list element called 'blockselector':

<expt example>
/ blocks=[1-5=blockselector]
</expt>

The first five blocks of the following block are practiceblock, and the last five blocks are testblock:

<expt>
/ blocks=[1-5=practiceblock; 6-10=testblock]
</expt>

The following expt randomly selects either leftblock or rightblock for each of its ten blocks. Both block types are run exactly five times.

<expt>
/ blocks=[1-10=noreplace(leftblock, rightblock]
</expt>

The following expt randomly selects either testblock or distractorblock for each of its 12 blocks. The testblock is run exactly 8 time and distractorblock is run 4 times.

<expt>
/ blocks=[1-12=noreplace(testblock, testblock, distractorblock)]
</expt>

The following expt runs bigblock on even numbered blocks and littleblock on odd numbered blocks.

<expt>
/ blocks=[1,3,5,7,9 = littleblock; 2,4,6,8,10 = bigblock]
</expt>


branch attribute

The branch command enables a script to conditionally run sequences of blocks or trials based on the subject's performance.

Member of

<block> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Syntax

/ branch = [if expression then event]

Parameters

expression | A logical expression that determines whether to branch.
event | The full name of the event (i.e., trial, block, etc.) to run if the expression is true. If nothing should be run, specify "notrial", "noblock", or "noexpt" for trials, blocks, and expts respectively.

Remarks

The branch attribute can be used to create task flow that dynamically adapts based on the subject's performance or the current state of the script. You may specify multiple branch commands, in which case each condition is evaluated in the specified order. The first condition that is true determines the next element. Care must be take to avoid defining branches that result in infinite loops.

Examples

The following trial repeats itself until a streak of 10 correct responses in a row. If 10 correct responses are given in a row, a trial called "congrats" is run.

<trial mytrial>
/ stimulusframes=[1=sometext]
/ validresponse=("a", "b")
/ correctresponse=("a")
/ branch=[if (trial.mytrial.correctstreak >= 10) trial.congrats]
/ branch=[if (trial.mytrial.correctstreak < 10) trial.mytrial]
</trial>

The following trial repeats itself at least 5 times. The trial is then repeated as long as the mean latency for this type of trial is greater than 500 milliseconds. When 50 trials are run, the trial no longer repeats.

<trial mytrial>
/ stimulusframes=[1=sometext]
/ validresponse=("a", "b")
/ correctresponse=("a")
/ branch=[if (trial.mytrial.count >= 50) notrial]
/ branch=[if (trial.mytrial.count < 5) trial.mytrial]
/ branch=[if (trial.mytrial.meanlatency > 500) trial.mytrial]
</trial>

The following block runs a randomly selected order of "testtrials" and "distractortrials". It repeats until the subject responds with 60% accuracy or better on the "testtrials" only. The block repeats a maximum of 5 times before moving on to the next block.

<block myblock>
/ trials=[1-20=noreplace(testtrials, distractortrials)]
/ branch=[if (block.myblock.count > 5) 0]
/ branch=[if (trial.testtrials.percentcorrect < 60) block.myblock)
</block>

The following trial demonstrates a complex conditional statement that determines whether "testtrial" should be run.

<trial mytrial>
/ stimulusframes=[1=sometext]
/ validresponse=("a", "b")
/ correctresponse=("a")
/ branch=[if (trial.mytrial.count * sqrt(text.sometext.currentitemnumber) * abs(values.balance) == 4.55167) trial.testtrial]
</trial>


buttonlabel attribute

The buttonlabel attribute specifies the text appearing on the button for committing openended responses.

Member of

<openended> <slidertrial>

Syntax

/ buttonlabel = "string"

Parameters

string The text label to display on the button.

Remarks

Subjects can commit their response by mouse clicking on the button if mouse is true, or by pressing CTRL+RETURN. The default label is "Next >>".

Examples

The following displays "Click to continue" on the button.

<openended question>
/ stimulusframes=[1=sometext]
/ mouse = true
/ buttonlabel = "Click to continue"
</openended>


buttonvalues attribute

The buttonvalues attribute specifies the values to record in the data file when the subject selects a give likert point.

Member of

<likert>

Syntax

/ buttonvalues = [point="value", point="value", point="value"]

Parameters

point | An integer specifying a point on the Likert scale.
value | Specifies the value (in quotes) to record in the data file if the subject selects the corresponding point.

Remarks

This command is useful for recording likert responses as something other than a likert number, such as a word or a negative number. By default, the button's number is recorded to the data file.

Examples

The following shows a five point Likert scale that records letters rather than numbers to the data file:

<likert ratingquestion>
/ stimulusframes=[1=sometext]
/ anchors=[1="excellent"; 2="good"; 3="satisfactory"; 4="bad"; 5="awful"]
/ buttonvalues=[1="a"; 2="b"; 3="c"; 4="d"; 5="e"]
</likert>


calibrationmode attribute

Specifies a the type of calbration to run prior to running the script.

Member of

<eyetracker> <eyetracker> <eyetracker>

Syntax

/ calibrationmode = mode

Parameters

mode Valid modes are "H3", "HV5", "HV9", and "HV13".

Remarks

This attribute controls the number of position of the calibration targets that are presented while calibrating the eye tracker.

Examples

The following uses an animated gif as the calibration target and displays it at 5 locations on the screen.

<eyetracker>
/ plugin = "srresearch"
/ calibrationmode = "HV5"
/ calibrationmode = spiralvideo.gif
</eyetracker>

The following displays calibration targets in 5 locations on the screen.

<eyetracker>
/ plugin = "tobii"
/ calibrationmode = "HV9"
</eyetracker>


calibrationpointcolor attribute

The calibrationpointcolor attribute sets the color of the calibration target center point.

Member of

<eyetracker>

Syntax

/ calibrationpointcolor = (red value, green value, blue value)

or

/ calibrationpointcolor = color name

or

/ calibrationpointcolor = color value

Parameters

red value | An integer from 0 to 255 specifying the intensity of the red component.
green value | An integer from 0 to 255 specifying the intensity of the green component.
blue value | An integer from 0 to 255 specifying the intensity of the blue component.
color name | The name of a built in color.
color value | A 32-bit argb value specified as in integer or a CSS hex value (e.g., #0000FF or #00F for blue).

Remarks

The default calibrationpointcolor is white (255, 255, 255).

Examples

The following sets the calibration target color to blue:

<eyetracker myblock>
/ calibrationpointcolor = (0, 0, 255)
</eyetracker>


calibrationstimulus attribute

Specifies a custom stimulus to present at each of the calibration points.

Member of

<eyetracker> <eyetracker>

Syntax

/ calibrationstimulus = stimulus

Parameters

stimulus The name of the visual stimulus to present. Valid options include video, picture, text, and shape stimuli.

Remarks

This attribute enables presentation of a custom stimulus such as a picture or video duration calibration of the eye tracker. This is useful in preferential looking paradigms with infants where a stimulus that grabs the infant's attention is required.

Examples

The following uses an animated gif as the calibration target and displays it at 5 locations on the screen.

<eyetracker>
/ plugin = "srresearch"
/ calibrationmode = "HV5"
/ calibrationmode = spiralvideo.gif
</eyetracker>


calibrationtargetcolor attribute

The calibrationtargetcolor attribute sets the color of the calibration target.

Member of

<eyetracker>

Syntax

/ calibrationtargetcolor = (red value, green value, blue value)

or

/ calibrationtargetcolor = color name

or

/ calibrationtargetcolor = color value

Parameters

red value | An integer from 0 to 255 specifying the intensity of the red component.
green value | An integer from 0 to 255 specifying the intensity of the green component.
blue value | An integer from 0 to 255 specifying the intensity of the blue component.
color name | The name of a built in color.
color value | A 32-bit argb value specified as in integer or a CSS hex value (e.g., #0000FF or #00F for blue).

Remarks

The default calibrationtargetcolor is white (255, 255, 255).

Examples

The following sets the calibration target color to blue:

<eyetracker myblock>
/ calibrationtargetcolor = (0, 0, 255)
</eyetracker>


canvasaspectratio attribute

The canvasaspectratio attribute defines the relative height and width of the bounding rectangle within which visual stimuli are positioned on the screen.

Member of

<defaults>

Syntax

/ canvasaspectratio = (width, height)

Parameters

width | The width of the aspect ratio.
height | The height of the aspect ratio.

Remarks

The canvasaspectratio attribute can be used in combination with the canvasassize and canvasposition attributes to define a rectangle on the screen relative to which all visual stimuli and sized and positioned. These attributes that the relative size and position of stimuli on the screen remains the same across monitors of different shapes and sizes..

Examples

The following ensures that visual stimuli are presented in a rectangle that has the same proportions as an 8.5 x 11 inch sheet of paper and with margins around the screen no smaller than 20%.

<defaults>
/ canvassize=(80%, 80%)
/ canvasaspectratio=(8.5, 11)
</defaults>


canvasposition attribute

The canvasposition attribute specifies the location on the screen of the region on the screen on which visual stimuli are positioned and sized.

Member of

<defaults>

Syntax

/ canvasposition = (x value, y value)

Parameters

x value | The horizontal screen coordinate in pixels, percent(default), or points.
y value | The vertical screen coordinate in pixels, percent(default), or points.

Remarks

Canvasposition specifies the location of the center of canvas. Coordinates are relative to the top left corner of the screen. Thus, a position of (0, 0) is the top left corner, and (0, 100%) is the bottom left cornder.

The canvasposition attribute can be used in combination with the canvasassize and canvasaspectratio attributes to define a rectangle on the screen relative to which all visual stimuli and sized and positioned. These attributes that the relative size and position of stimuli on the screen remains the same across monitors of different shapes and sizes..

Examples

The following ensures that visual stimuli are presented in a rectangle that has the same proportions as an 8.5 x 11 inch sheet of paper and that has a left margin of 20% relative to the edge of the screen.

<defaults>
/ canvasasposition=(20%, 0)
/ canvasassize=(80%, 100%)
/ canvasaspectratio=(8.5, 11)
</defaults>


canvassize attribute

The canvassize attribute defines the maximum width and height of the bounding rectangle within which visual stimuli are positioned on the screen.

Member of

<defaults>

Syntax

/ canvassize = (width variable, height variable)

Parameters

width variable | The width of the rectangle in pixels (default), percent, or points.
height variable | The height of the rectangle in pixels (default), percent, or points.

Remarks

The canvassize attribute can be used in combination with the canvasaspectratio and canvasposition attributes to define a rectangle on the screen relative to which all visual stimuli and sized and positioned. These attributes that the relative size and position of stimuli on the screen remains the same across monitors of different shapes and sizes..

Examples

The following ensures that visual stimuli are presented in a rectangle that has the same proportions as an 8.5 x 11 inch sheet of paper and with margins around the screen no smaller than 20%.

<defaults>
/ canvassize=(80%, 80%)
/ canvasaspectratio=(8.5, 11)
</defaults>


caption attribute

The caption attribute determines the caption text for a survey item or button.

Member of

<button> <caption> <checkboxes> <dropdown> <image> <listbox> <radiobuttons> <slider> <surveypage> <textbox>

Syntax

/ caption = "text"

Parameters

text A string in quotes serving as caption for the survey item.

Remarks

The default is no caption.

Captions can be richly formatted using a subset of supported HTML markup tags. For example, markup tags can be used to make selected words appear in bold, italics, a different font, or a different color. For more information on formatting options, see Using HTML Markup in Text

Examples

The following presents a textbox question with a caption "What is your name?".

<textbox question1>
/ caption = "What is your name?"
/ textboxsize=(200, 100)
</textbox>


charlimit attribute

The charlimit attribute determines the maximum number of characters allowed for an openended response.

Member of

<openended>

Syntax

/ charlimit = integer

Parameters

integer An integer specifying a the maximum number of characters allowed.

Remarks

When the number of characters typed by the respondent reaches this limit, additional typing is ignored (unless the respondent first deletes characters). The default setting is 20 characters.

Examples

The following allows subjects to enter responses up to 100 characters.

<openended question>
/ stimulusframes=[1=sometext]
/ charlimit = 100
</openended>


format attribute

The format attribute determines how time is displayed on a clock.

Member of

<clock>

Syntax

/ format = clockformat

Parameters

clockformat One of the following values:
Value | Description
h | the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
hh | the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
H | the hour without a leading zero (0 to 23, even with AM/PM display)
HH | the hour with a leading zero (00 to 23, even with AM/PM display)
m | the minute without a leading zero (0 to 59)
mm | the minute with a leading zero (00 to 59)
s | the second without a leading zero (0 to 59)
ss | the second with a leading zero (00 to 59)
z | the milliseconds second without a leading zero (0 to 999)
zzz | the milliseconds second with a leading zero (000 to 999)
AP or A | use AM/PM display. AP will be replaced by either "AM" or "PM"
ap or a | use am/pm display. ap will be replaced by either "am" or "pm"
t | the timezone (for example "CEST")

Remarks

The format attribute takes an expression string that controls how hours, minutes, and seconds are displayed on the screen.

Examples

The following clock displays a timer counting down hours, minutes, and seconds:

<clock timer>
/ mode = timer
/ txcolor = yellow
/ txbgcolor = black
/ timeout = 300000
/ position = (50%, 10%)
/ format = "hh:mm:ss"
</clock>


mode attribute

The mode attribute specifies whether a onscreen clock functions like a timer, progress bar, stopwatch, or a regular clock.

Member of

<clock>

Syntax

/ mode = clockmode

Parameters

clockmode One of the following values:

Value | Description
timer | The clock counts down to zero from the specified timeout.
stopwatch | The clock starts at zero and displays the elapsed time.
clock | The clock displays the current time.
progressbar | The clock is displayed as a progress bar.

Remarks

When in progress bar mode, the bar runs horizontally if the width is greater than the height, and vertically if the height is greater than the width. The color of the bar is determined by the txcolor attribute and the background by the txbgcolor attribute.

Examples

The following shows a stopwatch that displays the elapsed minutes and seconds:

<clock a>
/ format = "mm:ss"
</clock>

The following displays a green horizontal progressbar on a light gray background with a 10 second duration:

<clock a>
/ mode = progressbar
/ timeout = 10000
/ size = (200px, 20px)
/ txcolor = green
/ txbgcolor = lightgray
</clock>


color attribute

The color attribute specifies the color of the shape.

Member of

<shape>

Syntax

/ color = (red value, green value, blue value)

or

/ color = color name

or

/ color = color value

Parameters

red value | An integer from 0 to 255 specifying the intensity of the red component.
green value | An integer from 0 to 255 specifying the intensity of the green component.
blue value | An integer from 0 to 255 specifying the intensity of the blue component.
color name | The name of a built in color.
color value | A 32-bit argb value specified as in integer or a CSS hex value (e.g., #0000FF or #00F for blue).

Remarks

All colors in Inquisit are specified as a blend of red, green, and blue components. The intensity of each component can be varied to form a wide variety of color shades (16,581,375 to be exact). The default color is white.

Examples

The following defines a blue square:

<shape bluesquare>
/ shape = rectangle
/ size = (100, 100)
/ color = (0, 0, 255)
</shape>

The following defines a grey circle:

<shape greycircle>
/ shape = circle
/ color = (100, 100, 100)
</shape>

The following defines a purple triangle:

<shape purpletriangle>
/ shape = triangle
/ color = (255, 0, 255)
</shape>


columns attribute

The columns attribute specifies which data columns to record to the data file.

Member of

<data>

Syntax

/ columns = (columnname, columnname, columnname, property, property, property)

Parameters

property Any property of any element may be listed as a data column. This includes custom properties defined in the values and expressions elements.
columnname A predefined data column. Any of the following predefined columns are allowed:
Name | Description
date | date (mmddyy) of the experiment
time | time (hh:mm) the experiment started
build | build number of the Inquisit executable running the session
group | group id entered at the beginning of an experiment
subject | subject id entered at the beginning of an experiment
session | session id entered at the beginning of an experiment
trialcode | trialcode for the current trial (default trialcode is the trial's name)
blockcode | name of the current block
blocknum | block number
trialnum | number of the trial in the current block.
latency | number of milliseconds from the end of the last display frame until a valid response is given
response | Scan code of the pressed response key
responsetext | Character of the pressed response key
correct | indicates whether the response was correct (1) or incorrect (0)
error | indicates whether the response was incorrect (1) or correct (0)
inwindow | indicates whether the response was inside (1) or outside of (0) the response window
windowcenter | the current response window center (ms), or 0 if the response window is not being used
pretrialpause | length of pause (ms) at the beginning of the trial
posttrialpause | length of pause (ms) at the end of the trial
meanlatency | running average latency in the current block
medianlatency | running median latency in the current block
sumlatency | running sum of response latencies in the current block
minlatency | shortest latency in the current block
maxlatency | longest latency in the current block
sdlatency | running standard deviation of response latencies in the current block
varlatency | running variance of response latencies in the current block
numcorrect | running total of correct responses in the current block
percentcorrect | running percentage of correct responses in the current block
correctstreak | running count of consecutive correct responses in the current block.
errorstreak | running count of consecutive incorrect responses in the current block
numinwindow | running total of responses falling within the response window in the current block
percentinwindow | running percentage of responses falling within the response window in the current block
count | running total of trials in the current block
totalmeanlatency | running average latency over the entire experiment
totalmedianlatency | running median latency over the entire experiment
totalsumlatency | running sum of response latencies over the entire experiment
totalminlatency | shortest latency over the entire experiment
totalmaxlatency | longest latency over the entire experiment
totalsdlatency | running standard deviation of response latencies over the entire experiment
totalvarlatency | running variance of response latencies over the entire experiment
totalnumcorrect | running total of correct responses over the entire experiment
totalpercentcorrect | running percentage of correct responses over the entire experiment
totalcorrectstreak | running count of consecutive correct responses over the entire experiment
totalerrorstreak | running count of consecutive incorrect responses over the entire experiment
totalnuminwindow | running total of responses falling within the response window over the entire experiment
totalpercentinwindow | running percentage of responses falling within the response window over the entire experiment
totalcount | running total of trials over the entire experiment
simulusnumber | the item number presented on the current trial
stimulusitem | the item presented on the current trial
stimulusonset | the onset time in milliseconds of the presented stimulus

Remarks

The columns attribute specifies the data values to be recorded to file and the column in which they are written. There are three types of columns that can be listed: 1) a reserved keyword representing a particular data value, and 2) any property of any element defined in the script. The data values may be specified in any order. On each trial, Inquisit will write a single line of data consisting of each data value specified by the column. Columns will appear in the data file in the specified order.

Stimulusnumber, stimulusitem, and stimulusonset receive special treatment.

The first stimulusnumber specified in the columns attribute indicates that the item number of the first stimulus appearing on the current trial should be recorded. The second stimulusnumber indicates that the item number of the second stimulus presented on the trial should be recorded, and so on. If no 1st, 2nd, 3rd, etc. stimulus is presented on a given trial, a '0' is recorded.

Similarly, the first stimulusitem specified in the columns attribute indicates that the actual item presented by the first stimulus appearing on the current trial should be recorded. If the stimulus is <text> or <port>, the actual item is recorded. If the stimulus is a <sound>, <picture>, or <video>, the item’s filename is recorded. If the stimulus is a <shape>, the name of the shape is recorded. Like stimulusnumber, each successive stimulusitem records the item from each successive stimulus presented on the trial. If no 1st, 2nd, 3rd, etc. stimulus is presented on a given trial, a '0' is recorded.

Similarly, the first stimulusonset specified in the columns attribute indicates that the onset time of the first stimulus appearing on the current trial should be recorded. Like stimulusnumber, each successive stimulusonset records the onset time for each successive stimulus presented on the trial. If no 1st, 2nd, 3rd, etc. stimulus is presented on a given trial, a '0' is recorded.

Examples

The following records 10 columns to the data file:

<data>
/ columns=(group, subject, computer.ipaddress.1, blockcode, trialcode, trialnum, latency, response, stimulusitem, stimulusitem, values.totalearnings, values.dprime, script.elapsedtime)
</data>


combaudrates attribute

The combaudrates attribute sets baudrate of the PC's serial ports.

Member of

<defaults>

Syntax

/ combaudrates = (port = baudrate, port = baudrate, port = baudrate, ...)

Parameters

port One of the following values:
Value | Description
com<n> | The signal is defined a serial port signal, where n specifies the port number (e.g., COM1, COM2, COM3, ...).
baudrate A positive integer representing the baudrate to set the port.

Remarks

This attribute is useful when using external input devices that require serial port communication at a particular baud rate. For example, the Cedrus response boxes require the COM port to communicate at 9600 kbs.

Examples

The following presents a textbox question, with the textbox sized to 200 by 100 pixels.

<defaults>
/ combaudrates = (COM1=9600, COM2=9600)
/ textboxsize=(200, 100)
</defaults>


correctmessage attribute

The correctmessage attribute specifies whether to display a feedback stimulus when the subject responds correctly.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Syntax

/ correctmessage = false

or

/ correctmessage = true(stimulusname, duration)

Parameters

stimulusname | The name of a stimulus element defined elsewhere in the script.
duration | An integer or property specifying duration in milliseconds for which the stimulus is displayed on the screen. A value of "0" indicates that stimulus should be displayed for the remaining duration of the trial.

Remarks

Correctmessage specifies a stimulus to be shown immediately after the subject gives a correct response on a trial. The stimulus is shown for duration milliseconds. Correctmessage can be set at the <trial>, <block>, or <expt> level, with <trial> settings overriding <block> settings and <block> settings overriding <expt> settings. Default is false.

Examples

The following block displays text for 500 milliseconds if a correct response is given:

<block myblock>
/ trials=[1-10=noreplace(trial1, trial2)]
/ correctmessage=true(correcttext, 500)
</block>

The following block displays text for values.duration milliseconds if a correct response is given:

<block myblock>
/ trials=[1-10=noreplace(trial1, trial2)]
/ correctmessage=true(correcttext, values.duration)
</block>


correctresponse attribute

The correctresponse attribute specifies the set of responses considered correct for a given trial.

Member of

<checkboxes> <defaults> <dropdown> <likert> <listbox> <openended> <radiobuttons> <slider> <slidertrial> <textbox> <trial>

Syntax

/ correctresponse = ("character", "character",...)

or

/ correctresponse = (scancode, scancode, ...)

or

/ correctresponse = (stimulusname, stimulusname, ...)

or

/ correctresponse = (mouseevent, mouseevent, ...)

or

/ correctresponse = (joystickevent, joystickevent, ...)

or

/ correctresponse = ("word", "word", ...)

or

/ correctresponse = (keyword)

or

/ correctresponse = (property, property, ...)

Parameters

character | A character indicating a correct keyboard response.
scancode | An integer specifying the scancode of a correct keyboard response. See the scancodes table for corresponding key value assignments.
stimulusname | The name of a stimulus element defined elsewhere in the script.
mouseevent Any of the following mouse events:
Name | Description
lbuttondown | Left mouse button down
lbuttonup | Left mouse button up
lbuttondblclk | Left mouse button double click
rbuttondown | Right mouse button down
rbuttonup | Right mouse button up
rbuttondblclk | Right mouse button double click
mbuttondown | Middle mouse button down
mbuttonup | Middle mouse button up
mbuttondblclk | Middle mouse button double click
joystickevent Any of the following joystick events:
Name | Description
buttona | button a
buttonb | button b
buttoncenter | center button
buttonguide | guide button
buttonselect | selection button
buttonstart | start button
buttonup | up direction button
buttondown | down direction button
buttonleft | left direction button
buttonright | right direction button
buttonx | x button
buttony | y button
buttonl1 | left shoulder button
buttonl2 | left trigger button
buttonl3 | left stick button
buttonr1 | right shoulder button
buttonr2 | right trigger button
buttonr3 | right stick button
leftthumbstickback | left thumbstick back value
leftthumbstickforward | left thumbstick forward value
leftthumbstickleft | left thumbstick left value
leftthumbstickright | left thumbstick right value
rightthumbstickback | right thumbstick back value
rightthumbstickforward | right thumbstick forward value
rightthumbstickleft | right thumbstick left value
rightthumbstickright | right thumbstick right value
change | any change in joystick state
word | A string (in quotes) indicating a correct spoken or openended response.
keyword Can be any of the following values:
Name | Description
noresponse | The absence of a response is considered correct. This setting requires that a timeout be defined for the trial.
anyresponse | Any response is considered correct.

Remarks

This attribute specifies an array of responses considered correct for this trial. Responses specified in correctresponse are automatically considered valid responses and need not also be specified in validresponse. Inquisit uses this attribute to determine whether the subject's response was correct for a given trial so that the error feedback can be given if necessary and to determine whether the value (0 or 1) should written to the "correct" column of the data file. The syntax of the settings depends on the type of input device used (e.g., mouse, keyboard, voice) as defined by the inputdevice attribute.

For all input devices, "noresponse" can be specified to indicate that the absence of a response should be considered a correct response. This setting can be used in conjunction with the timeout attribute to implement "go/no go" tasks.

For voice and openended input, the correctresponse can be set to a stimulus name, in which case the currently selected item in that stimulus is considered a correct response. This is useful for naming or recall tasks where the correct response is determined by whatever stimulus item is currently presented.

For mouse input, the correctresponse can be set to a stimulus name, in which case the subject must click on the area of the screen occupied by the stimulus.

Examples

In the following trial, pressing the space bar or "8" key is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ correctresponse=(" ", "8")
</trial>

In the following trial, pressing the tab key is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ correctresponse=(15)
</trial>

In the following trial, pressing the key with a scancode or character value equal to the value.leftresponse and value.rightresponse properties is considered correct:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ correctresponse=(values.leftresponse, values.rightresponse)
</trial>

In the following trial, a right mouse press is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=mouse
/ correctresponse=(rbuttondown)
</trial>

In the following trial, moving the right joystick left or right is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=joystick
/ correctresponse=(rightthumbstickleft, rightthumbstickright)
</trial>

In the following trial, a clicking the area on the screen occupied by the "sometext" stimulus is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=mouse
/ correctresponse=(sometext)
</trial>

In the following trial, pronouncing the currently selected item in "sometext" is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=voice
/ correctresponse=(sometext)
</trial>

In the following trial, typing the currently selected item in "sometext" is considered correct:

<openended mytrial>
/ stimulusframes=[1=sometext]
/ correctresponse=(sometext)
</openended>

In the following trial, typing "yes" is considered correct:

<openended mytrial>
/ stimulusframes=[1=sometext]
/ correctresponse=("yes")
</openended>

In the following trial, the absence of a response before the 1000 millisecond deadline is considered correct:

<trial mytrial>
/ stimulusframes=[1=sometext]
/ inputdevice=voice
/ validresponse=(sometext)
/ correctresponse=(noresponse)
/ timeout = 1000 </trial>


correcttarget attribute

The correcttarget attribute repeats a block until the specified accuracy criterion is met.

Member of

<block>

Syntax

/ correcttarget = (property, target, maxblocks)

Parameters

property | The performance measure (e.g., "percentcorrect", "numcorrect").
target | An integer indicating the target performance level. For example, if the property is percentcorrect, a value of 75 would set the threshold to 75% accuracy.
maxblocks | An integer indicating the maximum number of iterations of the block to run before moving on, regardless of whether performance has reached the target. A value of 0 indicates there is no maximum.

Remarks

When a correcttarget is specified for a block, the block is repeated until the subject's performance accuracy reaches the specified target or until the block is run the maximum number of times. This command is useful for practice blocks where it is important that performance reaches a desired threshold before moving on to data collection blocks. The command can be combined with the latencytarget command to define both speed and accuracy thresholds.

Examples

In the following block repeats itself until either the subject responds correct on 90 of 100 trials, or the block is repeated 5 times, whichever comes first:

<block myblock>
/ trials=[1-100=sometrial]
/ correcttarget=(numcorrect, 90, 5)
</block>


items attribute

The items attribute defines the pool of items to be selected by a counter element.

Member of

<counter>

Syntax

/ items = (value, value, value,... )

Parameters

value A value, numeric or otherwise, to be included in the selection pool.

Remarks

Values in the item pool can be numbers, strings, and properties.

Examples

The following randomly selects the name of a president:

<counter presidents>
/ select = noreplace
/ items = ["George Washington"; "John Adams"; "Thomas Jefferson"]
</counter>

The following selects a countdown of numbers:

<counter countdown>
/ select = sequence
/ items = [3; 2; 1]
</counter>


select attribute

The select attribute determines the method by which individual items are selected for presentation on a given trial.

Member of

<counter>

Syntax

/ select = integer

or

/ select = selectionmode

or

/ select = selectionmode(pool)

or

/ select = dependency(stimulusname)

or

/ select = dependency(countername)

or

/ select = countername

Parameters

integer | An integer value.
selectionmode One of the following values:
Value | Description
noreplace | Randomly selects without replacement.
sequence | Selects items in sequential order.
noreplacenorepeat | Randomly selects without replacement and without selecting any single item multiple consecutive times.
noreplacecorrect | Randomly selects without replacement unless an incorrect response is given.
noreplaceerror | Randomly selects without replacement unless a correct response is given.
replace | Randomly selects with replacement.
replacenorepeat | Randomly selects with replacement and without selecting any single item multiple consecutive times.
constant | Selects a single constant value.
dependency One of the following values:
Value | Description
noreplacenot | Randomly selects without replacement, reselecting the item if it matches the currently selected item of the specified stimulus or counter.
replacenot | Randomly selects with replacement, reselecting the item if it matches the currently selected item of the specified stimulus or counter.
current | Selects the current item of the specified stimulus or counter.
next | Selects the next item of the specified stimulus or counter.
stimulusname | The name of a stimulus defined elsewhere in the script.
countername | The name of a counter defined elsewhere in the script.
pool | A set of numbers representing the selection pool.

Remarks

The default value is noreplace.

Examples

On each trial, the following stimulus selects the vice president who served with the corresponding president:

<text vicepresidents>
/ items = vicepresidentitems
/ select = current(presidents)
</text>

The following first selects Jefferson, then Adams, and then Washington:

<text presidents>
/ items = ("George Washington", "John Adams", "Thomas Jefferson")
/ select = sequence(3, 2, 1)
</text>

The following randomly selects mountain pictures and ensures that the selected item isn't the same as the currently selected valley item:

<picture moutains>
/ items = ("rainier.bmp", "baker.jpg", "sainthelens.gif")
/ select = noreplacenot(valleys)
</picture>

The following randomly selects sound files without replacement, except if an incorrect response is give on the trial:

<sound rock>
/ items = ("beatles.wav", "stones.wav", "thewho.wav")
/ select = noreplacecorrect
</sound>


file attribute

The file attribute specifies where Inquisit should record the data.

Member of

<data> <eyetracker> <summarydata> <survey>

Syntax

/ file = "location"

Parameters

location A string in quotes indicating a valid local path, network share, or url to send the data.

Remarks

The file command specifies where Inquisit should record the data. The data file may be written to the local drive, a network share, or a web URL.

If a web URL is specified, the data is posted to the specified web address via HTTP POST. The web server can then extract the data from the POST request and save it. If you specify an http address, data is sent to the web server in plain text using the standard http protocol. If you specify an https address, the data is encrypted using Secure Sockets Layer (SSL) before being sent over the wire, which provides protection from packet sniffers. Since data can be posted and later retrieved from the data web service at millisecond.com (this is the default behavior for Inquisit Web), it should rarely be necessary to set up your own web server to handle web data collection.

If the data location requires login credentials, the user name and password can be specified using the userid and password commands.

For Inquisit Web, data is by default posted back to the millisecond.com web server via Secure Sockets Layer (SLL). For Lab, the data is saved to a *.iqdat file in the directory as the script.

See Gathering Data Over the Web for more information on saving data gathered on remote client machines to a network server.

If the file attribute is not specified and /separatefiles = false, the default file names are as follows:
Data element: [script file name]_raw_.iqdat
Summarydata elements: [script file_name]_summary_.iqdat

If the file attribute is not specified and /separatefiles = true, the default file names are as follows:
Data element: [script file name]_raw_[subjectid]_[year]_[month]_[day]_[hour]_[minute]_[second]_[millisecond].iqdat
Summarydata elements: [script file_name]_summary_[subjectid]_[year]_[month]_[day]_[hour]_[minute]_[second]_[millisecond].iqdat

Examples

The following appends the data to a local file:

<data>
/ file = "C:\myscript\mydata.iqdat"
</data>

The following saves the data to a network file share:

<data>
/ file = "\\server\fileshare\data\"
</data>

The following posts the data to a web server:

<data>
/ file = "http://www.foo.com/datafiles/"
</data>


datastreams attribute

The datastreams attribute specifies which datastreams to enable for the expt, block, or trial.

Member of

<block> <expt> <likert> <survey> <surveypage> <trial>

Syntax

/ datastreams = (eyetracker)

or

/ datastreams = eyetracker

or

/ datastreams = false

Parameters

false | Disables logging to datastreams.
eyetracker | Enables logging to an eyetracker datastream.

Remarks

If datastreams is set to false, then nothing is logged to the datastreams for the expt, block, or trial. If set to eyetracker, then eyetracker information will be logged for the duration of the expt, block, or trial.

Examples

The following enables eyetracking for all trials in the current block:

<block someblock>
/ datastreams = (eyetracker)
</block>

The following disables eyetracking for the current trial:

<trial sometrial>
/ datastreams = false
</trial>


defaultresponse attribute

The defaultresponse attribute presets the response of a survey item to a specified value.

Member of

<caption> <checkboxes> <dropdown> <image> <listbox> <openended> <radiobuttons> <slider> <slidertrial> <textbox>

Syntax

/ defaultresponse = "text"

or

/ defaultresponse = property

or

/ defaultresponse = expression

Parameters

text A string in quotes serving as defaultresponse for the survey item.

Remarks

When defaultresponse is specified for a survey item, that response for the item is preset to the specified value the first time the item appears on a survey page. For multiple choice items, the defaultresponse determines which item is selected. For textbox items, the textbox is prepopulated with the text of the defaultresponse.

Examples

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


directory attribute

The directory attribute specifies a folder containing the script files to run in batch.

Member of

<batch>

Syntax

/ directory = "location"

Parameters

location A string in quotes indicating a valid path to a local folder.

Remarks

When Inquisit runs the batch element, finds and runs all scripts in the specified directory. Multiple directory attributes can be specified in order to run scripts in different directories.

Examples

The following runs all scripts in the specified directory:

<batch>
/ directory = "C:\myscripts\"
</batch>


draw attribute

The draw attribute specifies that the mouse cursor will draw on the screen using the specified stimulus as a brush.

Member of

<trial>

Syntax

/ draw = stimulusname

or

/ draw = true(stimulusname)

or

/ draw = false

Parameters

stimulusname The name of a stimulus to be used as a brush.

Remarks

If set to true, a line is drawn on the screen that traces the path of the mouse cursor using the specified stimulus as a brush, or a a 2-pixel black brush if no stimulus is specified. Drawings can be saved using the screencapture attribute. If draw is set to false (default), the mouse cursor functions normally and no drawing occurs.

Examples

The following defines a trial that draws on the screen using a shape called "greencircle" as a brush :

<trial sometext>
/ stimulusframes = [1=startHere]
/ validresponse = (startHere)
/ draw = greencircle
</trial>


dropposition attribute

The dropposition attribute indicates the screen location where stimuli are positioned after being dragged and dropped onto a valid drop target.

Member of

<button> <clock> <picture> <shape> <text> <video>

Syntax

/ dropposition = (x value, y value)

or

/ dropposition = (x constant, y constant)

Parameters

x constant One of the following:

Value | Description
anywhere | The stimulus is positioned wherever on the target it was dropped.
center | The stimulus is positioned on the horizontal center of the target.
left | The stimulus is positioned on the left side of the target.
right | The stimulus is positioned on the right side of the target.
x value | The horizontal canvas coordinate in pixels, percent(default), or points.
y constant One of the following:

Value | Description
anywhere | The stimulus is positioned wherever on the target it was dropped.
center | The stimulus is positioned on the horizontal center of the target.
top | The stimulus is positioned on the top side of the target.
bottom | The stimulus is positioned on the bottom side of the target.
y value | The vertical canvas coordinate in pixels, percent(default), or points.

Remarks

Horizontal dropposition is relative to the left side of the canvas. 0% is the left edge of the canvas and 100% is the right edge. Vertical dropposition is relative to the top of the canvas, with 0% placing the dropped item at the top and 100% placing it at the bottom edge. Percentages may be specified as decimals (e.g., 52.968) for increased precision. The default dropposition is the middle of the stimulus.

Examples

The following sets the dropposition of the text to the lower left corner of the canvas:

<text sometext>
/ items = ("ipsum")
/ dropposition = (0, 100)
</text>

The following sets the dropposition of the text to the middle of the canvas with 800 X 600 pixels:

<text sometext>
/ items = ("ipsum")
/ dropposition = (400px, 300px)
</text>

The following sets the dropposition based on the trial number:

<text sometext>
/ items = ("ipsum")
/ dropposition = (trial.mytrial.currenttrialnumber * 5, trial.mytrial.currenttrialnumber * 5)
</text>


dropsource attribute

The dropsource attribute determines whether the stimulus can be dragged and dropped on the screen.

Member of

<button> <clock> <picture> <shape> <text> <video>

Syntax

/ dropsource = value

or

/ dropsource = boolean

Parameters

property | A property returning value of true (not 0) or false (0).
boolean | A value of true or false.

Remarks

If set to true, the stimulus can be dragged and dropped onto a droptarget when the inputdevice mode is set to 'mouse' or 'dragdrop'. If false, the stimulus can not be dragged and dropped.

Examples

The following sets the position of the text to be the top right corner of the screen:

<shape someshape>
/ hposition = 95
/ dropsource = true
</shape>

The following sets the position based on the trial number:

<shape someshape>
/ dropsource = values.dropmode
</shape>


dropsources attribute

The dropsources attribute specifies the set of responses that the monkey should choose from when performing a given trial.

Member of

<trial>

Syntax

/ dropsources = (stimulus, stimulus, stimulus, ...)

Parameters

stimulus The name of a visual stimulus being presented on this trial.

Remarks

This attribute specifies a set of responses considered valid for the test monkey when performing this trial. The set can consist of any valid expression, including numbers, strings, and properties. When the test monkey is run and Inquisit encounters this attribute on a given trial, it will randomly select from the responses listed in the attribute. Controlling the monkey's response is useful for testing scripts that behave very differently depending on responding, or that allow the participant to abort the experiment with a particular response. For example, if a script includes an informed consent trial, the dropsources attribute can be used to make sure that the monkey always gives consent.

Examples

The following trial makes sure the monkey always consents to participate:

<trial consent>
/ stimulusframes=[1=consentform, agreebutton, disagreebutton]
/ inputdevice=mouse
/ validresponse=(agreebutton, disagreebutton)
/ dropsources=("agreebutton")
/ ontrialend=[if (trial.consent.response == "disagreebutton") script.abort()]
</trial>

The following trial makes sure the monkey always consents to participate:

<trial example>
/ stimulusframes=[1=target]
/ inputdevice=keyboard
/ validresponse=("e", "i")
/ dropsources=(values.dropsources)
</trial>


droptarget attribute

The droptarget attribute determines whether dropsource stimuli can be dragged and dropped onto this stimulus.

Member of

<button> <clock> <picture> <shape> <text> <video>

Syntax

/ droptarget = property

or

/ droptarget = boolean

Parameters

property | A property returning value of true (not 0) or false (0).
boolean | A value of true or false.

Remarks

If set to true, the stimulus can accept dropsource stimuli that are dragged and dropped onto it when the inputdevice mode is set to 'mouse' or 'dragdrop'. If false, the stimulus does not accept drag and drop stimuli.

Examples

The following enables dropsource stimuli to be dragged and dropped onto a shape:

<shape someshape>
/ hposition = 95
/ droptarget = true
</shape>

The following enables or disables dropsource stimuli from being dragged and dropped onto a shape depending on a value:

<shape someshape>
/ droptarget = values.dropmode
</shape>


droptargets attribute

The droptargets attribute lists stimuli on the screen where dragged items can be dropped.

Member of

<trial>

Syntax

/ droptargets = (stimulus, stimulus, stimulus, ...)

Parameters

stimulus The name of a visual stimulus being presented on this trial.

Remarks

This attribute specifies a set of responses considered valid for the test monkey when performing this trial. The set can consist of any valid expression, including numbers, strings, and properties. When the test monkey is run and Inquisit encounters this attribute on a given trial, it will randomly select from the responses listed in the attribute. Controlling the monkey's response is useful for testing scripts that behave very differently depending on responding, or that allow the participant to abort the experiment with a particular response. For example, if a script includes an informed consent trial, the droptargets attribute can be used to make sure that the monkey always gives consent.

Examples

The following trial makes sure the monkey always consents to participate:

<trial consent>
/ stimulusframes=[1=consentform, agreebutton, disagreebutton]
/ inputdevice=mouse
/ validresponse=(agreebutton, disagreebutton)
/ droptargets=("agreebutton")
/ ontrialend=[if (trial.consent.response == "disagreebutton") script.abort()]
</trial>

The following trial makes sure the monkey always consents to participate:

<trial example>
/ stimulusframes=[1=target]
/ inputdevice=keyboard
/ validresponse=("e", "i")
/ droptargets=(values.droptargets)
</trial>


encrypt attribute

The encrypt attribute specifies whether the data file should be saved as plain text or using a secure password encrypted format.

Member of

<data> <survey>

Syntax

/ encrypt = true("password")

or

/ encrypt = false

Parameters

password A string at least 1 character long of letters, numbers, and symbols used to encrypt (and later decrypt) the data file.

Remarks

This attribute saves the data using a password encrypted format, which is useful protecting against unauthorized viewing of the file's contents. When a password encrypted document is opened in Inquisit, the user is prompted for the password specified by this attribute in order to decrypt the document. Without the password, the document can not be read. If you lose or forget your password, the data can not be recovered.

Encrypted files are saved with the "*.iqdatc" file extension, and plain text files are saved with the ".iqdat" file extension. The encrypted format can only be read by Inquisit. To load the data files into other applications, the data file must be saved as plain text. This can be done by simply opening the encrypted file(s) into Inquisit, then selecting the "Save As" command from the File menu, and changing the file type from ".iqdatc" to ".iqdat".

This command is unnecessary for web experiments that save the data to the millisecond data service, since Inquisit uses standard SSL encryption to transmit the data over the web.

Examples

The following encrypts the data file using the given password:

<data>
/ encrypt= true("1nquisitRock$")
</data>


erase attribute

The erase attribute specifies whether a visual stimulus should be erased or audio stimulus stopped at the end of the trial.

Member of

<button> <clock> <picture> <shape> <sound> <text> <video>

Syntax

/ erase = true(red value, green value, blue value)

or

/ erase = true(color value)

or

/ erase = true(color name)

or

/ erase = false

Parameters

red value | An integer from 0 to 255 specifying the intensity of the red component.
green value | An integer from 0 to 255 specifying the intensity of the green component.
blue value | An integer from 0 to 255 specifying the intensity of the blue component.
color name | The name of a built in color.
color value | A 32-bit argb value specified as in integer or a CSS hex value (e.g., #0000FF or #00F for blue).

Remarks

If erase is set to false, the stimulus is not erased at the end of the trial. If set to true, the stimulus is erased using the indicated colored. For sound stimuli, the sound is stopped and the erase color is ignored. The default is to erase the stimulus using the background color of the screen. By default, stimuli are erased using the background color of the screen.

Examples

The following defines a text stimulus that is erased with green:

<text sometext>
/ items = ("blah blah blah")
/ erase = true(0, 255, 0)
</text>


erase attribute

The erase attribute determines the baseline signal to which port stimuli are set at the end of the trial.

Member of

<port> <xid>

Syntax

/ erase = true("bits")

or

/ erase = true(integer)

or

/ erase = false

Parameters

bits | A quoted binary sequence of exactly eight 0's and 1's.
integer | An one-byte integer ranging from 0 to 255.

Remarks

By default, port stimuli are erased to a value of 0 or "00000000" (i.e., all TTL bits/pins are set to low).

Examples

When the following port signal is erased, the highest order bit is set high and all other bits are set low:

<port somesignal>
/ items = ("00001111")
/ erase = true("10000000")
</port>

The following port signal presents values 1 through 5 as signals and erases the port to 0 (all TTL bits/pins are set low):

<port somesignal>
/ items = (1, 2, 3, 4, 5)
/ erase = true(0)
</port>

The following port signal presents values 1 through 5 as signals, and does not automatically erase them at the end of the trial:

<port somesignal>
/ items = (1, 2, 3, 4, 5)
/ erase = false
</port>


errormessage attribute

The errormessage attribute specifies whether to display a feedback stimulus when the subject responds incorrectly.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Syntax

/ errormessage = false

or

/ errormessage = true(stimulusname, duration)

Parameters

stimulusname | The name of a stimulus element defined elsewhere in the script.
duration | An integer or property specifying duration in milliseconds for which the stimulus is displayed on the screen. A value of "0" indicates that stimulus should be displayed for the remaining duration of the trial.

Remarks

Errormessage specifies a stimulus to be shown immediately after the subject gives an incorrect response on a trial. The stimulus is shown for duration milliseconds. Errormessage can be set at the <trial>, <block>, or <expt> level, with <trial> settings overriding <block> settings and <block> settings overriding <expt> settings. Default is false.

Examples

The following block displays text for 500 milliseconds if an incorrect response is given:

<block myblock>
/ trials=[1-10=noreplace(trial1, trial2)]
/ errormessage=true(errortext, 500)
</block>

The following block displays text for values.errormessageduration milliseconds if an incorrect response is given:

<block myblock>
/ trials=[1-10=noreplace(trial1, trial2)]
/ errormessage=true(errortext, values.errormessageduration)
</block>


columns attribute

The columns attribute specifies which data columns to record to the data file.

Member of

<eyetracker> <eyetracker>

Syntax

/ columns = (eyecolumn, eyecolumn, eyecolumn, property, property, property)

Parameters

property Any property of any element may be listed as a data column. This includes custom properties defined in the values and expressions elements.
eyecolumn A predefined eye tracker column. Any of the following predefined columns are allowed:
Name | Description
date | date (mmddyy) of the experiment
time | time (hh:mm) the experiment started
group | group id entered at the beginning of an experiment
subject | subject id entered at the beginning of an experiment
session | session count for this participant
timestamp | timestamp from the eye tracker
marker | The last marker sent to the eye tracker before this message was received
leftpixelx | The horizontal screen coordinate of the gaze point of the left eye reported by the eye tracker
leftpixely | The vertical screen coordinate of the gaze point of the left eye reported by the eye tracker
rightpixelx | The horizontal screen coordinate of the gaze point of the right eye reported by the eye tracker
rightpixely | The vertical screen coordinate of the gaze point of the right eye reported by the eye tracker
focuspixelx | The horizontal screen coordinate of the gaze point reported by the eye tracker
focuspixely | The vertical screen coordinate of the gaze point reported by the eye tracker
leftgazex | The horizontal user coordinate of the gaze point of the left eye reported by the eye tracker in (mm)
leftgazey | The vertical user coordinate of the gaze point of the left eye reported by the eye tracker in (mm)
leftgazez | The distance user coordinate of the gaze point of the left eye reported by the eye tracker in (mm)
rightgazex | The horizontal user coordinate of the gaze point of the right eye reported by the eye tracker in (mm)
rightgazey | The vertical user coordinate of the gaze point of the right eye reported by the eye tracker in (mm)
rightgazez | The distance user coordinate of the gaze point of the right eye reported by the eye tracker in (mm)
lefteyex | The horizontal user coordinate of the left eye position reported by the eye tracker in (mm)
lefteyey | The vertical user coordinate of the left eye position reported by the eye tracker in (mm)
lefteyez | The distance user coordinate of the left eye position reported by the eye tracker in (mm)
righteyex | The horizontal user coordinate of the right eye position reported by the eye tracker in (mm)
righteyey | The vertical user coordinate of the right eye position reported by the eye tracker in (mm)
righteyez | The distance user coordinate of the right eye position reported by the eye tracker in (mm)
leftpupilwidth | The width of the participant's left pupil as reported by the eye tracker
leftpupilheight | The height of the participant's left pupil as reported by the eye tracker.
rightpupilwidth | The width of the participant's right pupil as reported by the eye tracker
rightpupilheight | The height of the participant's rigth pupil as reported by the eye tracker
leftvalidity | The last validity score for left pupil gaze point data
rightvalidity | The last validity score for right pupil gaze point data
hasleftfixation | Indicates whether Inquisit has currently detected a fixation point from the eye tracker for the left eye
leftfixationpixelx | The horizontal screen coordinate of the most recently calculated fixation point of the left eye
leftfixationpixely | The vertical screen coordinate of the most recently calculated fixation point of the left eye
hasrightfixation | Indicates whether Inquisit has detected a fixation point from the eye tracker for the right eye
rightfixationpixelx | The horizontal screen coordinate of the most recently calculated fixation point of the right eye
rightfixationpixely | The vertical screen coordinate of the most recently calculated fixation point of the right eye
hasfocusfixation | Indicates whether Inquisit has currently detected a fixation point from the eye tracker for either or both eyes
focusfixationpixelx | The horizontal screen coordinate of the most recently calculated fixation point
focusfixationpixely | The vertical screen coordinate of the most recently calculated fixation point

Remarks

The columns attribute specifies the data values to be recorded to file and the column in which they are written. There are two types of columns that can be listed: 1) a reserved keyword representing a particular eye tracker data value, and 2) any property of any element defined in the script. The data values may be specified in any order. On each eye tracker mesage, Inquisit will write a single line of data consisting of each data value specified by the column. Columns will appear in the data file in the specified order.

Examples

The following records 10 columns to the data file:

<data>
/ columns=(date, time, groupid, subjectid, timestamp, leftpixelx, leftpixely, rightpixelx, rightpixely, leftvalidity, rightvalidity, values.totalearnings, values.dprime, script.elapsedtime)
</data>


file attribute

The file attribute specifies the full or relative path to a file.

Member of

<batch> <include>

Syntax

/ file = "path"

Parameters

path A string in quotes indicating a valid path to a file.

Remarks

For the include element, file indicates an external script for the parser to include while processing a script file. For the batch element, file indicates a script to run as part of a group of scripts. For the htmlpage element, file indicates an html file to display as instructions.

Examples

The following runs the specified script:

<batch>
/ file = "C:\myscripts\foo.iqx"
</batch>

The following displays the specified html instruction page:

<htmlpage>
/ file = "https://www.millisecond.com/instruction.html"
</htmlpage>


file attribute

The file attribute specifies the full or relative path to a file.

Member of

<htmlpage>

Syntax

/ file = "path"

Parameters

path A string in quotes indicating a valid path to a file.

Remarks

For the include element, file indicates an external script for the parser to include while processing a script file. For the batch element, file indicates a script to run as part of a group of scripts. For the htmlpage element, file indicates an html file to display as instructions.

Examples

The following runs the specified script:

<batch>
/ file = "C:\myscripts\foo.iqx"
</batch>

The following displays the specified html instruction page:

<htmlpage>
/ file = "https://www.millisecond.com/instruction.html"
</htmlpage>


filter attribute

The filter command specifies the conditions in which data should be recorded.

Member of

<data> <datastream> <eyetracker>

Syntax

/ filter = [expression; expression; expression; ...]

Parameters

expression Specifies a expression returning true or false determining whether data should be recorded.

Remarks

The filter command enables a script to dynamically determine which rows of data should be recorded by a data, datastream, or eyetracker element. This is especially useful for continuous data streams such as datastream and eyetracker where many rows of data are written per second and data files can grow quite large. The filter can reduce the size of data files by allowing an experiment to record data only when the relevant conditions are met.

Examples

The following datastream records data only if the specified video is playing:

<datastream example>
/ columns = (date, time, subject, video.test.currenttime, response)
/ filter = [video.test.isplaying]
</datastream>


finishlabel attribute

The finishlabel attribute determines the text appearing on the navigation button when the current survey or instruction page is the last in its sequence.

Member of

<instruct> <survey> <surveypage>

Syntax

/ finishlabel = "label"

Parameters

label A string in quotes serving as text for the button.

Remarks

The default value is "Next".

Examples

The following sets the finish button label to "Thank you!":

<survey somesurvey>
/ finishlabel = ("Thank you!")
</survey>


finishpage attribute

The finishpage attribute specifies the url that participants will be redirected to upon completing the web experiment. This attribute has no effect for scripts with the Lab.

Member of

<defaults>

Syntax

/ finishpage = "url"

Parameters

url A string in quotes indicating the url to redirect participants.

Remarks

The default value is the url specified when registering the experiment.

Examples

The following sets the finish page to "https://www.millisecond.com/barrelofmonkeys.htm", dynamically setting the url parameter 'score' to a value computed by the script:

<defaults>
/ finishpage = "https://www.millisecond.com/barrelofmonkeys.htm?score=<%values.finalscore%>"
</defaults>


fixationwindowlength attribute

The fixationwindowlength attribute specifies the length of the averaging window used to determine when a fixation has ended.

Member of

<eyetracker>

Syntax

/ fixationwindowlength = fixationwindowlength

Parameters

fixationwindowlength The fixation window length to use in the real-time calculation of fixation points.

Remarks

This is used to smooth out data and minimize the effect of noise inherent in high sample rates. The default value is 20ms.

Examples

The following sets the fixation window length:

<eyetracker>
/ fixationwindowlength = 20.0
</eyetracker>


fontstyle attribute

The fontstyle attribute specifies the font in which text is presented.

Member of

<button> <checkboxes> <clock> <defaults> <dropdown> <image> <instruct> <likert> <listbox> <openended> <radiobuttons> <slider> <slidertrial> <text> <textbox>

Syntax

/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)

Parameters

face name | A string in quotes indicating the name of the font.
height variable | (Optional) An decimal that specifies the height of the font in points (default), pixels, or percent.
bold | (Optional) A value of true or false indicating whether the font should be bold.
italic | (Optional) A value of true or false indicating whether the font should be italic.
underline | (Optional) A value of true or false indicating whether the font should underlined.
strikeout | (Optional) A value of true or false indicating whether the font should appear with a strikeout line.
quality | (Optional) An integer ranging from 1 to 5 indicating the font quality. 5 is the best quality (ClearType).
character set (Optional) An integer indicating the character set code. The character set can be any of the following:
Value | Description
0 | ANSI
186 | Baltic
1 | Default (uses the current system locale on the local computer)
136 | Chinese Big5 (Taiwan, Hong Kong, Macau)
238 | Eastern European
134 | GB2312 (Simplified Chinese)
161 | Greek
129 | Hangul (Korean)
77 | Mac
255 | OEM (operating system dependent)
204 | Russian
128 | ShiftJIS (Japanese)
2 | Symbol
162 | Turkish
163 | Vietnamese
130 | Johab (Korean)
178 | Arabic.
177 | Hebrew
222 | Thai

Remarks

Inquisit provides an easy to use font picker dialog to set this attribute. To use the font picker, 1) move the cursor to where you want to insert the the font attribute, 2) open the Insert menu, and 3) select "Font...". Once you have selected the desired font settings in the Font Wizard dialog, select OK and the font attribute and appropriate settings will automatically be inserted in your script at the cursor location.

Examples

The following sets the font to 14pt Arial bold:

<text sometext>
/ fontstyle = ("Arial", 14pt, true)
/ items = ("yada yada yada")
</text>

The following sets the font to Arial bold and sets the height to 10% of the screen height:

<text sometext>
/ fontstyle = ("Arial", 10%, true)
/ items = ("yada yada yada")
</text>

The following presents text in italic Tahoma font, 25 pixels high:

<text sometext>
/ fontstyle = ("Tahoma", 25px, false, true)
/ items = ("yada yada yada")
</text>

The following presents underlined text in 2 inch Courier New font:

<text sometext>
/ fontstyle = ("Courier New", 2in, false, false, true)
/ items = ("yada yada yada")
</text>


framerate attribute

The framerate attribute specifies the eye tracker sample rate.

Member of

<eyetracker> <eyetracker> <eyetracker>

Syntax

/ framerate = framerate

Parameters

framerate The frame rate or sampling frequency for the eye tracker to use.

Remarks

Examples

The following sets the Tobii eytracker frame rate to 60hz:

<eyetracker>
/ framerate = "tobii"
/ framerate = 60
</eyetracker>

The following sets the EyeLink eytracker frame rate to 250hz:

<eyetracker>
/ framerate = "srresearch"
/ framerate = 250
</eyetracker>


frequency attribute

The frequency attribute specifies the sampling frequency (in hertz) at which a datastream captures and records data.

Member of

<datastream>

Syntax

/ frequency = integer

Parameters

integer A positive integer specifying the frequency in hz.

Remarks

Although there is no theoretical limit to high the frequency can be set, there may be practical limits to how fast Inquisit can capture and record data on a given device. The default is 60 hz.

Examples

The following datastream captures mouse coordinates at a frequency of 75 hz.

<datastream mousetracking>
/ columns = (date, time, subject, datastream.mousetracking.elapsedtime, trialcode, stimulusitem, stimulusitem, mouse.x, mouse.y)
/ frequency = 75
</datastream>


groupassignment attribute

The groupassignment attribute determines how participants are assigned to between-subject conditions.

Member of

<batch> <expt>

Syntax

/ groupassignment = assignment

Parameters

assignment One of the following values:
Value | Description
groupnumber | Assignment is based on the group number.
random | Assignment is random.
subjectnumber | Assignment is based on the subject number.

Remarks

Between-subject groups can be defined using the expt or batch elements. Participants can be assigned to between-subjects groups based on the numeric subject id entered when launching the script, or by random assignment. This attribute specifies which method to use. By default, the subject id is used.

Examples

The following randomly assigns participants into one of 2 treatment conditions:

            <expt conditionA>
/ subjects = (1 of 2)
/ groupassignment = random
/ blocks = [1=practice; 2=treatmentA; 3=test]
</expt>

            <expt conditionB>
/ subjects = (2 of 2)
/ groupassignment = random
/ blocks = [1=practice; 2=treatmentB; 3=test]
</expt>


groups attribute

The groups attribute enables running subsets of tests and procedures based on the group id paramater.

Member of

<batch> <expt>

Syntax

/ groups = (integer, integer, integer, ... of modulus)

Parameters

integer | A positive integer indicating which group ids should run the experiment.
modulus | A positive integer indicating the modulus.

Remarks

The groups attribute allows you to run different batch or expt depending on the group id provided when the script is run. A given expt or batch will be run if the the following is true:

integer = remainder( group id / modulus )

Multiple expts and batches can be defined in the script, allowing different group ids to be assigned to different experimental conditions. A single group id can be assigned to multiple expts, in which case all of the assigned expts will be run for that group id in the order they appear in the script.

Examples

The following expt is run for odd numbered groups:

<expt>
/ blocks=[1-20=noreplace(testtrials, distractortrials)]
/ groups = (1 of 2)
</expt>

The following expt is run for even numbered groups:

<expt>
/ blocks=[1-20=noreplace(testtrials, distractortrials)]
/ groups = (2 of 2)
</expt>

The following batch is run for group id 3 and every subsequent 3rd group id (e.g., 3, 6, 9, 12, ...):

<batch>
/ file="experiment3.iqx"
/ groups = (1 of 4)
</batch>

The following expt is run for second of every four groups (e.g., 2, 6, 10, 14, ...):

<expt>
/ blocks=[1-20=noreplace(testtrials, distractortrials)]
/ groups = (1 of 4)
</expt>


halign attribute

The halign attribute determines the horizontal alignment of a visual stimulus on the screen relative to the position coordinates.

Member of

<button> <clock> <defaults> <picture> <shape> <text> <video>

Syntax

/ halign = alignment

Parameters

alignment One of the following values:
Value | Description
center | Text is center aligned.
left | Text is left aligned.
right | Text is right aligned.

Remarks

Horizontal alignment is relative to the position coordinates of the stimulus. Stimuli are center aligned by default.

Examples

The following presents right-aligned text:

<text sometext>
/ items = ("ipsum")
/ halign = right
</text>


handlescale attribute

The handlescale attribute specifies a scaling factor to be applied to the size of slider handle.

Member of

<slider> <slidertrial>

Syntax

/ handlescale = factor

Parameters

boolean A boolean value of true or false.

Remarks

This attribute allows the slider handle to be scale on the screen. The default (no scale) is 1.0. Values larger than 1.0 increase the size.

Examples

The following slider does not display tick marks:

<slider q1>
/ caption = "Rate the video on the following scale"
/ handlescale = 1.2
</slider>


height attribute

The height attribute specifies the height of a visual stimulus.

Member of

<button> <clock> <picture> <shape> <text> <video>

Syntax

/ height = numeric expression

Parameters

numeric expression An expression that can be converted to a number.

Remarks

The default unit is percentage of the vertical height of the presentation window.

Examples

The following sets the height of a clock to 5% of the screen height:

<clock timer>
/ mode = timer
/ height = 5%
/ timeout = 300000
/ position = (50%, 10%)
/ format = "mm:ss"
</clock>


hjustify attribute

The hjustify attribute determines whether the text is left, right, or center justified.

Member of

<text>

Syntax

/ hjustify = justification

Parameters

justification One of the following values:
Value | Description
center | Text is center justified.
left | Text is left justified.
right | Text is right justified.

Remarks

Justification is relative to the bounding rectangle specified by area. The default is center.

Examples

The following presents right justified text:

<text sometext>
/ items = ("ipsum")
/ area = (500, 500)
/ hjustify = right
</text>


hposition attribute

The hposition attribute determines the horizontal position at which to display the item on the screen.

Member of

<button> <clock> <html> <picture> <shape> <text> <video>

Syntax

/ hposition = x expression

Parameters

x expression The horizontal screen coordinate in pixels, percent(default), or points.

Remarks

The value is specified as a percentage of the horizontal plane of the screen, where 0.0 corresponds to the left edge of the screen and 100.0 to the right. The default value is 50.0, which corresponds to the center of the screen.

Examples

The following randomly selects the position of the text to be the right, left, or center of the screen:

<text sometext>
/ items = ("ipsum")
/ hposition = noreplace(0, 50, 100)
</text>

The following sets the position based on the trial number:

<text sometext>
/ items = ("ipsum")
/ hposition = trial.mytrial.currenttrialnumber * 5
</text>


imagesize attribute

The imagesize attribute defines the width and height of the bounding rectangle of a picture as displayed by an image survey item.

Member of

<image>

Syntax

/ imagesize = (width variable, height variable)

Parameters

width variable | The width of the rectangle in pixels (default), percent, or points.
height variable | The height of the rectangle in pixels (default), percent, or points.

Remarks

The imagesize attribute allows pictures to be scaled to the appropriate size for inclusion in a survey.

Examples

The following presents a picture sized to fit within a 100 by 200 pixel rectangle.

<image question1>
/ items=("question1.jpg")
/ imagesize=(100, 200)
</image>


increment attribute

The increment attribute specifies the size the space between each tick on a slider survey item.

Member of

<slider>

Syntax

/ increment = integer

Parameters

integer A non-negative integer indicates the spacing between tick marks.

Remarks

The default is 1.

Examples

The following response defines a slider question with an increment of 5 ranging from 1 to 100:

<slider question1>
/ caption = "Move the slider to indicate how warm or cool you feel towards this item."
/ range = (1, 100)
/ increment = 5</response>


inputdevice attribute

The inputdevice attribute defines the modality used to register responses.

Member of

<defaults> <openended> <trial>

Syntax

/ inputdevice = modality

Parameters

modality One of the following values:
Value | Description
keyboard | Responses are defined as key-presses on the computer’s keyboard.
mouse | Responses are defined as mouse clicks on target stimuli, by clicking a particular button or moving the mouse in a particular direction.
mousekey | Responses are defined as the pressing of specified mouse buttons.
mouseover | Responses are defined as moving the mouse over target stimuli.
touchscreen | Responses are defined as touching a target stimulus presented on a monitor equipped with a touchscreen system.
speech | Responses are defined as vocalizations into a microphone connected to the PC. Spoken responses are identified in real time using the speech recognition engine.
voicerecord | Responses are defined as vocalizations into a microphone connected to the PC. Only latencies of spoken responses are recorded in real time, but each response is recorded as a wav file so that utterances can be identified either manually by listening to and transcribing each file, or automatically using Inquisit's Analyze Recorded Responses tool available from the Tools menu.
voicekey | Responses are defined as vocalizations into a microphone connected to the PC. Only latencies of spoken responses are recorded in real time.
joystick | Responses are defined as a joystick action. Joystick support is limited to Windows only.
com<n> | Responses are defined as a serial port signal, where n specifies the port number (e.g., COM1, COM2, COM3, ...).
xid<n> | Responses are defined as a XID protocol signal from a Cedrus Response Box on the serial port, where n optionally specifies the port number (e.g., XID1, XID2, XID3, ...). If n is omitted, Inquisit will automatically locate the XID device and connect to it. Thus, if only a single XID device is connected, the n can and should be excluded.
xid("name") | Responses are defined as a XID protocol signal from a Cedrus Response Box on the serial port, where "name" specifies the device name (e.g., something like "COM3" or "COM6" on Windows, and "usbserial-00002014" or "/dev/cu.usbserial-00002014" on Mac). If a single XID device is connected to the computer, Inquisit will automatically locate and connect to the device so the name can be omitted.
eyetracker | Responses are defined as gazepoints from an eyetracker configured with the eyetracker element.
lpt | Responses are defined as a parallel port signal on the default status port.
lptdata | Responses are defined as a parallel port signal on the default data port.
lpt<n> | Responses are defined as a parallel port signal on the status port, where n specifies the port number (e.g., LPT1, LPT2, LPT3, ...).
lptdata<n> | Responses are defined as a parallel port signal on the data port, where n specifies the port number (e.g., LPT1, LPT2, LPT3, ...).

Remarks

Inquisit supports a single input device per trial, although each trial in an experiment can use different input devices. The keyboard is the default input device.

Examples

The following sets the default input device for the script to voice key:

<defaults>
/ inputdevice = voicekey
</defaults>


inputdevice attribute

The inputdevice attribute determines the inputdevice subjects use to advance through series of instruction pages.

Member of

<instruct>

Syntax

/ inputdevice = modality

Parameters

modality One of the following values:
Value | Description
keyboard | Responses are defined as key-presses on the computer’s keyboard.
mouse | Responses are defined as mouse clicks on target stimuli, by clicking a particular button or moving the mouse in a particular direction.
mousekey | Same as mouse except that the mouse cursor is not visible.
touchscreen | Responses are defined as touching a target stimulus presented on a monitor equipped with a touchscreen system.
com<n> | Responses are defined a serial port signal, where n specifies the port number (e.g., COM1, COM2, COM3, ...).
xid<n> | Responses are defined as a XID protocol signal from a Cedrus Response Box on the serial port, where n specifies the port number (e.g., XID1, XID2, XID3, ...).
lpt<n> | Responses are defined as a parallel port signal, where n specifies the port number (e.g., LPT1, LPT2, LPT3, ...).

Remarks

If keyboard, serialport1, serialport2, lpt1, or lpt2 are selected, the specific keys/values to navigate backwards and forwards through the pages are specified by the PrevKey and NextKey attributes, respectively. If mouse is specified, the mouse cursor will be visible on the screen and subject may click on the forward and backward buttons.

Examples

The following sets the default input device for instruction pages to the COM2 serial port:

<instruct>
/ inputdevice = com2
</instruct>


inputmask attribute

The inputmask attribute determines which bits should be used in evaluating a response through a parallel port device.

Member of

<trial>

Syntax

/ inputmask = "bit mask"

Parameters

bit mask A string of eight 0s and 1s serving as a bit mask.

Remarks

The inputmask attribute consists of a sequence of eight 0s and 1s that determine which bits to read from the parallel report in determining a response. This is useful if, for example, a given port is being used simultaneously for both input and output, in which case the mask can be used to prevent Inquisit from including output bits when determining the value of the response. Bits marked with 0 are ignored. Those marked with 1 are used.

Examples

The following tells Inquisit to ignore all but the lowest order bit when reading data from an input device connected to LPT1.

<trial mytrial>
/ inputmask = "00000001"
/ inputdevice = LPT1
</trial>


ipaddress attribute

The ipaddress attribute specifies the ipaddress to use to connect to the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Syntax

/ ipaddress = ipaddress

Parameters

ipaddress A string containing the ip address of the eye tracker.

Remarks

Examples

The following specifies the Tobii Plugin should use a custom ip address to connect to the eye tracker:

<eyetracker>
/ plugin = "tobii"
/ ipaddress = "100.1.1.2"
</eyetracker>


iscorrectresponse attribute

The iscorrectresponse attribute specifies custom logic used to classify a response as correct or incorrect.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ iscorrectresponse = [expression; expression; expression; ...]

Parameters

expression An expression that returns boolean true or false. See help with expression syntax for more information.

Remarks

After a response is made on a given trial, this parameter specifies an expression to be evaluated that determines whether the response should be scored as correct or incorrect. If the expression returns a logical value of true (any non-null or nonzero value), the response is considered correct. If the expression returns boolean false (zero or null), the response is considered incorrect.

This command can be used instead of or in conjunction with correctresponse to define dynamic or conditional rules for judging response accuracy.

Examples

The following classifies the response as correct based on both the key that is pressed and the response time:

<trial mytrial>
/ stimulusframes=[1=teststim]
/ iscorrectresponse=[trial.mytrial.beginresponsetime < values.timeout && trial.mytrial.response == 32]
</trial>

The following classifies the response as correct based on a randomly assigned variable:

<trial mytrial>
/ stimulusframes=[1=teststim]
/ iscorrectresponse=[values.condition == 3 && trial.mytrial.response == 32]
</trial>

The following classifies the response as correct based on a predefined expression:

<trial mytrial>
/ stimulusframes=[1=teststim]
/ iscorrectresponse=[expressions.correctlogic]
</trial>


isvalidresponse attribute

The isvalidresponse attribute specifies custom logic used to classify a response as valid or invalid.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ isvalidresponse = [expression; expression; expression; ...]

Parameters

expression An expression that returns boolean true or false. See help with expression syntax for more information.

Remarks

After a response is made on a given trial, this parameter specifies an expression to be evaluated that determines whether the response should be scored as valid or invalid. If the expression returns a logical value of true (any non-null or nonzero value), the response is considered valid. If the expression returns boolean false (zero or null), the response is considered invalid.

This command can be used instead of or in conjunction with validresponse to define dynamic or conditional rules for judging response accuracy.

Examples

The following classifies the response as valid if the latency is greater than a minimum response time, and the scancode of the key press is 1 or 2:

<trial mytrial>
/ stimulusframes=[1=teststim]
/ isvalidresponse=[trial.mytrial.latency > values.mintime && (trial.mytrial.response == 2 || trial.mytrial.response == 3)]
</trial>

The following classifies the response as valid if it has exactly 5 characters:

<openended id>
/ stimulusframes=[1=enterid]
/ isvalidresponse=[length(openended.id.response) == 5]
</trial>

The following classifies the response as valid based on a predefined expression:

<trial mytrial>
/ stimulusframes=[1=teststim]
/ isvalidresponse=[expressions.validationlogic]
</trial>


itemfontstyle attribute

The itemfontstyle attribute specifies the font in which survey questions are presented.

Member of

<survey> <surveypage>

Syntax

/ itemfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)

Parameters

face name | A string in quotes indicating the name of the font.
height | (Optional) An integer that specifies the height of the font in points (default), pixels, or percent.
bold | (Optional) A value of true or false indicating whether the font should be bold.
italic | (Optional) A value of true or false indicating whether the font should be italic.
underline | (Optional) A value of true or false indicating whether the font should underlined.
strikeout | (Optional) A value of true or false indicating whether the font should appear with a strikeout line.
quality | (Optional) An integer ranging from 1 to 5 indicating the font quality. 5 is the best quality (ClearType).
character set (Optional) An integer indicating the character set code. The character set can be any of the following:
Value | Description
0 | ANSI
186 | Baltic
1 | Default (uses the current system locale on the local computer)
136 | Chinese Big5 (Taiwan, Hong Kong, Macau)
238 | Eastern European
134 | GB2312 (Simplified Chinese)
161 | Greek
129 | Hangul (Korean)
77 | Mac
255 | OEM (operating system dependent)
204 | Russian
128 | ShiftJIS (Japanese)
2 | Symbol
162 | Turkish
163 | Vietnamese
130 | Johab (Korean)
178 | Arabic.
177 | Hebrew
222 | Thai

Remarks

The font can be set for the entire survey, or for a particular page, with the page setting overriding the survey settings. Individual items may have additional font settings that will override this font style.

Inquisit provides an easy to use font picker dialog to set this attribute. To use the font picker, 1) move the cursor to where you want to insert the the font attribute, 2) open the Tools menu, and 3) select "Font Wizard". Once you have selected the desired font settings in the Font Wizard dialog, select OK and the font attribute and appropriate settings will automatically be inserted in your script at the cursor location.

Examples

The following sets the default survey font to 14pt Arial bold:

<survey somesurvey>
/ itemfontstyle = ("Arial", 14pt, true)
/ items = ("yada yada yada")
</survey>

The following sets the default survey font to Arial bold and sets the height to 5% of the screen height:

<survey somesurvey>
/ itemfontstyle = ("Arial", 10%, true)
/ items = ("yada yada yada")
</survey>

The following sets the default font for a particular survey page to italic Tahoma font, 25 pixels high:

<surveypage page1>
/ itemfontstyle = ("Tahoma", 25px, false, true)
/ items = ("yada yada yada")
</surveypage>

The following sets the default font for a particular survey page to underlined text in 2 inch Courier New font:

<surveypage page2>
/ itemfontstyle = ("Courier New", 2in, false, false, true)
/ items = ("yada yada yada")
</surveypage>


1 attribute

The attributes are used to specify items to be used in stimuli.

Member of

<item>

Syntax

/ 1 = "item text"

or

/ 1 = "path"

Parameters

itemnum | A positive integer.
item | A quoted string representing an actual item.

Remarks

Different types of stimulus elements use the items in difference ways. If the stimulus is a text element, items represent the actual text items to be presented. If the stimulus is a picture, sound, or video, then the items are the names of the files containing the relevant media. If the stimulus is a port element, the items are strings of 0's and 1's representing 8-bit TTL signals. Characters in an item are specified in descending bit order, with the leftmost 0 or 1 value representing the highest bit and the rightmost value representing the lowest order bit. See How to Present TTL Signals Through the Parallel Port for more details.

Examples

The following item set consists of 2 items, each of which is a response to an openended trial called "personalinfoquestions".

<item personalinfo>
/ 1 = "jump.png"
/ 2 = "duck.png"
</item>


itemprobabilities attribute

The itemprobabilities attribute specifies the probabilities with which the items in a list should be selected.

Member of

<list>

Syntax

/ itemprobabilities = (value, value, value, ...]

or

/ itemprobabilities = [expression; expression; expression; ...]

or

/ itemprobabilities = distribution

Parameters

value | Any property or constant that can be converted to a decimal value.
expression | Any valid expression that evaluates to a decimal value.
distribution One of the following values:
Value | Description
uniform | Randomly selects items with uniform probablity (i.e., 1/N).
normal | (Not yet implemented) Randomly selects items according to a gaussian distribution.

Remarks

The itemprobabilities attribute is used to build a selection pool in which the specified items occur with the given probabilities. To build the selection pool with the given probabilities, the poolsize attribute must also be specified. Each probability must be a decimal value between 0 and 1, with the sum of all probabilities listed equal to 1. By default, items are selected with uniform probability. That is, items are added to the pool in proportion to their occurrence in the items attribute.

Random selection is done on the fly, so if additional selection constraints such as maxrunsize or replace are in place, it may not be possible to satisfy them all on a give trial, especially if there are only a few remaining items in the selection pool. In that case, the list will suspend one of the constraints and try again. If it still can not satisfy the remaining constraints, it suspends another and tries again, and so forth. By default, the maxrunsize constraint is suspended first, then replace, and finally the not constraints. If a procedure requires that the constraints always be satisfied, pregenerate a set of selection sequences that satisfy the constraints and then randomly select one of the pregenerated sequences to use for a given session.

Examples

The following list randomly creates a selection pool consisting of 25 instances of "A", 25 instances of "B", and 50 instances of "C", and randomly selects from this pool according to a uniform distribution.

<list mylist>
/ items=["A"; "B"; "C";]
/ itemprobabilities=[.25; .25; .5;]
/ poolsize=100
/ selectionmode=random
</list>


items attribute

The items attribute defines the items contained in the stimulus set.

Member of

<image> <picture> <sound> <text> <video>

Syntax

/ items = itemname

or

/ items = ("item", "item", "item",... )

or

/ items = ("path", "path", "path",... )

Parameters

itemname | The name of an item element defined elsewhere in the script.
item | A quoted string representing an actual item.

Remarks

Items can be defined either by specifying the name of an <item element>, or by directly by listing each item in the set.

Different types of stimulus elements use the items in difference ways. If the stimulus is a text element, items represent the actual text items to be presented. If the stimulus is a picture, sound, or video, then the items are the names of the files containing the relevant media. If the stimulus is a port element, the items are strings of 0's and 1's representing 8-bit TTL signals. Characters in an item are specified in descending bit order, with the leftmost 0 or 1 value representing the highest bit and the rightmost value representing the lowest order bit. See How to Present TTL Signals Through the Parallel Port for more details.

Text element items can be richly formatted using a subset of supported HTML markup tags. For example, markup tags can be used to make selected words appear in bold, italics, a different font, or a different color. For more information on formatting options, see Using HTML Markup in Text

Examples

The following selects items defined in an external items element named "presidentitems":

<text presidents>
/ items = presidentitems
</text>

The following defines text items:

<text presidents>
/ items = ("George Washington", "John Adams", "Thomas Jefferson")
</text>

The following defines picture items:

<picture moutains>
/ items = ("rainier.bmp", "baker.jpg", "sainthelens.gif")
</picture>

The following defines sound items:

<sound rock>
/ items = ("beatles.wav", "stones.wav", "thewho.wav")
</sound>

The following defines video items:

<video tvshows>
/ items = ("desparatehousewives.mpg", "thedailyshow.avi", "southpark.wmv")
</video>

The following defines port items:

<port portsignal>
/ items = ("00011101", "00000000", "11111111")
</port>


items attribute

The items attribute defines the items contained in the stimulus set.

Member of

<image>

Syntax

/ items = itemname

or

/ items = ("path", "path", "path",... )

Parameters

itemname | The name of an item element defined elsewhere in the script.
item | A quoted string representing an actual item.

Remarks

Items can be defined either by specifying the name of an <item element>, or by directly by listing each item in the set.

Different types of stimulus elements use the items in difference ways. If the stimulus is a text element, items represent the actual text items to be presented. If the stimulus is a picture, sound, or video, then the items are the names of the files containing the relevant media. If the stimulus is a port element, the items are strings of 0's and 1's representing 8-bit TTL signals. Characters in an item are specified in descending bit order, with the leftmost 0 or 1 value representing the highest bit and the rightmost value representing the lowest order bit. See How to Present TTL Signals Through the Parallel Port for more details.

Examples

The following selects items defined in an external items element named "presidentitems":

<text presidents>
/ items = presidentitems
</text>

The following defines image items:

<image moutains>
/ items = ("rainier.bmp", "baker.jpg", "sainthelens.gif")
</picture>


items attribute

The items attribute defines the pool of items to be selected by a list element.

Member of

<list>

Syntax

/ items = (item item item item item item ...)

or

/ items = [expression; expression; expression;...]

Parameters

item | Any value string, number, property, or numeric range to be included in the selection pool.
expression | Any valid expression to be included in the selection pool.

Remarks

The item pool can consist of any valid expression, including numbers, strings, properties, and numeric ranges.

When specifying complex expressions such as equations or function calls, the list of expressions must be enclosed in square brackets '[]' and separated by semicolons ';'.

For simple items such as numbers, strings, properties and numeric ranges, items can be enclosed in parentheses and separated by spaces or commas. Note, when specifying a numeric range (e.g., 1-100), the characters within the range must NOT be separated by spaces.

Examples

The following randomly selects the name of a president:

<list presidents>
/ selectionmode = uniform
/ items = ("George Washington", "John Adams", "Thomas Jefferson")
</list>

The following selects a countdown of numbers:

<list countdown>
/ selectionmode = sequence
/ items = (3 2 1)
</list>

The following selects a value of 2 for odd numbered trials and 1 for even numbered trials:

<list evenodd>
/ selectionmode = sequence
/ items = [if ( floor(mod(block.test.currenttrialnumber, 2)) == 0 ) 1 else 2]
</list>

The following randoly selects from two ranges of numbers without replacement:

<list countdown>
/ items = (1-10, 20-21)
</list>


items attribute

The items attribute defines the items contained in the stimulus set.

Member of

<port> <xid>

Syntax

/ items = itemname

or

/ items = ("binary", "binary", "binary",... )

or

/ items = (integer, integer, integer,... )

Parameters

itemname | The name of an item element defined elsewhere in the script.
binary | A quoted string of exactly eight 1s and 0s.
integer | An 8-bit value ranging from 0 to 255.

Remarks

Items can be defined either by specifying the name of an <item element>, or by directly by listing each item in the set.

The items can be defined either as integer values ranging from 0 to 255, or as 8-bit binary strings of 0's and 1's, in which case each digits are listed left-to-right in descending bit order, with the leftmost digit representing the highest order bit and the rightmost digit representing the lowest order bit. See How to Present TTL Signals Through the Parallel Port for more details.

Examples

The following defines port items using binary strings:

<port portsignal>
/ port = LPT1
/ subport = data
/ items = ("00011101", "00000000", "11111111")
</port>

The following defines port items using integers:

<port portsignal>
/ port = LPT1
/ subport = data
/ items = (1, 2, 3, 4, 5)
</port>

The following defines xid port items using integers:

<xid stimtracker>
/ product = stimtracker
/ items = (1, 2, 3, 4, 5)
</xid>


itemspacing attribute

The itemspacing attribute specifies the horizontal space between items on a survey page.

Member of

<survey> <surveypage>

Syntax

/ itemspacing = height

or

/ itemspacing = expression

Parameters

height | The size of the spacing in pixels (default), percent, or points.
expression | A dynamically selected value. See help with expression syntax for more information.

Remarks

The spacing is can be in percent (the default unit), pixels, or points.

Examples

The following randomly selects the position of the text to be the right, left, or center of the screen:

<surveypage page1>
/ caption = ("Page One")
/ itemspacing = 20px
</surveypage>


joystickthreshold attribute

The joystickthreshold attribute specifies the sensitivity of the joystick device to movement.

Member of

<defaults>

Syntax

/ joystickthreshold = integer

Parameters

integer A integer value ranging from 0 to 100.

Remarks

The threshold is specified on a scale from 0 to 100. A threshold of 0 indicates that any joystick movement qualifies as a response, and 100 indicates that the joystick must be fully extended in a particular direction to qualify as a response. The appropriate setting will vary depending on the joystick. The default setting is 50.

Examples

The following sets the default input device to a joystick and sets the threshold to 20:

<defaults>
/ inputdevice = joystick
/ joystickthreshold = 20
</defaults>


labels attribute

The labels attribute specifies custom labels for each data column specified in the columns attribute.

Member of

<data> <datastream> <eyetracker> <summarydata>

Syntax

/ labels = ("label", "label", "label", ...)

Parameters

label The label for each column.

Remarks

If custom labels are not specified, the names in the columns attribute are used as labels.

Examples

The following specifies custom column labels in the data file:

<data>
/ labels = ("date", "time", "groupnumber", "subjectid", "mean reaction time", "error rate", "final score")
/ columns = (date, time, groupnumber, subjectid, values.meanrt, expression.errorrate, values.finalscore)
</data>


labels attribute

The labels attribute specifies labels for various button options on a likert trial

Member of

<likert>

Syntax

/ labels = ("label", "label", "label", ...)

Parameters

label Specifies the labels (in quotes) for a given choice.

Remarks

The labels are a list of strings of any text, and they are positioned above each corresponding likert button.

Examples

The following shows a likert item with evaluative labels:

<likert ratingquestion>
/ stimulusframes = [1=ratingquestion]
/ labels=("excellent", "good", "satisfactory", "bad", "awful")
</likert>


labels attribute

The labels attribute specifies labels for various positions on the slider control.

Member of

<slider> <slidertrial>

Syntax

/ labels = ("label", "label", "label", ...)

Parameters

label Specifies the labels (in quotes) for a given choice.

Remarks

The labels are a list of strings of any text, and they are positioned evenly across the slider control.

Examples

The following shows a slider item with evaluative labels:

<slider ratingquestion>
/ caption = "How do you feel about icecream?"
/ labels=("excellent", "good", "satisfactory", "bad", "awful")
</slider>


lastlabel attribute

The lastlabel attribute determines the text appearing on the next button when the current instruction page in the last in its sequence.

Member of

<instruct>

Syntax

/ lastlabel = "label"

Parameters

label A string in quotes serving as text for the button.

Remarks

The default value is "Next".

Examples

The following sets the finish button label to "Start the task":

<instruct>
/ lastlabel = ("Start the task")
</instruct>


latencydistribution attribute

The latencydistribution attribute controls the response latencies of Inquisit's test monkey.

Member of

<monkey>

Syntax

/ latencydistribution = constant(mean)

or

/ latencydistribution = normal(mean, sd)

or

/ latencydistribution = uniform(min, max)

Parameters

mean | The expected average in milliseconds of the monkey's response latencies.
sd | The expected standard deviation in milliseconds of the monkey's response latencies.
min | The minimum possible latency in milliseconds for the monkey's response.
max | The maximum possible latency in milliseconds for the monkey's response.

Remarks

By default, the monkey uses a normal distribution, the mean and standard deviation of which vary depending upon whether a response deadline or window is used.

Examples

The following specifies that the monkey's latencies are randomly selected from a normal distibution, with a mean of 200 milliseconds and standard deviation of 10. Each response is 95% likely to be correct.

<monkey>
/ latencydistribution = normal(200, 10)
/ percentcorrect = 95
</monkey>

The following specifies that the monkey's latencies are randomly selected from a uniform distribution ranging from 0 to 1000 milliseconds. Each response is 50% likely to be correct.

<monkey>
/ latencydistribution = uniform(0, 1000)
/ percentcorrect = 50
</monkey>


latencytarget attribute

The latencytarget attribute repeats a block until the specified latency criterion is met.

Member of

<block>

Syntax

/ latencytarget = (property, target, maxblocks)

Parameters

property | The performance measure (e.g., "meanlatency", "medianlatency").
target | An integer indicating the target performance level. For example, if the property is meanlatency, a value of 500 would set the threshold to 500 milliseconds.
maxblocks | An integer indicating the maximum number of iterations of the block to run before moving on, regardless of whether performance has reached the target. A value of 0 indicates there is no maximum.

Remarks

When a latencytarget is specified for a block, the block is repeated until the subject's response latencies reaches the specified threshold, or until the specified maximum number of blocks is run. This command is useful for practice blocks where it is important that performance reaches a desired threshold before moving on to data collection blocks. The command can be combined with the correcttarget command to define both speed and accuracy thresholds.

Examples

In the following block repeats itself until either the mean latency over the block is less than or equal to 500, or the block is repeated 5 times, whichever comes first:

<block myblock>
/ trials=[1-100=sometrial]
/ latencytarget=(medianlatency, 500, 5)
</block>


position attribute

The position attribute controls the screen location at which the likert scale is displayed.

Member of

<likert>

Syntax

/ position = (x variable, y variable)

Parameters

x variable | A decimal value between 0 and 100 indicating the horizontal screen location in percentage points.
y variable | A decimal value between 0 and 100 indicating the vertical screen location in percentage points.

Remarks

Horizontal percentage ranges from 0 to 100 with 0 corresponding to the left edge of the screen and 100.0 to the right. Vertical percentages also range from 0 to 100, with 0 placing the scale at the top edge of the screen and 100 placing it at the bottom edge. Percentages may be specified as decimals (e.g., 52.968) for increased precision. The default position is the middle of the screen (50, 50).

Examples

The following shows a five point likert scale at the bottom of the screen with evaluative labels:

<likert ratingquestion>
/ stimulusframes=[1=sometext]
/ anchors=[1="excellent"; 2="good"; 3="satisfactory"; 4="bad"; 5="awful"]
/ position=(50, 90)
</likert>


linelength attribute

The linelength attribute determines the horizontal width of the response textbox in terms of the number of characters that fit on a single row.

Member of

<openended>

Syntax

/ linelength = integer

Parameters

integer An integer indicating the width of the response textbox

Remarks

The actual width of the textbox is calculated using the width of the widest character (usually "W") in the character set. Given that most response input would likely consist of narrower characters ("I"), the actual number of characters that would fit on a single row will almost always be greater than linelength. The default setting is 20.

Examples

The following sets the line length to 40:

<openended question>
/ stimulusframes=[1=sometext]
/ linelength = 40
</openended>


listsize attribute

The listsize attribute defines the width and height of the bounding rectangle of the listbox or dropdown list control of a survey item.

Member of

<dropdown> <listbox>

Syntax

/ listsize = (width, height)

Parameters

width | The width of the rectangle in pixels (default), percent, or points.
height | The height of the rectangle in pixels (default), percent, or points.

Remarks

The listsize attribute allows the list control to be scaled to the appropriate size for a questionnaire.

Examples

The following presents a listbox question, with the listbox sized to 100 by 200 pixels.

<listbox question1>
/ caption = "Choose your favorite flavor.
/ listsize=(100, 200)
/ options = ("vanilla", "chocolate", "strawberry", "mint chip")
</image>


loop attribute

The loop attribute specifies whether a sound or video should stop at the end or continuously loop.

Member of

<sound> <video>

Syntax

/ loop = boolean

Parameters

boolean A value of true or false.

Remarks

Examples

The following shows a video that loops continuously:

<video somevideo>
/ loop=true
</video>


lptaddresses attribute

The lptaddresses attribute specifies the base address of the PC's parallel ports.

Member of

<defaults>

Syntax

/ lptaddresses = (port = address, port = address, port = address, ...)

Parameters

port One of the following values:
Value | Description
lpt<n> | n specifies the port number (e.g., lpt1, lpt2, lpt3, ...).
address A hexidecimal number (e.g., 0348, A588, AF16) representing the address of the parallel port.

Remarks

For the standard ports LPT1 and LPT2, Inquisit can usually determine the base address automatically. For extended or virtual ports, it may be necessary to specify the base address using this attribute.

Examples

The following sets the addresses for the first and second parallel ports:

<defaults>
/ lptaddresses = (lpt1=0348, lpt2=A588)
</defaults>


mask attribute

The mask attribute constrains the text input allowed for a textbox or openended item.

Member of

<openended> <textbox>

Syntax

/ mask = constraint

or

/ mask = regular expression

Parameters

regular expression A regular expression.
constraint One of the following values:
Value | Description
alphabetic | Only letters are permitted.
alphanumeric | Only letters and numbers are permitted.
creditcardnumber | The input must consist of 16 digits. The digits may be divided into 4 groups of 4 separated by a dash or space.
date | The input must be a valid date in the format mm/dd/yyyy.
decimal | Any real number is permitted.
dollars | The input must be a valid amount of dollars and cents. Optionally, a dollar sign may be included and commas can be used to delimit thousands.
emailaddress | A valid email address.
europeandate | The input must be a valid date in the format dd/mm/yyyy.
integer | Any valid integer.
ipaddress | A valid ip address.
negativeinteger | A negative integer.
negativeintegerorzero | A negative integer or zero.
positiveinteger | A positive integer.
positiveintegerorzero | A positive integer or zero.
socialsecuritynumber | A social security number in the format nnn-nnn-nnnn.
time | A valid time in the format hh:mm.
url | A valid url.
ustelephonenumber | A phone number in the format nnn-nnn-nnnn.
uszipcode | A 5 digit zip code optionally followed by a dash and 4 additional digits.

Remarks

The mask attribute provides a powerful set of tools for defining what type of text input is valid for a textbox survey item. It can be used, for example, to allow numberic only, or a date, a phone number in a specific format, or just about any pattern of text. Inquisit provides a set of built in patterns that can be used. If none of the ready-made patterns are appropriate, custom patterns can be defined using regular expression syntax. The web is full of resources for generating regular expressions that validate a wide range of input. For example, see https://utilitymill.com/utility/Regex_For_Range for a tool that generates expressions constraining input to a range of integer values.

Examples

The following restricts the input to a valid email address:

<openended email>
/ stimulusframes=[1=enteremail]
/ mask = emailaddress
</openended>

The following restricts the input to an integer:

<openended integer>
/ stimulusframes=[1=enterinteger]
/ mask = integer
</openended>

The following uses a regular expression to restrict the input to an integer from 0 to 100:

<openended integer>
/ stimulusframes=[1=enterinteger]
/ mask = ^0*([0-9]{1,2}|100)$
</openended>

The following uses a regular expression to restrict the input to an integer from 0 to 200:

<openended integer>
/ stimulusframes=[1=enterinteger]
/ mask = ^0*([0-9]{1,2}|1[0-9]{2}|200)$
</openended>

The following uses a regular expression to restrict the input to an integer from 1 to 99:

<openended integer>
/ stimulusframes=[1=enterinteger]
/ mask = ^0*[1-9][0-9]?$
</openended>


maxchars attribute

The maxchars attribute determines the maximum number of characters allowed for a response.

Member of

<textbox>

Syntax

/ maxchars = integer

Parameters

integer An integer specifying a the maximum number of characters allowed.

Remarks

When the number of characters typed by the respondent reaches this limit, additional typing is ignored (unless the respondent first deletes characters).

Examples

The following allows subjects to enter responses up to 2 characters.

<textbox question>
/ caption="Enter your age"
/ maxchars = 2
</textbox>


maxfixationtime attribute

The maxfixationtime attribute specifies the maximum duration of a fixation in milliseconds.

Member of

<eyetracker>

Syntax

/ maxfixationtime = maxfixationtime

Parameters

maxfixationtime The maximum fixation time to use in the real-time determination of fixation points.

Remarks

This is the maximum amount of time that will be used in calculating the current fixation. The default value is 500ms. Shorter durations may improve responsiveness while longer durations help reduce the influence of noisy data from the eye tracker.

Examples

The following sets the maximum fixation time:

<eyetracker>
/ maxfixationtime = 300.0
</eyetracker>


maxrunsize attribute

The maxrunsize attribute specifies the maximum number of consecutive times a given value can be randomly selected from a list.

Member of

<list>

Syntax

/ maxrunsize = integer expression

Parameters

integer expression An expression that can be converted to an integer value.

Remarks

The maxrunsize attribute places a constraint on random selection to ensure that a given item isn't selected multiple times in a row. If set to 1, for example, maxrunsize ensures that no value is selected twice or more in a row. A value of 2 would prevent runs of 3 or greater. By default, runs of any size are permitted. This attribute can only be specified if selectionmode is set to 'random'.

Random selection is done on the fly, so if multiple selection constraints such as not or replace are in place, it may not be possible to satisfy them all on a give trial, especially if there are only a few remaining items in the selection pool. In that case, the list will suspend one of the constraints and try again. If it still can not satisfy the remaining constraints, it suspends another and tries again, and so forth. By default, the maxrunsize constraint is suspended first, then replace, and finally the not constraints. If a procedure requires that the constraints always be satisfied, pregenerate a set of selection sequences that satisfy the constraints and then randomly select one of the pregenerated sequences to use for a given session.

Examples

The following sets the maxrunsize of a list to 1 to avoid any value being selected twice in a row:

<list selector>
/ selectionmode = random
/ maxrunsize = 1
/ items = [1; 2; 3; 4; 5]
</list>


minchars attribute

The minchars attribute determines the minimum number of characters allowed for a response.

Member of

<textbox>

Syntax

/ minchars = integer

Parameters

integer An integer specifying a the minimum number of characters allowed.

Remarks

The default setting is 0 characters.

Examples

The following allows subjects to enter responses of 2 or more characters.

<textbox question>
/ caption="Enter your age"
/ minchars = 2
</textbox>


minfixationtime attribute

The minfixationtime attribute specifies the minimum duration of a fixation in milliseconds.

Member of

<eyetracker>

Syntax

/ minfixationtime = minfixationtime

Parameters

minfixationtime The minimum fixation time to use in the real-time determination of fixation points.

Remarks

This is the minimum amount of time they eye needs to be focused on a particular area without moving beyond the saccade threshold. The default value is 100ms. Shorter values will result in declaring a fixation more quickly, but may be more prone to false positives.

Examples

The following sets the minimum fixation time:

<eyetracker>
/ minfixationtime = 75.0
</eyetracker>


minimumversion attribute

The minimumversion attribute specifies the minimum version of Inquisit required to run this script.

Member of

<defaults>

Syntax

/ minimumversion = "version"

Parameters

version A string in quotes indicating the minimum required version number.

Remarks

This attribute is used to indicate that a script uses features introduced in a specific release of Inquisit. If someone attempts to run the script using a previous version, they will receive an error message noting the required version.

Examples

The following indicates that the script must be run on version 3.0.0.0 or later:

<defaults>
/ minimumversion = "3.0.0.0"
</defaults>


mode attribute

The mode attribute controls the procedure used to obtain a response from the subject.

Member of

<response>

Syntax

/ mode = responsemode

Parameters

responsemode One of the following values:

Value | Description
free | Any valid response may be given at any time.
window | The trial uses the response window procedure.
correct | A correct response may be given at any time. If a valid but incorrect response is given, the response is treated as an error. The first valid response, correct or incorrect, is recorded in the data file. The recorded latency is the that of the correct response.
noresponse | The trial does not wait for a response.
anyresponse | Any response can be given at any time. All possible responses supported by the input device are considered valid.

Remarks

Setting the mode attribute to window causes Inquisit to display the stimulus assigned to the rwstimulus attribute for an interval or window of time. The length of the interval is rwwidth ms and the middle of the interval occurs rwcenter ms following the end of the last stimulus presentation frame. If the subject responds during the interval, the stimulus assigned to rwhitstimulus is displayed and remains on the screen for rwhitduration ms. If rwhitstimulus is not defined and the rwstimulus is text, the rwstimulus turns red and remains on the screen for rwhitduration ms. If rwhitstimulus is not defined and the rwstimulus is not text, then the rwstimulus is erased from screen and a rwhitduration ms pause ensues. If the subject responds before the window, the rwstimulus never appears. If the subject responds after the interval, the rwstimulus disappears.

Depending upon performance on a given block in this experiment, Inquisit may adjust the window center value for subsequent blocks involving this <response>.

The window center is increased by 33 ms if

The window center is decreased by 33 ms if

Examples

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


monitor attribute

The monitor attribute specifies the monitor on which the stimulus should be presented.

Member of

<button> <clock> <html> <picture> <shape> <text> <video>

Syntax

/ monitor = integer

Parameters

integer The ordinal number of the monitor.

Remarks

This attribute specifies which monitor a given stimulus should appear on for experimental paradigms that use multiple display monitors connected to the computer. If the specified monitor number is greater than the number of monitors connected to the system, the stimulus is not displayed. Note that Inquisit assumes all monitors are set the same refresh rate as the first monitor. If this is not the case, timing of stimuli on nonprimary monitors may be off.

Examples

The following text is presented on the second monitor connected to the computer:

<text option1>
/ items=("1.jpg", "2.jpg", "3.jpg")
/ monitor=2
</text>


monkeyresponse attribute

The monkeyresponse attribute specifies the set of responses that the monkey should choose from when performing a given trial.

Member of

<trial>

Syntax

/ monkeyresponse = ("string", "string",...)

or

/ monkeyresponse = (scancode, scancode, ...)

or

/ monkeyresponse = (property, property, ...)

or

/ monkeyresponse = [expression; expression; expression;...]

Parameters

string | A string indicating a valid response for the given input mode. For example, this could be the name of a stimulus, mouse event, or a joystick event.
scancode | An integer specifying the scancode of a valid keyboard response. See the scancodes table for corresponding key value assignments.
property | The name of a property whose value resolves to a valid response for the given input mode.
expression | An expression that resolves to a valid response for the given input mode.

Remarks

This attribute specifies a set of responses considered valid for the test monkey when performing this trial. The set can consist of any valid expression, including numbers, strings, and properties. When the test monkey is run and Inquisit encounters this attribute on a given trial, it will randomly select from the responses listed in the attribute. Controlling the monkey's response is useful for testing scripts that behave very differently depending on responding, or that allow the participant to abort the experiment with a particular response. For example, if a script includes an informed consent trial, the monkeyresponse attribute can be used to make sure that the monkey always gives consent.

Examples

The following trial makes sure the monkey always consents to participate:

<trial consent>
/ stimulusframes=[1=consentform, agreebutton, disagreebutton]
/ inputdevice=mouse
/ validresponse=(agreebutton, disagreebutton)
/ monkeyresponse=("agreebutton")
/ ontrialend=[if (trial.consent.response == "disagreebutton") script.abort()]
</trial>

The following trial makes sure the monkey always consents to participate:

<trial example>
/ stimulusframes=[1=target]
/ inputdevice=keyboard
/ validresponse=("e", "i")
/ monkeyresponse=(values.monkeyresponse)
</trial>


mouse attribute

The mouse attribute determines whether to allow mouse responses in addition to keyboard responses.

Member of

<openended>

Syntax

/ mouse = boolean

Parameters

boolean A boolean value set to true or false.

Remarks

If true, the mouse cursor becomes visible and the subject may respond by clicking on the "Next >>" button to commit his response and advance to the next trial. By default the value is "true", and the respondent must either click the submit button or press CTRL+ENTER on the keyboard to advance.

Examples

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


mouse attribute

The mouse attribute determines whether to allow mouse responses in addition to keyboard responses.

Member of

<likert>

Syntax

/ mouse = boolean

Parameters

boolean A boolean value set to true or false.

Remarks

If true (default), the mouse cursor becomes visible and subjects may respond by clicking one of the buttons corresponding to a point on the scale.

If false, subjects must respond using the keyboard. Points on the scale may be selected by pressing the key with its corresponding number (on the keyboard or number pad). Alternatively, use the arrow keys, backspace, space bar, and tab key to change the currently selected point. The current selection is committed by pressing the ENTER key.

Examples

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


multiline attribute

The multiline attribute determines whether to multiple lines of text input are permitted.

Member of

<openended>

Syntax

/ multiline = boolean

Parameters

boolean A boolean value set to true or false.

Remarks

If true, the subject may enter multiple lines of text in an opended response box, and a new line can be started by pressing the ENTER key. If false, only one line of text is permitted, and pressing ENTER will advance to the next trial for openened trials. By default the value is false.

Examples

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


navigationbuttonfontstyle attribute

The navigationbuttonfontstyle attribute specifies the font in which the navigation button caption is presented.

Member of

<instruct> <likert> <openended> <slidertrial> <survey> <surveypage>

Syntax

/ navigationbuttonfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)

Parameters

face name | A string in quotes indicating the name of the font.
height | (Optional) An decimal that specifies the height of the font in points (default), pixels, or percent.
bold | (Optional) A value of true or false indicating whether the font should be bold.
italic | (Optional) A value of true or false indicating whether the font should be italic.
underline | (Optional) A value of true or false indicating whether the font should underlined.
strikeout | (Optional) A value of true or false indicating whether the font should appear with a strikeout line.
quality | (Optional) An integer ranging from 1 to 5 indicating the font quality. 5 is the best quality (ClearType).
character set (Optional) An integer indicating the character set code. The character set can be any of the following:
Value | Description
0 | ANSI
186 | Baltic
1 | Default (uses the current system locale on the local computer)
136 | Chinese Big5 (Taiwan, Hong Kong, Macau)
238 | Eastern European
134 | GB2312 (Simplified Chinese)
161 | Greek
129 | Hangul (Korean)
77 | Mac
255 | OEM (operating system dependent)
204 | Russian
128 | ShiftJIS (Japanese)
2 | Symbol
162 | Turkish
163 | Vietnamese
130 | Johab (Korean)
178 | Arabic.
177 | Hebrew
222 | Thai

Remarks

Inquisit provides an easy to use font picker dialog to set this attribute. To use the font picker, 1) move the cursor to where you want to insert the the font attribute, 2) open the Tools menu, and 3) select "Font Wizard". Once you have selected the desired font settings in the Font Wizard dialog, select OK and the font attribute and appropriate settings will automatically be inserted in your script at the cursor location.

Examples

The following sets the button caption font to Arial bold and sets the height to 5% of the screen height:

<survey somesurvey>
/ navigationbuttonfontstyle = ("Arial", 10%, true)
/ navigationbuttonsize = (10%, 10%)
/ items = ("yada yada yada")
</survey>

The following sets the button caption font for a particular survey page to italic Tahoma font, 25 pixels high:

<surveypage page1>
/ navigationbuttonfontstyle = ("Tahoma", 25px, false, true)
/ navigationbuttonsize = (250px, 50px)
/ items = ("yada yada yada")
</surveypage>


navigationbuttonsize attribute

The navigationbuttonsize attribute specifies size of the navigation button.

Member of

<survey> <surveypage>

Syntax

/ navigationbuttonsize = (width variable, height variable)

Parameters

width variable | The width of the rectangle in pixels (default), percent, or points.
height variable | The height of the rectangle in pixels (default), percent, or points.

Remarks

The navigationbuttonsize attribute allows the sizing of the navigation buttons for moving forward and backward in through the pages of a survey .

Examples

The following sets button height and width to 10% of the screen:

<survey somesurvey>
/ pages=[1=page1; 2=page2; 3=page3]
/ navigationbuttonfontstyle = ("Arial", 10%, true)
/ navigationbuttonsize = (10%, 10%)
</survey>

The following sets button width and height to 250 and 50 pixels respectively:

<surveypage page1>
/ pages=[1=page1; 2=page2; 3=page3]
/ navigationbuttonfontstyle = ("Tahoma", 25px, false, true)
/ navigationbuttonsize = (250px, 50px)
</surveypage>


nextbuttonposition attribute

The nextbuttonposition attribute sets the position on the screen of the next button on survey page.

Member of

<survey> <surveypage>

Syntax

/ nextbuttonposition = (x value, y value)

Parameters

x value | The horizontal screen coordinate in pixels, percent(default), or points.
y value | The vertical screen coordinate in pixels, percent(default), or points.

Remarks

Horizontal nextbuttonposition is relative to the left side. 0% is the left edge of the screen and 100% is the right edge. Vertical position is relative to the top of the screen, with 0% placing the stimulus at the top and 100% placing it at the bottom edge. The inverse is true for bidirectional locales such as Hebrew and Arabic. Percentages may be specified as decimals (e.g., 52.968) for increased precision.

Examples

The following sets next button position to the lower right corner of the screen:

<survey somesurvey>
/ pages=[1=page1; 2=page2; 3=page3]
/ nextbuttonposition = (90%, 90%)
/ backbuttonposition = (0%, 90%)
/ navigationbuttonfontstyle = ("Arial", 10%, true)
/ navigationbuttonsize = (10%, 10%)
</survey>

The following sets next button position to the upper right corner of a 1280 x 1024 resolution screen:

<surveypage page1>
/ pages=[1=page1; 2=page2; 3=page3]
/ nextbuttonposition = (774px, 0px)
/ backbuttonposition = (0px, 0px)
/ navigationbuttonfontstyle = ("Tahoma", 25px, false, true)
/ navigationbuttonsize = (250px, 50px)
</surveypage>


nextkey attribute

The nextkey attribute specifies which response advances to the next instruction page.

Member of

<instruct>

Syntax

/ nextkey = ("character")

or

/ nextkey = (scancode)

or

/ nextkey = (signal)

Parameters

character | A character indicating a correct keyboard response.
scancode | An integer specifying the scancode of a correct keyboard response. See the scancodes table for corresponding key value assignments.
signal | An integer representing the response code of a serial or parallel port device such as a response box.

Remarks

The default value is the space bar, " ".

Examples

The following sets the previous key to the "m" key:

<instruct>
/ nextkey = ("m")
</instruct>


nextlabel attribute

The nextlabel attribute determines the text appearing on the next button if the current instruction page is not the last in its sequence.

Member of

<instruct>

Syntax

/ nextlabel = "label"

Parameters

label A string in quotes serving as text for the button.

Remarks

The default value is "Next".

Examples

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


not attribute

The not attribute specifies that selected values may not equal the current value of the specified counter or stimulus.

Member of

<counter>

Syntax

/ not = (stimulusname, stimulusname, stimulusname)

or

/ not = (countername, countername, countername)

Parameters

stimulusname | The name of a stimulus element defined elsewhere in the script.
countername | The name of a counter element defined elsewhere in the script.

Remarks

The not attribute is used to prevent a counter from selecting the same item as another stimulus or counter. When not is specifies, selection procedes normally as specified by the select attribute. If the selected item is equal to the not item, then the item is returned to the pool and another is selected.

Examples

The following counter randomly selects a value from 1 to 10, but reselects if the value is equal to the currently selected item of sometext.

<counter mycounter>
/ select=noreplace(1-10)
/ not=sometext
</counter>


not attribute

The not attribute specifies a set of values that should be excluded from random selection.

Member of

<list>

Syntax

/ not = (item item item item item item ...)

or

/ not = [expression; expression; expression]

Parameters

expression Any valid expression to be excluded from the selection pool.

Remarks

The not attribute is used to prevent a list from selecting certain values, such as the currently selected item in another list. If the selected item is equal to the current value of one of the expressions listed in the not command, then the item is returned to the random selection pool or skipped for sequential selection and another is selected.

Random selection is done on the fly, so if additional selection constraints such as maxrunsize or replace are in place, it may not be possible to satisfy them all on a give trial, especially if there are only a few remaining items in the selection pool. In that case, the list will suspend one of the constraints and try again. If it still can not satisfy the remaining constraints, it suspends another and tries again, and so forth. By default, the maxrunsize constraint is suspended first, then replace, and finally the not constraints. If a procedure requires that the constraints always be satisfied, pregenerate a set of selection sequences that satisfy the constraints and then randomly select one of the pregenerated sequences to use for a given session.

When specifying complex expressions such as equations or function calls, the list of expressions must be enclosed in square brackets '[]' and separated by semicolons ';'.

For simple items such as numbers, strings, properties and numeric ranges, items can be enclosed in parentheses and separated by spaces or commas. Note, when specifying a numeric range (e.g., 1-100), the characters within the range must NOT be separated by spaces.

Examples

The following list randomly selects a value from 1 to 10, but reselects if the value is equal to the currently selected item of list.list1.

<list list2>
/ items=[1; 2; 3; 4; 5; 6; 7; 8; 9; 10]
/ selectionmode=uniform
/ not=[list.list1.currentvalue]
</list>


numframes attribute

The numframes attribute specifies the total number of vertical retrace frames making up the stimulus presentation sequence for a trial.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ numframes = integer

Parameters

integer A non-negative integer specifying the number of frames.

Remarks

In most cases, the numframes attribute need not be specified, in which case the number of frames is equal to last frame specified by the stimulusframes attribute. The numframes attribute is useful for extending the stimulus frames sequence beyond the frame at which the last stimuli are presented. For example, a task that displays a single stimulus on the screen for a certain number of retrace frames before allowing the subject to respond could use the numframes command to do so.

See How to Control Trial Duration and Inter-Trial Intervals for related information.

Examples

The following trial presents a single text stimulus on the screen for 20 frames before allowing the subject to respond.

<trial mytrial>
/ stimulusframes=[1=sometext]
/ numframes=20
</trial>


numlines attribute

The numlines attribute determines the number of lines of text in the response textbox.

Member of

<openended>

Syntax

/ numlines = integer

Parameters

integer A positive integer specifying the number of lines.

Remarks

This attribute is used to enable multiple lines of text input on an openended trial. The default setting is 1 line.

Examples

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


numpoints attribute

The numpoints attribute determines the number of points on a Likert scale.

Member of

<likert>

Syntax

/ numpoints = integer

Parameters

integer A positive integer specifying the number of lines.

Remarks

The default is 5.

Examples

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


onanimate attribute

The onanimate attribute allows custom stimulus animations to be programmed.

Member of

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

Syntax

/ onanimate = [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 the enclosed custom expressions prior to presenting a stimulus animation frame. The script can change properties on a given stimulus such as size, position, or color according to custom logic in order to implement complex animations. The animation parameter must be set to "dynamic" in order for this code to executed.

Examples

The following shape includes a custom animation that alternates between to screen positions:

<shape example>
/ shape = rectangle
/ color = red
/ size = (50%, 50%)
/ position = (50%, 50%)
/ animation = dynamic(500, -1)
/ onanimate = [
if(values.toggle)
{
shape.redsquare.hposition = 75%;
}
else
{
shape.redsquare.hposition = 50%;
}
values.toggle = !values.toggle;
]
</shape>


onblockbegin attribute

The onblockbegin attribute specifies commands to be run at the beginning of a block.

Member of

<block> <expt> <survey>

Syntax

/ onblockbegin = [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 one or more specified expressions at the beginning of a block. The expressions can read and conditionally update the various properties in the script. This is useful for dynamically configuring the block and its trials based on the state of the script or the subject's performance.

Examples

The following block lengthens the timeout based on the subject's mean response time on the last block:

<block myblock>
/ trials=[1-5=practicetrial; 6-10=testtrial)]
/ onblockbegin=[if (values.lastblockreponsetimes > 1000) trial.testtrial.timeout = 950]
</block>

The following block sets the content of a text stimulus based on the percent of correct responses on previous blocks.

<block myblock>
/ trials=[1-10=noreplace(lefttrial, righttrial)]
/ onblockbegin=[if (block.practice.percentcorrect > 80) text.status.item.1 = "nice job!"]
</block>

The following block sets the volume of a sound stimulus to a randomly selected value.

<block myblock>
/ trials=[1-12=noreplace(testtrial, testtrial, distractortrial)]
/ onblockbegin=[sound.testsound.volume = rand(-10000, 0)"]
</block>

The following block updates a simple block counter before it runs.

<block myblock>
/ trials=[1,3,5,7,9 = littletrial; 2,4,6,8,10 = bigtrial)]
/ onblockbegin=[values.testblockcounter = values.testblockcounter + 1]
</block>


onblockend attribute

The onblockend attribute specifies commands to be run at the end of a block.

Member of

<block> <expt> <survey>

Syntax

/ onblockend = [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 one or more specified expressions after a block of trials is complete. The expressions can read and conditionally update the various properties in the script. This is useful for dynamically configuring the experiment based on, for example, the subject's performance on that block.

Examples

The following block lengthens the timeout based on the subject's mean response time on the last block:

<block myblock>
/ trials=[1-5=practicetrial; 6-10=testtrial)]
/ onblockend=[if (block.myblock.meanlatency > 1000) trial.testtrial.timeout = 950]
</block>

The following block sets the content of a text stimulus based on the percent of correct responses on previous blocks.

<block myblock>
/ trials=[1-10=noreplace(lefttrial, righttrial)]
/ onblockend=[if (block.practice.percentcorrect > 80) text.status.item.1 = "nice job!"]
</block>

The following block sets the volume of a sound stimulus to a randomly selected value.

<block myblock>
/ trials=[1-12=noreplace(testtrial, testtrial, distractortrial)]
/ onblockend=[sound.testsound.volume = rand(-10000, 0)"]
</block>

The following block tracks the subject's best block score using a custom value.

<block myblock>
/ trials=[1,3,5,7,9 = littletrial; 2,4,6,8,10 = bigtrial)]
/ onblockend=[values.bestperformance = max(values.bestperformance, block.myblock.percentcorrect)]
</block>


onexptbegin attribute

The onexptbegin attribute specifies commands to be run at the beginning of a expt.

Member of

<expt>

Syntax

/ onexptbegin = [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 one or more specified expressions at the beginning of a expt. The expressions can read and conditionally update the various properties in the script. This is useful for dynamically configuring the expt and its blocks and trials based on the value of the subject id, the computer/display settings, and other properties.

Examples

The following expt updates a text item based on whether the subject code is even or odd:

<expt myexpt>
/ blocks=[1-5=practice; 6-10=test)]
/ onexptbegin=[if (mod(script.subjectid, 2) == 0) text.welcome.item.1 = "You have been assigned to condition A";]
/ onexptbegin=[if mod(script.subjectid, 2) == 1 then text.welcome.item.1 = "You have been assigned to condition B; "]
</expt>


onexptend attribute

The onexptend attribute specifies commands to be run at the end of an expt.

Member of

<expt>

Syntax

/ onexptend = [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 one or more specified expressions after an expt is complete. The expressions can read and conditionally update the various properties in the script. This is useful for dynamically configuring the experiment or recording data based on, for example, the subject's performance on that expt.

Examples

The following expt calculates a d score after the expt is complete:

<expt myexpt>
/ blocks=[1=compatible; 2=incompatible)]
/ onexptend=[values.d = (block.incompatible.meanlatency - block.compatible.meanlatency) / expt.myexpt.sdlatency]
</expt>


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>


onscriptbegin attribute

Member of

Syntax

Parameters

Remarks

Examples

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


onscriptend attribute

Member of

Syntax

Parameters

Remarks

Examples

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


ontrialbegin attribute

The ontrialbegin attribute specifies commands to be run at the beginning of a trial.

Member of

<expt> <surveypage> <trial>

Syntax

/ ontrialbegin = [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 one or more specified expressions at the beginning of a trial. The expressions can read and conditionally update the various properties in the script. This is useful for dynamically configuring the trial and its stimuli based on the state of the script or the subject's performance.

Examples

The following trial updates feedback text based on whether the subject's last response was correct:

<trial mytrial>
/ stimulusframes=[1=feedback, ratepicture]
/ ontrialbegin=[if (values.lastcorrect == true) text.feedback.item.1 = "Your last response was correct"]
</trial>

The following trial shortens a response timeout by 5 millisecond increments with each iteration of the trial.

<trial mytrial>
/ stimulusframes=[1=testmessage]
/ ontrialbegin=[trial.mytrial.timeout = 1000 - (block.myblock.currenttrialnumber * 5)"]
</trial>

The following trial sets the volume of a sound stimulus to a randomly selected value.

<trial mytrial>
/ stimulusframes=[1=hearingtest]
/ ontrialbegin=[sound.hearingtest.volume = rand(-10000, 0)"]
</trial>

The following trial updates a simple trial counter before it runs.

<trial mytrial>
/ stimulusframes=[1,3,5,7,9 = littletrial; 2,4,6,8,10 = bigtrial)]
/ ontrialbegin=[values.testtrialcounter = values.testtrialcounter + 1]
</trial>


ontrialend attribute

The ontrialend attribute specifies commands to be run at the end of a trial.

Member of

<expt> <surveypage> <trial>

Syntax

/ ontrialend = [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 one or more specified expressions after a trial is complete. The expressions can read and conditionally update the various properties in the script. This is useful for dynamically configuring the experiment based on, for example, the subject's performance on that trial.

Examples

The following trial lengthens the timeout based on the subject's response time:

<trial mytrial>
/ stimulusframes=[1=teststim]
/ ontrialend=[if (trial.mytrial.beginresponsetime > values.timeout) values.timeout = values.timeout + 100]
</trial>

The following trial updates a score based on the participants response:

<trial mytrial>
/ stimulusframes=[1=teststim]
/ ontrialend=[if (trial.mytrial.response == "1") values.totalpoints = values.totalpoints + 10]
</trial>

The following trial sets the volume of a sound stimulus progressively louder up to a max of -10000 if the participant responds incorrectly.

<trial mytrial>
/ stimulusframes=[1=teststim]
/ ontrialend=[if (trial.mytrial.correct == false) sound.feedback.volume = max(-10000, sound.feedback.volume - 100)]
</trial>

The following trial tracks the subject's fastest score using a custom value.

<trial mytrial>
/ stimulusframes=[1=teststim]
/ ontrialend=[values.fastest = min(values.fastest, trial.mytrial.latency)]
</trial>


options attribute

The options attribute specifies the labels for the options of a multiple choice survey item.

Member of

<checkboxes> <dropdown> <listbox> <radiobuttons>

Syntax

/ options = ("label", "label", "label", ...)

Parameters

label Specifies the label (in quotes) for a given choice.

Remarks

The labels can be any string of text. The labels also function as the default value for the option, although values that are different than the labels can be assigned using the optionvalues attribute.

Examples

The following shows a listbox survey item with evaluative labels:

<listbox ratingquestion>
/ caption = "How do you feel about icecream?"
/ options=["excellent", "good", "satisfactory", "bad", "awful"]
</listbox>

The following shows a checkbox survey item with various options:

<checkboxes exemptions>
/ caption = "Which of the following sports do you play?"
/ options=["football", "baseball", "basketball", "hockey", "soccer", "snowboarding"]
</checkboxes>

The following shows a radiobutton survey item with options that contain dynamically inserted text:

<radiobuttons exemptions>
/ caption = "Which one of the following sports is your favorite?"
/ options=["<% values.sport1 %>", "<% values.sport2 %>", "<% values.sport3 %>", "<% values.sport4 %>"]
</radiobuttons>


optionvalues attribute

The optionvalues attribute specifies the values corresponding to each option of a multiple choice survey item.

Member of

<checkboxes> <dropdown> <listbox> <radiobuttons>

Syntax

/ optionvalues = ("value", "value", "value", ...)

Parameters

value Specifies the value (in quotes) for a given choice.

Remarks

The optionvalues attribute allows you to specify a value to be recorded in the data file for an option that is different than the option's display text. For example, each option could be assigned a numeric value or another code that would facilitate data analysis. The option values can be any string of text. If no optionvalues are specified, the values are set to the display text specified in the options attribute.

Examples

The following shows a listbox survey item with numeric option values:

<listbox ratingquestion>
/ caption = "How do you feel about icecream?"
/ optionvalues=["excellent", "good", "satisfactory", "bad", "awful"]
/ optionvalues=["1", "2", "3", "4", "5"]
</listbox>

The following shows a listbox survey item with dynamic values:

<listbox ratingquestion>
/ caption = "How do you feel about icecream?"
/ optionvalues=["excellent", "good", "satisfactory", "bad", "awful"]
/ optionvalues=["<% values.icecream1 %>", "<% values.icecream2 %>", "<% values.icecream3 %>", "<% values.icecream4 %>", "<% values.icecream5 %>"]
</listbox>


order attribute

The order attribute specifies whether the options of a multiple choice survey item should be randomly ordered.

Member of

<checkboxes> <dropdown> <listbox> <radiobuttons>

Syntax

/ order = order mode

Parameters

order mode One of the following values:
Value | Description
random | Randomly orders the options.
sequence | Options are listed in the specified order.

Remarks

By default, the options are listed in the order specified by the options attribute. This attribute can be used to randomize the order.

Examples

The following shows a listbox survey item with evaluative labels presented in random order:

<listbox ratingquestion>
/ caption = "How do you feel about icecream?"
/ options=["excellent", "good", "satisfactory", "bad", "awful"]
/ order = random
</listbox>


orientation attribute

The orientation attribute determines whether survey items are layed out horizontally or vertically.

Member of

<dropdown> <listbox> <slider> <slidertrial> <surveypage> <textbox>

Syntax

/ orientation = layout

Parameters

layout One of the following values:
Value | Description
vertical | Items have a vertical layout.
horizontal | Items have a horizontal layout.

Remarks

Survey items that are layed out horizontally conserve vertical space, allowing more items to fit on a survey page. Vertical layout conserves horizontal space, which allows more text to be displayed in captions and options without wrapping. The default value is vertical.

Examples

The following shows a radiobutton survey item in horizontal layout:

<radiobutton ratingquestion>
/ caption = "How do you feel about icecream?"
/ options=["excellent", "good", "satisfactory", "bad", "awful"]
/ orientation=horizontal
</radiobutton>


orientation attribute

The orientation attribute determines whether survey items are layed out horizontally or vertically.

Member of

<checkboxes> <radiobuttons>

Syntax

/ orientation = layoutoption

Parameters

layoutoption One of the following values:
Value | Description
vertical | Items have a vertical layout.
horizontal | Items have a horizontal layout.
horizontalequal | Items have a horizontal layout and are allocated equal space.

Remarks

Survey items that are layed out horizontally conserve vertical space, allowing more items to fit on a survey page. Vertical layout conserves horizontal space, which allows more text to be displayed in captions and options without wrapping. The default value is vertical.

Examples

The following shows a radiobutton survey item in horizontal layout:

<radiobutton ratingquestion>
/ caption = "How do you feel about icecream?"
/ options=["excellent", "good", "satisfactory", "bad", "awful"]
/ orientation=horizontal
</radiobutton>

The following shows a radiobutton survey item in an equally spaced horizontal layout:

<radiobutton ratingquestion>
/ caption = "How do you feel about icecream?"
/ options=["excellent", "good", "satisfactory", "bad", "awful"]
/ orientation=horizontalequal
</radiobutton>


other attribute

The other attribute adds an "other" option to multiple choice survey items that allows respondents to freely enter their own choice if none of the predetermined choices fit.

Member of

<checkboxes> <radiobuttons>

Syntax

/ other = "caption"

or

/ other = textbox

Parameters

caption | A string in quotes serving as caption for the other option.
textbox | A textbox item to use for the other option.

Remarks

In some cases, it is difficult to anticipate all of the possible responses for a multiple choice item. The other item allows participants to enter their own option if none of the others fit. For example, a survey that asks voters to select a candidate might include the other optino to account for write ins.

Examples

The following shows a radiobutton survey item that allows respondents to enter their favorite flavor of ice cream if it is not on the list:

<radiobutton ratingquestion>
/ caption = "What is your favorite flavor of ice cream?"
/ options=["chocolate", "vanilla", "mint chip", "chunk monkey", "pistaccio"]
/ other="other flavor"
</radiobutton>


pagefontstyle attribute

The pagefontstyle attribute specifies the font in which survey pages are presented.

Member of

<checkboxes> <dropdown> <listbox> <radiobuttons> <slider> <survey> <surveypage> <textbox>

Syntax

/ pagefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)

Parameters

face name | A string in quotes indicating the name of the font.
height variable | (Optional) An integer that specifies the height of the font in points (default), pixels, or percent.
bold | (Optional) A value of true or false indicating whether the font should be bold.
italic | (Optional) A value of true or false indicating whether the font should be italic.
underline | (Optional) A value of true or false indicating whether the font should underlined.
strikeout | (Optional) A value of true or false indicating whether the font should appear with a strikeout line.
quality | (Optional) An integer ranging from 1 to 5 indicating the font quality. 5 is the best quality (ClearType).
character set (Optional) An integer indicating the character set code. The character set can be any of the following:
Value | Description
0 | ANSI
186 | Baltic
1 | Default (uses the current system locale on the local computer)
136 | Chinese Big5 (Taiwan, Hong Kong, Macau)
238 | Eastern European
134 | GB2312 (Simplified Chinese)
161 | Greek
129 | Hangul (Korean)
77 | Mac
255 | OEM (operating system dependent)
204 | Russian
128 | ShiftJIS (Japanese)
2 | Symbol
162 | Turkish
163 | Vietnamese
130 | Johab (Korean)
178 | Arabic.
177 | Hebrew
222 | Thai

Remarks

The font can be set for the entire survey, or for a particular page, with the page setting overriding the survey settings. Individual items may have additional font settings that will override this font style.

Inquisit provides an easy to use font picker dialog to set this attribute. To use the font picker, 1) move the cursor to where you want to insert the the font attribute, 2) open the Insert menu, and 3) select "Font...". Once you have selected the desired font settings in the Font Wizard dialog, select OK and the font attribute and appropriate settings will automatically be inserted in your script at the cursor location.

Examples

The following sets the default font for the edit control of a textbox survey item to text in 2 inch Courier New font:

<textbox q1>
/ pagefontstyle = ("Courier New", 2in, false, false, false)
/ caption = ("Enter the first three words that pop into your head.")
</textbox>

The following sets the font for the options of a checkbox survey item to an 8 point Courier New font:

<checkboxes q1>
/ pagefontstyle = ("Courier New", 8pt, false, false, true)
/ caption = ("Check all that apply.")
/ options=("I am a US citizen.", "I have never been convicted of a felony")
</checkboxes>

The following sets the default survey page font to 14pt Arial bold:

<survey somesurvey>
/ pagefontstyle = ("Arial", 14pt, true)
/ pages = (1=p1; 2=p2; 3=p3)
</survey>

The following sets the default survey page font to Arial bold and sets the height to 5% of the screen height:

<survey somesurvey>
/ pagefontstyle = ("Arial", 10%, true)
/ pages = (1=p1; 2=p2; 3=p3)
</survey>

The following sets the page font for a particular survey page to italic Tahoma font, 25 pixels high:

<surveypage page1>
/ pagefontstyle = ("Tahoma", 25px, false, true)
/ questions = (1=q1; 2=q2; 3=q3)
</surveypage>


pages attribute

The pages attribute specifies the sequence of pages in a survey.

Member of

<survey>

Syntax

/ pages = [pagenumber, pagenumber = pagename; pagenumber-pagenumber = selectmode(pagename, pagename,...); pagenumber, pagenumber-pagenumber = pagename]

Parameters

pagenumber | A non-negative integer specifying the page number.
pagename | The name of a page defined elsewhere in the script to be run in this survey.
selectionmode One of the following values:
Value | Description
noreplace | Randomly selects without replacement which page in the group to run.
noreplacenorepeat | Randomly selects which page in the group to present without replacement and without selecting any single page consecutively.
replace | Randomly selects with replacement which page in the group to run.
replacenorepeat | Randomly selects which page in the group to present with replacement and without selecting any single page consecutively.
sequence | Runs each page in the group.

Remarks

The integers to the left of the equal signs represent ordinal positions within the sequence of pages. Pages can be directly assigned to a position in the sequence using the equals sign. A page can be simultaneously assigned to multiple positions by separating the position numbers with commas (equivalent to "and") or dashes (equivalent to "through"). All page numbers in the survey must be assigned to a page.

Examples

The following survey consists of 3 survey pages presented in fixed order:

<survey>
/ pages=[1=page1; 2=page2; 3=page3]
</survey>

The following survey presents 4 pages in random order.

<survey>
/ pages=[1-4=noreplace(page1, page2, page3)]
</survey>


pan attribute

The pan attribute determines the relative volume between the left and right output channels.

Member of

<sound>

Syntax

/ pan = integer

Parameters

integer A positive integer specifying the number of lines.

Remarks

The pan value must fall with the range of -10,000 to 10,000 and is measured in hundredths of a decibel (dB). The neutral value is 0; it indicates that both channels are at full volume (attenuated by 0 decibels). At any other setting, one of the channels is at full volume and the other is attenuated. For example, a pan of -2173 means that the left channel is at full volume and the right channel is attenuated by 21.73 dB. Similarly, a pan of 870 means that the left channel is attenuated by 8.7 dB and the right channel is at full volume. A pan of -10,000 means that the right channel is silent and the sound is "all the way to the left," while a pan of 10,000 means that the left channel is silent and the sound is "all the way to the right." The pan control is cumulative with the volume control.

Examples

The following defines a set of sounds to be presented to the left speaker:

<sound rock>
/ items = ("beatles.wav", "stones.wav", "thewho.wav")
/ pan = -10,000
</sound>


password attribute

The password attribute specifies a password to use for accessing secured network locations.

Member of

<data> <survey>

Syntax

/ password = "string"

Parameters

string A quoted string indicating a secret password.

Remarks

The userid and password are used to log in when data is stored on a secured network resource such as a web site.

Examples

The following saves the data to a secure web share using the specified userid and password:

<data>
/ file="https://storage.millisecond.com/mydata/"
/ userid="sean"
/ password="open sesame"
</data>


percentcorrect attribute

The percentcorrect attribute controls the accuracy with which Inquisit's test monkey responds.

Member of

<monkey>

Syntax

/ percentcorrect = integer

Parameters

integer An integer from 0 to 100 specifying the expected percentage of correct responses.

Remarks

By default, the monkey accuracy is the number of correct responses divided by the number of valid response.

Examples

The following specifies the monkey's latencies are randomly selected from from a normal distibution, with a mean of 200 milliseconds and standard deviation of 10. Each response is 95% likely to be correct.

<monkey>
/ percentcorrect = normal(200, 10)
/ percentcorrect = 95
</monkey>

The following specifies the monkey's latencies are randomly selected from a uniform distribution ranging from 10 to 50 milliseconds. Each response is 50% likely to be correct.

<monkey>
/ percentcorrect = uniform(10, 50)
/ percentcorrect = 50
</monkey>


photocapture attribute

The photocapture attribute takes a snapshot using the built-in camera.

Member of

<block> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Syntax

/ photocapture = boolean

Parameters

boolean A boolean value of true or false.

Remarks

It is sometimes useful to have a photo of a respondent to verify identity or to confirm demographic information. When the photocapture attribute is set to true, a photo is taken at the beginning of the expt, block, or trial. Photos are saved as jpg files in a subfolder called "photocaptures" (located under the folder containing the script).

Examples

The following trial takes a picture at the beginning:

<trial q1>
/ stimulustimes = [1=target1, target2, target3]
/ photocapture = true
/ validresponse = (noresponse, lbuttondown)
/ timeout = 1000
/ inputdevice = mousekey
</trial>


playthrough attribute

The playthrough attribute indicates whether a sound or video should be played through to the end before responses are allowed.

Member of

<sound> <video>

Syntax

/ playthrough = boolean

Parameters

boolean A value of true or false.

Remarks

If set to true, responses made before the sound or video is finished playing are ignored. If false, (the default) the subject may respond immediately after the sound or video begins.

Examples

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


plugin attribute

The plugin attribute specifies which eye tracker plugin to load.

Member of

<eyetracker> <eyetracker> <eyetracker>

Syntax

/ plugin = "plugin name"

Parameters

plugin name The name of the eye tracker plugin to use. Must be one of the following values:
Value | Description
tobii | The Inquisit 6 Tobii Plugin
srresearch | The Inquisit 6 SR Research EyeLink Plugin

Remarks

This attribute is mandatory for the eyetracker element.

Examples

The following binds the eytracker element to the Tobii plugin for use with a Tobii eye tracker:

<eyetracker>
/ plugin = "tobii"
</eyetracker>

The following binds the eytracker element to the SR Research EyeLink plugin for use with an EyeLink eye tracker:

<eyetracker>
/ plugin = "srresearch"
</eyetracker>


plugin attribute

The plugin attribute specifies which eye tracker plugin to load.

Member of

<eyetracker>

Syntax

/ plugin = "srresearch"

Parameters

srresearch Specify "srresearch" to use the Inquisit SR Research EyeLink Plugin

Remarks

This attribute is mandatory for the eyetracker element.

Examples

The following binds the eytracker element to the SRResearch plugin for use with an EyeLink eye tracker:

<eyetracker>
/ plugin = "srresearch"
</eyetracker>


plugin attribute

The plugin attribute specifies which eye tracker plugin to load.

Member of

<eyetracker>

Syntax

/ plugin = "tobii"

Parameters

tobii Specify "tobii" to use the Inquisit Tobii Plugin

Remarks

This attribute is mandatory for the eyetracker element.

Examples

The following binds the eytracker element to the Tobii plugin for use with a Tobii eye tracker:

<eyetracker>
/ plugin = "tobii"
</eyetracker>


poolsize attribute

The poolsize attribute specifies the total number of items in the selection pool.

Member of

<list>

Syntax

/ poolsize = integer expression

Parameters

integer expression An expression that can be converted to an integer value.

Remarks

The poolsize attribute creates a random selection pool of the specified size, adding items according to any itemprobabilities specified, or otherwise in proportion to their occurrence the items attribute. If poolsize is not specified, the size of the pool is equal to the number of items listed in the items attribute.

When setting poolsize in combination with itemprobabilities, choose a size for which each of specified probabilities results in a whole number of items in the pool. If the poolsize results in a fractional count of a given item, the count will be rounded to the nearest integer.

Examples

The following list creates a random selection pool of size 100 consisting of 30 "X and 70 "O".

<list example>
/ items=["X"; "O";]
/ itemprobabilities=[0.3; 0.7;]
/ poolsize=100
/ selectionmode=uniform
</list>

The following list creates a random selection pool of size 10 consisting of 5 "A" and 5 "B":

<list example>
/ items=["A"; "B";]
/ poolsize=100
/ selectionmode=uniform
</list>

The following list creates a sequential selection pool of size 9 equivalent to /items = [1; 2; 3; 1; 2; 3; 1; 2; 3;]:

<list example>
/ items=[1; 2; 3;]
/ poolsize=9
/ selectionmode=sequence
</list>


port attribute

This attribute specifies which of the serial or parallel ports - LPT1, LPT2, COM1, COM2 - to use for sending signals.

Member of

<port>

Syntax

/ port = port name

Parameters

port name One of the following values:
Value | Description
com<n> | Responses are defined a serial port signal, where n specifies the port number (e.g., COM1, COM2, COM3, ...).
lpt | Responses are defined as a parallel port signal on the first available parallel port.
lpt<n> | Responses are defined as a parallel port signal, where n specifies the port number (e.g., LPT1, LPT2, LPT3, ...).

Remarks

The default setting is LPT1.

Examples

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


position attribute

The position attribute controls the screen location at which stimuli are presented.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <likert> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Syntax

/ position = (x value, y value)

Parameters

x value | A value or property indicating the horizontal screen coordinate in pixels, percent(default), or points. If x is set to null and y is specified, x is set to the pixel value of y.
y value | A value or property indicating the vertical screen coordinate in pixels, percent(default), or points. If y is set to null and x is specified, y is set to the pixel value of x.

Remarks

Horizontal position is relative to the left side. 0% is the left edge of the screen and 100% is the right edge. Vertical position is relative to the top of the screen, with 0% placing the stimulus at the top and 100% placing it at the bottom edge. Percentages may be specified as decimals (e.g., 52.968) for increased precision. The default position is the middle of the screen (50%, 50%).

Examples

The following sets the position of the text to the lower left corner of the screen:

<text sometext>
/ items = ("ipsum")
/ position = (0, 100)
</text>

The following sets the position of the text to the middle of the screen with 800 X 600 resolution:

<text sometext>
/ items = ("ipsum")
/ position = (400px, 300px)
</text>

The following sets the position based on the trial number:

<text sometext>
/ items = ("ipsum")
/ position = (trial.mytrial.currenttrialnumber * 5, trial.mytrial.currenttrialnumber * 5)
</text>


position attribute

The position attribute specifies the screen location of the response textbox for an openended trial.

Member of

<openended>

Syntax

/ position = (x variable, y variable)

Parameters

x variable | A decimal value between 0 and 100 indicating the horizontal screen location in percentage points.
y variable | A decimal value between 0 and 100 indicating the vertical screen location in percentage points.

Remarks

Horizontal percentage ranges from 0 to 100 with 0 corresponding to the left edge of the screen and 100.0 to the right. Vertical percentages also range from 0 to 100, with 0 placing the stimulus at the top edge of the screen and 100 placing it at the bottom edge. Percentages may be specified as decimals (e.g., 52.968) for increased precision. The default position is the middle of the screen (50, 50).

Examples

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


postinstructions attribute

The postinstructions attribute determines the sequence of instruction pages presented at the end of an experiment or block.

Member of

<block> <expt>

Syntax

/ postinstructions = (pagename, pagename, pagename, ...)

Parameters

pagename The name of a page or htmlpage element defined elsewhere in the script.

Remarks

Any sequence of <page> or <htmpage> elements may be specifed.

Examples

The following block presents 3 instruction pages after the block is complete:

<block myblock>
/ trials=[1-10=noreplace(trial1, trial2)]
/ postinstructions=(page1, page2, page3)
</block>


posttrialpause attribute

The posttrialpause attribute specifies the number of milliseconds to pause at the end of a trial after the subject has responded.

Member of

<defaults> <likert> <openended> <slidertrial> <trial>

Syntax

/ posttrialpause = integer expression

Parameters

integer expression An non-negative integer value expressing the duration in milliseconds.

Remarks

This attribute can be used to insert a fixed interval of time between the subject's response and the next trial. Feedback stimuli for correct or incorrect responses may be displayed during this interval.

See How to Control Trial Duration and Inter-Trial Intervals for more details on controlling timing of trials.

Examples

The following trial pauses for a half second after the subject responds:

<trial mytrial>
/ stimulusframes=[1=sometext)]
/ posttrialpause=500
</trial>


posttrialsignal attribute

The posttrialsignal attribute specifies that after running a trial, Inquisit should wait for a signal from an external device before moving on to the next trial.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ posttrialsignal = (modality, signal)

or

/ posttrialsignal = (mouse, stimulusname)

or

/ posttrialsignal = (mouse, mouseevent)

Parameters

modality One of the following values:
Value | Description
keyboard | The signal is defined as a key-press on the computer’s keyboard.
com<n> | The signal is defined a serial port signal, where n specifies the port number (e.g., COM1, COM2, COM3, ...).
xid<n> | The signal is defined as a XID protocol signal from a Cedrus Response Box on the serial port, where n specifies the port number (e.g., XID1, XID2, XID3, ...).
lpt<n> | The signal is defined as a parallel port signal, where n specifies the port number (e.g., LPT1, LPT2, LPT3, ...).
signal | An integer representing the numeric signal to wait for. If the modality is keyboard, this is the scancode of the key.
mouseevent | Any of the following mouse events.
stimulusname | The name of a visual stimulus element defined elsewhere in the script.

Remarks

This is useful for requiring a second confirmation response from subjects before proceeding to the next trial, or for synchronizing Inquisit with an external device such as an EEG.

Examples

The following trial waits for a signal value of 8 on the COM1 port before advancing to the next trial:

<trial mytrial>
/ stimulusframes = [1=sometext]
/ validresponse = (57)
/ posttrialsignal = (com1, 8)
</trial>


precondition attribute

The precondition command defines conditions under which the files in an include element should be included.

Member of

<include>

Syntax

/ precondition = [expression; expression; expression; ...]

Parameters

expression Specifies the expression to evaluate to determine whether the file(s) should be included.

Remarks

The precondition attribute can be used to conditionally load different include files based on factors such as the subject or group code or the region or language of the respondent's computer. If the expression(s) given in the precondition evaluate to true, the files are included. If the expression(s) evaluate to false, the files are not included.

The precondition attributre provides a convenient way to create multi-language tests that are administered in the language of the respondent. To create a multi-language test, the different translations of text stimuli should be defined in separate scripts, one for each language. For example, a task that supports English and Japanese would have a main script controlling the test logic, and two include scripts containing the English and Japanese versions of the instructions and text stimuli presented by the task. The main script would then conditionally include either the Japanese or English include script based on the language code of the respondent's computer (returned by the computer.languagecode property).

Examples

The following example includes japanese.iqx include file if the language of the computer is japanese, and an english include file otherwise.

<include>
/ precondition=[computer.languagecode == "jp"]
/ file="japanese.iqx"
</include>

        <include>
/ precondition=[computer.languagecode != "jp"]
/ file="english.iqx"
</include>


preinstructions attribute

The preinstructions attribute determines the sequence of instruction pages presented at the beginning of an experiment or block.

Member of

<block> <expt>

Syntax

/ preinstructions = (pagename, pagename, pagename, ...)

Parameters

pagename The name of a page or htmlpage element defined elsewhere in the script.

Remarks

Any sequence of <page> or <htmpage> elements may be specifed.

Examples

The following block presents 3 instruction pages before the block starts:

<block myblock>
/ trials=[1-10=noreplace(trial1, trial2)]
/ preinstructions=(page1, page2, page3)
</block>


pretrialpause attribute

The pretrialpause attribute specifies the number of milliseconds to pause prior to running a trial.

Member of

<defaults> <likert> <openended> <slidertrial> <trial>

Syntax

/ pretrialpause = integer expression

Parameters

integer expression An non-negative integer value expressing the duration in milliseconds.

Remarks

This attribute can be used to insert a fixed interval of time prior to running a trial.

See How to Control Trial Duration and Inter-Trial Intervals for more details on controlling timing of trials.

Examples

The following trial pauses for a half second after the subject responds:

<trial mytrial>
/ stimulusframes=[1=sometext)]
/ pretrialpause=500
</trial>


pretrialsignal attribute

The pretrialsignal attribute specifies that before running a trial, Inquisit should wait for a signal from an external device.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ pretrialsignal = (modality, signal)

or

/ pretrialsignal = (mouse, stimulusname)

or

/ pretrialsignal = (mouse, mouseevent)

Parameters

modality One of the following values:
Value | Description
keyboard | The signal is defined as a key-press on the computer’s keyboard.
mouse | The signal is defined as a mouse event on the computer’s mouse or touch screen.
com<n> | The signal is defined a serial port signal, where n specifies the port number (e.g., COM1, COM2, COM3, ...).
xid<n> | The signal is defined as a XID protocol signal from a Cedrus Response Box on the serial port, where n specifies the port number (e.g., XID1, XID2, XID3, ...).
lpt<n> | The signal is defined as a parallel port signal, where n specifies the port number (e.g., LPT1, LPT2, LPT3, ...).
signal | An integer representing the numeric signal to wait for. If the modality is keyboard, this is the scancode of the key.
mouseevent | Any of the following mouse events.
stimulusname | The name of a visual stimulus element defined elsewhere in the script.

Remarks

This is useful for requiring a confirmation response from subjects before starting a trial, or for synchronizing Inquisit with an external device such as an EEG.

Examples

The following trial waits for a parallel port signal of value 1 sent from an fMRI imaging system before starting the trial:

<trial target>
/ stimulusframes = [1=facepicture]
/ validresponse = (57)
/ pretrialsignal = (LPT1, 1)
</trial>

The following trial requires the subject to press the spacebar to start the trial:

<trial mytrial>
/ stimulusframes = [1=sometext]
/ validresponse = (57)
/ pretrialsignal = (keyboard, 57)
</trial>


prevkey attribute

The prevkey attribute specifies which keyboard response navigates back to the previous instruction page.

Member of

<instruct>

Syntax

/ prevkey = ("character")

or

/ prevkey = (scancode)

or

/ prevkey = (signal)

Parameters

character | A character indicating a correct keyboard response.
scancode | An integer specifying the scancode of a correct keyboard response. See the scancodes table for corresponding key value assignments.
signal | An integer representing the response code of a serial or parallel port device such as a response box.

Remarks

To disable the previous key so that participants can only navigate forward through the instructions, set this attribute to noresponse. The default value is the space bar the backspace key.

Examples

The following sets the previous key to the "m" key:

<instruct>
/ prevkey = ("m")
</instruct>

The following disables the previous key by setting the value to noresponse:

<instruct>
/ prevkey = (noresponse)
</instruct>


prevlabel attribute

The prevlabel attribute determines the text appearing on the previous button if the current instruction page is not the first in its sequence.

Member of

<instruct>

Syntax

/ prevlabel = "label"

Parameters

label A string in quotes serving as text for the button.

Remarks

The default value is "Previous".

Examples

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


product attribute

The product attribute specifies which type of Cedrus device the element is controlling.

Member of

<xid>

Syntax

/ product = product

Parameters

product One of the following values:
Value | Description
lumina | Lumina fRMI Response Pad.
voicekey | SV-1 Voice Key.
responsepad | RB Series Response Pad.
stimtracker | StimTracker universal ERP interface.
lumina | Lumina Response Pad.
cpod | c-pod Event Marker Generator.
mpod | m-pod Event Marker Generator.

Remarks

The default value is random.

Examples

The following creates an xid element for a response pad so that its properties can be retrieved in script, and sets the default input device to XID:

          <xid rb>
/ product = responsepad
</xid>

          <defaults>
/ inputdevice = XID
</defaults>


pulseduration attribute

Sets the pulse duration on a Cedrus StimTracker device.

Member of

<xid>

Syntax

/ pulseduration = positive integer or -1 to indicate a persistent signal

Parameters

integer A integer value expressing the duration of the pulse in milliseconds.

Remarks

This attribute allows you to set the duration of TTL pulses that are relayed from StimTracker to external devices such as EEG and fMRI controllers. If the pulse duration is not set, StimTracker will simply set the TTL port to the specified value and leave it in that state until a different value is set. The values are defined in the attribute.

See How to Control Trial Duration and Inter-Trial Intervals for more details on controlling timing of trials.

Examples

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


questions attribute

The questions attribute specifies the sequence of questions in a survey page.

Member of

<surveypage>

Syntax

/ questions = [questionnumber, questionnumber = questionname; questionnumber-questionnumber = selectmode(questionname, questionname,...); questionnumber, questionnumber-questionnumber = questionname]

Parameters

questionnumber | A non-negative integer specifying the question number.
questionname | The name of a question defined elsewhere in the script to be run in this survey page.
selectmode One of the following values:
Value | Description
noreplace | Randomly selects without replacement which question in the group to run.
noreplacenorepeat | Randomly selects which question in the group to present without replacement and without selecting any single question consecutively.
replace | Randomly selects with replacement which question in the group to run.
replacenorepeat | Randomly selects which question in the group to present with replacement and without selecting any single question consecutively.
sequence | Runs each question in the group.

Remarks

The integers to the left of the equal signs represent ordinal positions within the sequence of questions. questions can be directly assigned to a position in the sequence using the equals sign. A page can be simultaneously assigned to multiple positions by separating the position numbers with commas (equivalent to "and") or dashes (equivalent to "through"). All page numbers in the survey page must be assigned to a page.

Examples

The following survey page consists of 3 survey questions presented in fixed order:

<surveypage>
/ questions=[1=question1; 2=question2; 3=question3]
</surveypage>

The following survey page presents 4 questions in random order.

<surveypage>
/ questions=[1-4=noreplace(question1, question2, question3)]
</surveypage>


quit attribute

The quit attribute specifies the conditions under which the script should terminate.

Member of

<block> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Syntax

/ quit = [expression; expression; expression; ...]

Parameters

expression An expression that returns boolean true or false. See help with expression syntax for more information.

Remarks

At the end of a expt, the expression specified by the quit parameter is evaluated, and if returns a true or non-zero value, the script terminates.

Examples

The following script quits when performance rises above a threshold:

<block myblock>
/ trials=[1-100=test]
/ quit=[values.points > values.maxpoints]
</block>


quitcommand attribute

The quitcommand attribute specifies a key combination that terminates the experiment.

Member of

<defaults>

Syntax

/ quitcommand = (command key + scancode)

Parameters

commandkey One of the following values:
Value | Description
Alt<n> | The right or left Alt key.
Ctrl<n> | The right or left Ctrl key.
Shift<n> | The right or left Shift key.
Win<n> | The right or left Windows key.
scancode | An integer indicating the scan code of the key.
character | The single or double quoted character of the key.

Remarks

The quitcommand allows the researcher to define a custom combination of keys that enable the participant to opt out of an experiment. The quitcommand can consist of a single or multiple keys. If multiple keys are specified, the participant must press all of the keys simultaneously. The participant may press the keys any time during the experiment, at which point the experiment ends.

The quitcommand is similar to Inquisit's built in Ctrl+Q command, with one major difference. When the Ctrl+Q command is issued, Inquisit Web will terminate the experiment and forward the participant to the finish page url. In contrast, if the quitcommand is issued, the participant is NOT forwarded the finish page. This is useful in cases where navigating to the finish page is used to distinguish participants who chose to complete the study from those who did not.

The quitcommand keys must be specified in terms of scancodes.

Examples

The following defines the quitcommand as the key combination Ctrl+Alt+30 (the scancode for the A key is 30):

<defaults>
/ quitcommand = (Ctrl+Alt+30)
</defaults>

The following defines the quitcommand as the key combination Win+T:

<defaults>
/ quitcommand = (Win+'T')
</defaults>


range attribute

The range attribute defines the minimum and maximum allowed responses.

Member of

<checkboxes> <openended> <slider> <slidertrial> <textbox>

Syntax

/ range = (minimum, maximum)

Parameters

minimum | The minimum permissible response value.
maximum | The maximum permissible response value.

Remarks

The range attribute provides a simple way to constrain the range of numeric responses to be between the specified minimum and maximum values. To place more complex constraints on a survey response, see the mask attribute.

Examples

The following constrains the range of valid responses to be 18 to 120.

<textbox age>
/ caption="Please enter your age"
/ range=(18, 120)
</textbox>


recorddata attribute

The recorddata attribute specifies whether data should be recorded for the given trial or block.

Member of

<block> <survey> <trial>

Syntax

/ recorddata = boolean

Parameters

boolean A boolean value of true or false.

Remarks

This parameter can be used to filter unwanted lines of data that will not be analyzed. For example, if a script includes trials intended to provide practice, performance feedback, or instructions, this parameter can be set to 'false' to prevent lines of data from these trials from being recorded. This results in cleaner, more compact data files. By default, data is recorded for all trials in an experiment.

Examples

The following trial does not record any data:

<trial instructions>
/ stimulusframes = [1=instructiontext]
/ validresponse = (anyresponse)
/ recorddata = false
</trial>


replace attribute

The replace attribute determines whether items in the list are replaced into the selection pool after being randomly selected.

Member of

<list>

Syntax

/ replace = boolean

Parameters

boolean A boolean value set to true or false.

Remarks

The replace attribute can be specified only if selectionmode is set to 'uniform' or 'normal', otherwise it will produce an error. If false, items are randomly selected without replacement into the pool. Once all items have been selected, the pool is reset and all items are returned to the pool. If set to true, items are randomly selected with replacement into the pool. By default, it is false.

Examples

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


required attribute

The required attribute specifies whether a response is required for a given survey item.

Member of

<checkboxes> <dropdown> <listbox> <openended> <radiobuttons> <slidertrial> <textbox>

Syntax

/ required = boolean

Parameters

boolean A boolean value of true or false.

Remarks

Examples

The following radiobutton survey item requires the respondent to select one of the options:

<radiobuttons q1>
/ options=("true", "false")
/ caption="I sometimes think I would like to be a forest ranger."
/ required = true
</radiobuttons>


requiredpermissions attribute

The requiredpermissions attribute specifies the permissions required by an experiment.

Member of

<batch> <defaults>

Syntax

/ requiredpermissions = (permission, permission, ...)

Parameters

permission One of the following values:
Value | Description
screencapture | Screen Capture.
soundcapture | Sound Capture.
photocapture | Photo Capture.
setmouseposition | Set Mouse Position.
speech | Speech Recognition / SoundCapture.

Remarks

Examples

The following indicates that the experiment will require the ability to perform photocapture and soundcapture:

<defaults>
/ requiredpermissions = (photocapture, soundcapture)
/ minimumversion = "6.4.0.0"
</defaults>


resetinterval attribute

The resetinterval attribute determines how many blocks should be run before a counter's randomly selection pool should be reset.

Member of

<counter> <list> <picture> <port> <sound> <text> <video> <xid>

Syntax

/ resetinterval = integer

Parameters

integer A positive integer specifying the number of blocks, or 0 to reset only after all items have been selected.

Remarks

Resetting the counter causes all items that have been selected to be returned to the selection pool. For selection with replacement, resetting the counter has no effect. This attribute is useful in cases where an experiment performs random selection without replacement over more than one block.

The default behavior for counter elements is to reset after each block (equivalent to a setting value of 1). The default behavior for list elements is to reset only after all items have been selected (equivalent to a setting value of 0).

Examples

The following causes the counters to reset only when all items have been selected:

<counter example>
/ items = (1, 2, 3, 4, 5)>/ resetinterval = 0
</counter>


resetrate attribute

The resetrate attribute determines the frequency with which a clock in stopwatch or timer mode is reset.

Member of

<clock>

Syntax

/ resetrate = rate

Parameters

rate One of the following values:
Value | Description
trial | Resets the clock after each trial.
block | Resets the clock after each block.
experiment | Resets the clock after each experiment.

Remarks

This attribute determines whether a clock in stopwatch or timer mode is reset after each trial, block, or experiment. It has no effect for the visible part of the clock while in clock mode, although it will affect the value of the elapsedtime property.

The attribute would be set to 'block' for a timer used to indicate the amount of time left to perform a block of trials. For a stopwatch intended to display the amount of time spent on a trial, the attribute would be set to 'trial'.

The default setting is 'trial', which resets the clock at the end of each trial.

Examples

The following timer is reset at the end of the block:

<clock>
/ mode = timer
/ resetrate = block
/ format = "mm:ss"
</clock>


response attribute

The response attribute specifies the procedure for obtaining responses from the subjects.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Syntax

/ response = responsename

or

/ response = timeout(milliseconds)

or

/ response = window(center, width, stimulusname)

or

/ response = responsemode

Parameters

responsename | The name of a response element defined elsewhere in the script.
milliseconds | A property or positive integer specifying the duration in milliseconds.
center | A positive integer specifying the center of the response window.
width | A positive integer specifying the width of the response window.
stimulusname | The name of a stimulus element defined elsewhere in the script.
responsemode One of the following values:
Value | Description
free | Any valid response may be given at any time.
correct | A correct response may be given at any time. If a valid but incorrect response is given, the response is treated as an error. The correct response is recorded in the data file. The recorded latency is that of the correct response.
noresponse | The trial does not wait for a response.
anyresponse | Any response can be given at any time. All possible responses supported by the input device are considered valid.

Remarks

None.

Examples

The following trial sets the timeout to a parameter value:

<trial mytrial>
/ stimulusframes = [1=sometext]
/ response = timeout(parameters.timeout)
/ validresponse = (" ", noresponse)
</trial>

The following trial requires the subject to respond correctly (with the "a" key) in 1500 ms before moving on to the next trial:

<trial mytrial>
/ stimulusframes = [1=sometext]
/ response = timeout(1500)
/ validresponse = ("a", "b")
/ correctresponse = ("a")
</trial>


responsefontstyle attribute

The responsefontstyle attribute specifies the font in which responses are presented.

Member of

<checkboxes> <dropdown> <likert> <listbox> <openended> <radiobuttons> <slider> <slidertrial> <survey> <surveypage> <textbox>

Syntax

/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)

Parameters

face name | A string in quotes indicating the name of the font.
height variable | (Optional) An integer that specifies the height of the font in points (default), pixels, or percent.
bold | (Optional) A value of true or false indicating whether the font should be bold.
italic | (Optional) A value of true or false indicating whether the font should be italic.
underline | (Optional) A value of true or false indicating whether the font should underlined.
strikeout | (Optional) A value of true or false indicating whether the font should appear with a strikeout line.
quality | (Optional) An integer ranging from 1 to 5 indicating the font quality. 5 is the best quality (ClearType).
character set (Optional) An integer indicating the character set code. The character set can be any of the following:
Value | Description
0 | ANSI
186 | Baltic
1 | Default (uses the current system locale on the local computer)
136 | Chinese Big5 (Taiwan, Hong Kong, Macau)
238 | Eastern European
134 | GB2312 (Simplified Chinese)
161 | Greek
129 | Hangul (Korean)
77 | Mac
255 | OEM (operating system dependent)
204 | Russian
128 | ShiftJIS (Japanese)
2 | Symbol
162 | Turkish
163 | Vietnamese
130 | Johab (Korean)
178 | Arabic.
177 | Hebrew
222 | Thai

Remarks

The font can be set for the entire survey, or for a particular page, with the page setting overriding the survey settings. Individual items may have additional font settings that will override this font style.

The font can be set for an openended free recall response.

Inquisit provides an easy to use font picker dialog to set this attribute. To use the font picker, 1) move the cursor to where you want to insert the the font attribute, 2) open the Insert menu, and 3) select "Font...". Once you have selected the desired font settings in the Font Wizard dialog, select OK and the font attribute and appropriate settings will automatically be inserted in your script at the cursor location.

Examples

The following sets the default font for the edit control of a textbox survey item to text in 2 inch Courier New font:

<textbox q1>
/ responsefontstyle = ("Courier New", 2in, false, false, false)
/ caption = ("Enter the first three words that pop into your head.")
</textbox>

The following sets the font for the options of a checkbox survey item to an 8 point Courier New font:

<checkboxes q1>
/ responsefontstyle = ("Courier New", 8pt, false, false, true)
/ caption = ("Check all that apply.")
/ options=("I am a US citizen.", "I have never been convicted of a felony")
</checkboxes>

The following sets the default survey response font to 14pt Arial bold:

<survey somesurvey>
/ responsefontstyle = ("Arial", 14pt, true)
/ pages = (1=p1; 2=p2; 3=p3)
</survey>

The following sets the default survey response font to Arial bold and sets the height to 5% of the screen height:

<survey somesurvey>
/ responsefontstyle = ("Arial", 10%, true)
/ pages = (1=p1; 2=p2; 3=p3)
</survey>

The following sets the default response font for a particular survey page to italic Tahoma font, 25 pixels high:

<surveypage page1>
/ responsefontstyle = ("Tahoma", 25px, false, true)
/ questions = (1=q1; 2=q2; 3=q3)
</surveypage>

The following sets the default font for the edit control of an openended trial to text in 12 point Courier New font:

<openended q1>
/ responsefontstyle = ("Courier New", 12pt, false, false, false)
/ stimulusframes = [1=somecaption]
</openended>


responseinterrupt attribute

The responseinterrupt attribute determines whether stimulus presentation on the trial is interrupted when the subject responds.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ responseinterrupt = mode

Parameters

mode One of the following values:
Value | Description
immediate | Any remaining stimulus presentation frames are aborted when the subject responds, and the stimuli are immediately erased.
frames | Any remaining frames in the trial are presented before the stimuli are erased.
trial | Any remaining frames in the trial are presented before the stimuli are erased. Any media stimuli (sound or video) are played to completion before Inquisit advances to the next trial.

Remarks

If beginresponseframe is not set to a value to that allows a response during the stimulus presentation sequence, then immediate and frames are functionally equivalent. The default setting is immediate.

Examples

The following trial presents a video to completion before advancing to the next trial. The subject can respond at any point during the video:

<trial mytrial>
/ stimulusframes = [1=somevideo]
/ responseinterrupt = trial
/ validresponse = (" ")
</trial>


responsemessage attribute

The responsemessage attribute specifies a feedback stimulus to be shown after the subject gives the specified response on a trial.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ responsemessage = (responsevalue, stimulusname, duration)

Parameters

responsevalue | A valid response value for the trial. See validresponse for possible response values.
stimulusname | The name of a stimulus element defined elsewhere in the script.
duration | An integer or property specifying duration in milliseconds for which the stimulus is displayed on the screen. A value of "0" indicates that stimulus should be displayed for the remaining duration of the trial.

Remarks

The stimulus is shown for duration milliseconds. If the duration is 0, the stimulus is presented for the duration of the posttrialpause. This attribute can be listed multiple times in a given trial to specify different feedback stimuli for different responses.

Examples

The following trial displays a positive stimulus for 1000 ms if the response is "a" and a negative stimulus for 1000 ms if the response is "b":

<trial mytrial>
/ stimulusframes = [1=sometext]
/ validresponse = ("a", "b")
/ responsemessgae = ("a", positivetext, 0)
/ responsemessgae = ("b", negativetext, 0)
/ posttrialpause = 1000
</trial>

The following trial displays a positive stimulus for 1000 ms if the response is values.responseleft and a negative stimulus for 1000 ms if the response is values.responseright:

<trial mytrial>
/ stimulusframes = [1=sometext]
/ validresponse = (values.responseleft, values.responseright)
/ responsemessgae = (values.responseleft, positivetext, 0)
/ responsemessgae = (values.responseright, negativetext, 0)
/ posttrialpause = 1000
</trial>


responsetrial attribute

The responsetrial attribute specifies a trial to be run next if the subject gives a particular response on the current trial.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ responsetrial = (response, trialname)

Parameters

responsevalue | A valid response value for the trial. See validresponse for possible response values.
trialname | The name of a trial element defined elsewhere in the script that should be run if the specified response is given.

Remarks

This command enables conditional branching of experimental procedure based on the subject's response. A trial may contain multiple responsetrial attributes that list different trials to be run for possible responses. Inquisit evaluates each responsetrial attribute in the order specified, and the first one to match the response wins.

Examples

The following trial runs happytrial if the response is "a" and sadtrial if the response is "b":

<trial mytrial>
/ stimulusframes = [1=sometext]
/ validresponse = ("a", "b")
/ responsetrial = ("a", happytrial)
/ responsetrial = ("b", sadtrial)
</trial>


rotation attribute

The rotation attribute specifies an angle of rotation with which the stimulus should be presented.

Member of

<button> <picture> <shape> <text>

Syntax

/ rotation = degrees

Parameters

degrees A negative or positive number indication the degrees of rotation.

Remarks

This attribute allows visual stimuli to be rotated at an arbitrary angle (in degrees) on the screen. The default (no rotation) is 0 degrees. Positive angles rotate clockwise, and negative angles rotate counter clockwise.

Examples

The following text is rotated 180 degrees (upside down) when presented:

<text option1>
/ items=("1.jpg", "2.jpg", "3.jpg")
/ rotate=180
</text>


rwcenter attribute

The rwcenter attribute defines the time interval (in milliseconds) between the presentation of the last stimlus and the center of the response window.

Member of

<response>

Syntax

/ rwcenter = integer

Parameters

integer An non-negative integer value expressing the window center of milliseconds.

Remarks

The window center may be adjusted forward or backward depending on whether performance at the response window critieria meet conditions specified by rwinccondition or rwdeccondition. See Adjusting the Response Window for details.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwdeccondition attribute

The rwdeccondition attribute specifies a list of performance conditions that cause the response window to be decremented on the next block.

Member of

<response>

Syntax

/ rwdeccondition = [(percentcorrect, latency), (percentcorrect, latency), ...]

Parameters

percentcorrect | A positive integer expressing the percent correct.
latency | An positive or negative integer expressing the latency threshold in milliseconds relative to the window center.

Remarks

This attribute defines pairs of latency and accuracy thresholds. If any of these performance thresholds are met, the onset of response window is adjusted to occur earlier during the next block. Performance is evaluated against the thresholds at the end of the block. The threshold is met if the subject’s percent correct is greater than or equal to the specified percent correct and their mean latency is less than or equal to the sum of the specified latency and the window center. If multiple conditions are specified, the response window is decremented if any single condition is true. See Adjusting the Response Window for details.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwdecunit attribute

The rwdecunit attribute specifies the number of milliseconds to decrement the response window center if the accuracy and speed of the subject's performance meet conditions for shortening the response window.

Member of

<response>

Syntax

/ rwdecunit = integer

Parameters

integer A non-negative integer indicating the number of milliseconds to decrement the window.

Remarks

The default is 33 milliseconds. See Adjusting the Response Window for details.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwhitduration attribute

The rwhitduration attribute specifies the duration of the hit stimulus when the subject responds within the response window.

Member of

<response>

Syntax

/ rwhitduration = integer

Parameters

integer A non-negative integer indicating the duration in milliseconds for which the hit stimulus is presented. A value of 0 indicates the hit stimulus should be presented for the duration of the posttrialpause.

Remarks

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwhitstimulus attribute

The rwhitstimulus attribute specifies which stimulus is displayed if a subject responds during the response window.

Member of

<response>

Syntax

/ rwhitstimulus = stimulusname

Parameters

stimulusname The name of a stimulus defined elsewhere in the script that should be presented if the response occurs within the window.

Remarks

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwinccondition attribute

The rwinccondition attribute specifies a list of performance conditions that cause the response window to be decremented on the next block.

Member of

<response>

Syntax

/ rwinccondition = [(percentcorrect, latency), (percentcorrect, latency), ...]

Parameters

percentcorrect | A positive integer expressing the percent correct.
latency | An positive or negative integer expressing the latency threshold in milliseconds relative to the window center.

Remarks

This attribute defines pairs of latency and accuracy thresholds. If any of these performance thresholds are met, the onset of response window is adjusted to occur later during the next block. Performance is evaluated against the thresholds at the end of the block. The threshold is met if the subject’s percent correct is less than or equal to the specified percent correct and their mean latency is greater than or equal to the sum of the specified latency and the window center. If multiple conditions are specified, the response window is decremented if any single condition is true. See Adjusting the Response Window for details.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwinccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwincunit attribute

The rwincunit attribute specifies the number of milliseconds to increment the response window center if the accuracy and speed of the subject's performance meet conditions for lengthening the response window.

Member of

<response>

Syntax

/ rwincunit = integer

Parameters

integer A non-negative integer indicating the number of milliseconds to increment the window.

Remarks

The default is 33 milliseconds. See Adjusting the Response Window for details.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwlatencymetric attribute

The rwlatencymetric attribute specifies whether to adjust the response window based on the subject's minimum, maximum, mean or median response latency.

Member of

<response>

Syntax

/ rwlatencymetric = latencymetric

Parameters

latencymetric One of the following metrics:

Value | Description
mean | The average response latency for the block.
median | The median response latency for the block.
min | The minimum response latency for the block.
max | The maximum response latency for the block.

Remarks

The default setting is mean. See Adjusting the Response Window for details.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwmaxcenter attribute

The rwmaxcenter attribute specifies the absolute upper bound of the response window center.

Member of

<response>

Syntax

/ rwmaxcenter = integer

Parameters

integer A non-negative integer indicating maximum window center in milliseconds.

Remarks

The window center can not be incremented beyond this point. See Adjusting the Response Window for details.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwmincenter attribute

The rwmincenter attribute specifies the absolute lower bound of the response window center.

Member of

<response>

Syntax

/ rwmincenter = integer

Parameters

integer A non-negative integer indicating minimum window center in milliseconds.

Remarks

The window center can not be decremented beyond this point. See Adjusting the Response Window for details.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwmissstimulus attribute

The rwhitstimulus attribute specifies what stimulus if any should be presented if the subject responds outside the response windowthat at the end of the response window.

Member of

<response>

Syntax

/ rwmissstimulus = stimulusname

Parameters

stimulusname The name of a stimulus defined elsewhere in the script that should be presented if the response occurs within the window.

Remarks

By default, the beginning and end of the response window is indicated by the appearance and then disappearance of the window stimulus from the screen. This attribute specifies that at the end of the response window, a stimulus should be presented (the window stimulus is also erased). This stimulus remains on the screen until the subject responds or the trial times out.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwstimulus attribute

The rwstimulus attribute specifies the stimulus to display during the response window interval.

Member of

<response>

Syntax

/ rwstimulus = stimulusname

Parameters

stimulusname The name of a stimulus defined elsewhere in the script that should be presented if the response occurs within the window.

Remarks

The response window stimulus can be any stimulus type, including text, picture, sound, video, port, or shape.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


rwwidth attribute

The rwwidth parameter sets the duration of the response window in milliseconds.

Member of

<response>

Syntax

/ rwwidth = integer

Parameters

integer A non-negative integer specifying the window width in milliseconds.

Remarks

See Adjusting the Response Window for details.

Examples

The following response defines a response window with an initial center of 500 ms and width of 150 ms. A black exclamation point appears on the screen during the window. If the response is in the window, it turns green and remains on the screen for 300 ms. Otherwise it turns red. The window is incremented by 75 ms if the mean latency for the block is greater than the current center + 50 ms and the percent correct is less than 60%. The window is decremented if the mean latency for the block is 50 ms earlier than the window center and the percent correct is greater than or equal to 80%. The maximum window center 1000 ms and the minimum is 200 ms:

<response windowprocedure>
/ mode = window
/ rwcenter = 500
/ rwwidth = 150
/ rwinccondition = [(60, 50)]
/ rwdeccondition = [(80, -50)]
/ rwincunit = 75
/ rwdecunit = 75
/ rwmincenter = 200
/ rwmaxcenter = 1000
/ rwlatencymetric = mean
/ rwstimulus = blackexclamationpoint
/ rwhitstimulus = greenexclamationpoint
/ rwmissstimulus = redexclamationpoint
/ rwhitduration = 300
</response>


saccadethreshold attribute

The saccadethreshold attribute specifies the saccade angular velocity threshold in degrees per second used in determining when a fixation is completed.

Member of

<eyetracker> <eyetracker> <eyetracker>

Syntax

/ saccadethreshold = saccadethreshold

Parameters

saccadethreshold The saccade velocity threshold to use in the real-time calculation of fixation points.

Remarks

If the eye moves faster than the threshold it indicates a potential saccade and the end of the current fixation. The default value is 30's.

Examples

The following sets the saccade velocity threshold to 35 degrees per second with a Tobii eye tracker:

<eyetracker>
/ plugin = "tobii"
/ saccadethreshold = 35
</eyetracker>

The following sets the saccade velocity threshold to 35 degrees per second with an EyeLink eye tracker:

<eyetracker>
/ plugin = "srresearch"
/ saccadethreshold = 35
</eyetracker>


scale attribute

The scale attribute specifies a scaling factor applied to the size of the stimulus.

Member of

<clock> <picture> <shape> <text> <video>

Syntax

/ scale = factor

Parameters

factor A positive number representing a scaling factor to multiply the stimulus size by.

Remarks

This attribute allows visual stimuli to be scaled by an arbitrary multiple of their size on the screen. The default (no scale) is 1.0. Values smaller than 1.0 reduce the size of the stimulus while values larger than 1.0 increase the size.

Examples

The following text is scaled 1.5 times when presented:

<text option1>
/ items=("1.jpg", "2.jpg", "3.jpg")
/ scale=1.5
</text>


screencapture attribute

The screencapture attribute takes a snapshot of the screen as it appears on the final stimulus frame of a trial and saves the image to a bitmap file.

Member of

<block> <expt> <trial>

Syntax

/ screencapture = boolean

Parameters

boolean A boolean value of true or false.

Remarks

It is sometimes useful to have a visual record of the display for a particular trial or set of trials. For example, when conducting research with eye trackers,you may wish to view gaze plots or heat maps over the associated images that were presented in order to see exactly what the participant was looking at. The screencapture command, when set to true, causes Inquisit to save a copy of the screen as it appeared during the last stimulus presentation frame on the given trial. Screen captures are saved as bitmaps in a subfolder called "screencaptures" (located under the folder containing the script).

Examples

The following trial captures the screen with three stimuli (target1, target2, target3) to a bitmap:

<trial q1>
/ stimulustimes = [1=target1, target2, target3]
/ screencapture = true
/ validresponse = (noresponse, lbuttondown)
/ timeout = 1000
/ inputdevice = mousekey
</trial>


screencolor attribute

The screencolor attribute sets the background color of the screen for the entire block.

Member of

<block> <defaults> <eyetracker> <survey>

Syntax

/ screencolor = (red value, green value, blue value)

or

/ screencolor = color name

or

/ screencolor = color value

Parameters

red value | An integer from 0 to 255 specifying the intensity of the red component.
green value | An integer from 0 to 255 specifying the intensity of the green component.
blue value | An integer from 0 to 255 specifying the intensity of the blue component.
color name | The name of a built in color.
color value | A 32-bit argb value specified as in integer or a CSS hex value (e.g., #0000FF or #00F for blue).

Remarks

The default screencolor is white (255, 255, 255).

Examples

The following sets the background screen color to blue:

<block myblock>
/ trials = [1-10=sometrial]
/ screencolor = (0, 0, 255)
</block>


select attribute

The select attribute determines the method by which individual items are selected for presentation on a given trial.

Member of

<counter> <picture> <port> <sound> <text> <video> <xid>

Syntax

/ select = integer

or

/ select = selectionmode

or

/ select = selectionmode(pool)

or

/ select = dependency(stimulusname)

or

/ select = dependency(listname)

or

/ select = listname

Parameters

integer | An integer value.
selectionmode One of the following values:
Value | Description
noreplace | Randomly selects without replacement.
sequence | Selects items in sequential order.
noreplacenorepeat | Randomly selects without replacement and without selecting any single item multiple consecutive times.
noreplacecorrect | Randomly selects without replacement unless an incorrect response is given.
noreplaceerror | Randomly selects without replacement unless a correct response is given.
replace | Randomly selects with replacement.
replacenorepeat | Randomly selects with replacement and without selecting any single item multiple consecutive times.
constant | Selects a single constant value.
dependency One of the following values:
Value | Description
noreplacenot | Randomly selects without replacement, reselecting the item if it matches the currently selected item of the specified stimulus or list.
replacenot | Randomly selects with replacement, reselecting the item if it matches the currently selected item of the specified stimulus or list.
current | Selects the current item of the specified stimulus or list.
next | Selects the next item of the specified stimulus or list.
stimulusname | The name of a stimulus defined elsewhere in the script.
listname | The name of a list defined elsewhere in the script.
pool | A set of numbers representing the selection pool.

Remarks

The default value is noreplace.

Examples

On each trial, the following stimulus selects the vice president who served with the corresponding president:

<text vicepresidents>
/ items = vicepresidentitems
/ select = current(presidents)
</text>

The following first selects Jefferson, then Adams, and then Washington:

<text presidents>
/ items = ("George Washington", "John Adams", "Thomas Jefferson")
/ select = sequence(3, 2, 1)
</text>

The following randomly selects mountain pictures and ensures that the selected item isn't the same as the currently selected valley item:

<picture moutains>
/ items = ("rainier.bmp", "baker.jpg", "sainthelens.gif")
/ select = noreplacenot(valleys)
</picture>

The following randomly selects sound files without replacement, except if an incorrect response is give on the trial:

<sound rock>
/ items = ("beatles.wav", "stones.wav", "thewho.wav")
/ select = noreplacecorrect
</sound>


selectionmode attribute

The selectionmode attribute determines the method by which individual items are selected for presentation on a given trial. The default is random selection of items without replacement with uniform probability.

Member of

<batch> <list>

Syntax

/ selectionmode = selectionmode

or

/ selectionmode = expression

Parameters

selectionmode One of the following values:
Value | Description
random | Randomly selects items.
sequence | Selects items in sequential order.
expression An valid expression that evaluates to an integer.

Remarks

The default value is random.

Examples

The following first selects Washington, then Adams, and then Jefferson:

<list presidents>
/ items = ("George Washington", "John Adams", "Thomas Jefferson")
/ selectionmode = sequence
</list>


selectionrate attribute

The selectionrate attribute determines how frequently a new item should be selected from the pool.

Member of

<counter> <list>

Syntax

/ selectionrate = rate

Parameters

rate One of the following values:
Value | Description
always | Select a new item everytime.
trial | Select a new item once per trial.
block | Select a new item once per block.
experiment | Select a new item once per experiment.

Remarks

Consider an example where multiple stimuli share a given counter. This attribute can be used to determine whether the same item is selected for each stimulus on a given trial or block, or whether a new item is selected for each stimulus.

The default setting is 'trial', which selects a single new item on each trial.

Examples

The following counter randomly selects a new item for each stimulus that references it:

<counter>
/ selectionrate = always
/ items = (1, 2, 3, 4, 5)
</counter>


separatefiles attribute

The separatefiles attribute specifies whether a data from each participant should be saved in a separate file.

Member of

<data> <survey>

Syntax

/ separatefiles = boolean

Parameters

boolean A value of true or false.

Remarks

By default, when data are saved to the local computer, the data from each participant are saved to single file. This attribute allows you to override this default and save each participant's data to a separate unique data file.

When data are saved to a network location (web site, file share, or email), each participant's data are always saved in a separate file regardless of this setting.

Examples

The following saves the data from each participant to a separate file:

<data>
/ separatefiles = true
</data>


sessions attribute

The sessions attribute enables running subsets of tests and procedures based on the session id paramater.

Member of

<batch> <expt>

Syntax

/ sessions = (integer, integer, integer, ... of modulus)

Parameters

integer | A positive integer indicating which session numbers should run the experiment.
modulus | A positive integer indicating the modulus.

Remarks

The sessions attribute allows you to run different batch or expt depending on the session number provided when the script is run. A given expt or batch will be run if the the following is true:

integer = remainder( session number / modulus )

Multiple expts and batches can be defined in the script, allowing different session numbers to be assigned to different experimental conditions. A single session number can be assigned to multiple expts, in which case all of the assigned expts will be run for that session number in the order they appear in the script.

Examples

The following expt is run for odd numbered sessions:

<expt>
/ blocks=[1-20=noreplace(testtrials, distractortrials)]
/ sessions = (1 of 2)
</expt>

The following expt is run for even numbered sessions:

<expt>
/ blocks=[1-20=noreplace(testtrials, distractortrials)]
/ sessions = (2 of 2)
</expt>

The following batch is run for session number 3 and every subsequent 3rd session number (e.g., 3, 6, 9, 12, ...):

<batch>
/ file="experiment3.iqx"
/ sessions = (1 of 4)
</batch>

The following expt is run for second of every four sessions (e.g., 2, 6, 10, 14, ...):

<expt>
/ blocks=[1-20=noreplace(testtrials, distractortrials)]
/ sessions = (1 of 4)
</expt>


shape attribute

The shape attribute sets the shape rectangle, circle, triangle.

Member of

<shape>

Syntax

/ shape = shapename

Parameters

shapename One of the following:
Value | Description
rectangle | A rectangular shape.
circle | A circular shape.
triangle | A triangular shape.

Remarks

The default shape is rectangle.

Examples

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


showbackbutton attribute

The showbackbutton attribute specifies the back button should appear on a survey page.

Member of

<survey> <surveypage>

Syntax

/ showbackbutton = boolean

Parameters

boolean A boolean value of true or false.

Remarks

The default is true.

Examples

The following survey allows forward navigation only:

<survey mysurvey>
/ pages=[1=page1; 2=page2]
/ showbackbutton = false
/ showbackbutton = false
</survey>


showborders attribute

The showborders attribute specifies whether a visible border should appear around a stimulus.

Member of

<html>

Syntax

/ showborders = boolean

Parameters

boolean A boolean value of true or false.

Remarks

The default is true.

Examples

The following html page is presented on the screen with no surrounding border and no scroll bars:

<html instructions>
/ items=("instruct1.htm", "instruct2.htm", "instruct3.htm")
/ showborders = false
/ showscrollbars = false
</html>


showmousecursor attribute

The showmousecursor attribute specifies whether the mouse cursor should be visible on the screen during the experiment, block, or trial.

Member of

<block> <expt> <trial>

Syntax

/ showmousecursor = boolean

Parameters

boolean A boolean value of true or false.

Remarks

Examples

The following trial hides the mouse cursor:

<trial q1>
/ stimulustimes = [1=target]
/ showmousecursor = false
/ validresponse = (noresponse, lbuttondown)
/ timeout = 1000
/ inputdevice = mousekey
</trial>


shownextbutton attribute

The shownextbutton attribute specifies the next button should appear on a survey page.

Member of

<survey> <surveypage>

Syntax

/ shownextbutton = boolean

Parameters

boolean A boolean value of true or false.

Remarks

The default is true.

Examples

The following survey allows forward navigation only:

<survey mysurvey>
/ pages=[1=page1; 2=page2]
/ shownextbutton = false
/ shownextbutton = false
</survey>


showpagenumbers attribute

The showpagenumbers attribute specifies whether page numbers should be displayed on survey pages.

Member of

<survey> <surveypage>

Syntax

/ showpagenumbers = boolean

Parameters

boolean A boolean value of true or false.

Remarks

Examples

The following survey does not display page numbers:

<survey mysurvey>
/ pages=[1=page1; 2=page2]
/ showpagenumbers = false
/ showbackbutton = false
</survey>


showquestionnumbers attribute

The showquestionnumbers attribute specifies whether survey questions should be numbered.

Member of

<survey> <surveypage>

Syntax

/ showquestionnumbers = boolean

Parameters

boolean A boolean value of true or false.

Remarks

Examples

The following survey does not display question numbers:

<survey mysurvey>
/ pages=[1=page1; 2=page2]
/ showquestionnumbers = false
/ showbackbutton = false
</survey>


showscrollbars attribute

The showscrollbars attribute specifies whether to show horizontal and vertical scrollbars for an HTML page.

Member of

<html>

Syntax

/ showscrollbars = boolean

Parameters

boolean A boolean value of true or false.

Remarks

The default is true.

Examples

The following html page is presented on the screen with no surrounding border and no scroll bars:

<html instructions>
/ items=("instruct1.htm", "instruct2.htm", "instruct3.htm")
/ showborders = false
/ showscrollbars = false
</html>


showticks attribute

The showticks attribute specifies whether tick marks should be visible on a slider item.

Member of

<slider> <slidertrial>

Syntax

/ showticks = boolean

Parameters

boolean A boolean value of true or false.

Remarks

Examples

The following slider does not display tick marks:

<slider q1>
/ caption = "Rate the video on the following scale"
/ showticks = false
</slider>


showtooltips attribute

The showtooltips attribute specifies whether tooltips are shown as the user moves the slider on a slider survey item.

Member of

<slider> <slidertrial>

Syntax

/ showtooltips = boolean

Parameters

boolean A boolean value of true or false.

Remarks

Examples

The following slider does not display tooltips:

<slider q1>
/ caption = "Rate the video on the following scale"
/ showtooltips = false
</slider>


size attribute

The size attribute defines the width and height of the bounding rectangle of a visual stimulus.

Member of

<button> <checkboxes> <clock> <dropdown> <html> <image> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Syntax

/ size = (width variable, height variable)

Parameters

width variable | The width of the rectangle in pixels (default), percent, or points. If width is set to null and a height is specified, the width is set to the pixel size of the height.
height variable | The height of the rectangle in pixels (default), percent, or points. If height is set to null and a width is specified, the height is set to the pixel size of the width.

Remarks

The size attribute is useful for presenting pictures and video in the same size, or long strings of text that should be wrapped over multiple lines. Text, pictures, shapes, and video are sized to fit within the bounding rectangle.

Examples

The following presents a sentence wrapped in a 100 by 200 pixel rectangle.

<text paragraph>
/ items=("The quick brown fox jumped over the lazy dog")
/ size=(100, 200)
</text>

The following presents a circle who's diameter is 20% the width of the screen.

<shape circle>
/ shape=circle
/ size=(20%, null)
</shape>


skip attribute

The skip command defines conditions in which trials or survey pages should be not be run.

Member of

<block> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Syntax

/ skip = [expression; expression; expression; ...]

Parameters

expression Specifies the expression to evaluate to determine whether the trial(s) should be skipped.

Remarks

The skip attribute can be used to create task flow that dynamically adapts based on the subject's performance or the current state of the script. Each condition specified in the skip command or commands is evaluated, and if any one of them is true (either logically true or producing numeric result not equal to zero), the trial is not run.

Examples

The following trial is skipped if 10 incorrect responses are given in a row.

<trial mytrial>
/ stimulusframes=[1=sometext]
/ validresponse=("a", "b")
/ correctresponse=("a")
/ skip=[trial.mytrial.errorstreak >= 10]
</trial>

The following trial is skipped if the user selected option 1 on a radio button survey item.

<trial mytrial>
/ stimulusframes=[1=sometext]
/ validresponse=("a", "b")
/ correctresponse=("a")
/ skip=[radiobuttons.choice.response == 1]
</trial>

The following block is skipped if the participants mean latency up to that point is greater than 1000.

<block myblock>
/ trials=[1-20=noreplace(testtrials, distractortrials)]
/ skip=[block.myblock.meanlatency > 1000]
</block>


skipcommand attribute

The skipcommand attribute specifies a key combination that terminates the experiment.

Member of

<defaults>

Syntax

/ skipcommand = (command key + scancode)

Parameters

commandkey One of the following values:
Value | Description
Alt<n> | The right or left Alt key.
Ctrl<n> | The right or left Ctrl key.
Shift<n> | The right or left Shift key.
Win<n> | The right or left Windows key.
scancode | An integer indicating the scan code of the key.
character | The single or double quoted character of the key.

Remarks

The skipcommand allows the researcher to define a custom combination of keys that enable the participant to opt out of an experiment. The skipcommand can consist of a single or multiple keys. If multiple keys are specified, the participant must press all of the keys simultaneously. The participant may press the keys any time during the experiment, at which point the experiment ends.

The skipcommand is similar to Inquisit's built in Ctrl+Q command. When the command is issued, Inquisit Web will terminate the experiment and forward the participant to the finish page url.

The skipcommand keys must be specified in terms of scancodes.

Examples

The following defines the skipcommand as the key combination Ctrl+Alt+30 (the scancode for the A key is 30):

<defaults>
/ skipcommand = (Ctrl+Alt+30)
</defaults>

The following defines the skipcommand as the key combination Win+T:

<defaults>
/ skipcommand = (Win+'T')
</defaults>


slidersize attribute

The slidersize attribute defines the width and height of the bounding rectangle of the slider control on a slider survey item.

Member of

<slider>

Syntax

/ slidersize = (width variable, height variable)

Parameters

width variable | The width of the rectangle in pixels (default), percent, or points.
height variable | The height of the rectangle in pixels (default), percent, or points.

Remarks

The slidersize attribute allows the slider control to be scaled to the desired size for a questionnaire, independent of the size of the slider question.

Examples

The following presents a slider question, with the slider sized to 200 by 20 pixels.

<slider question1>
/ caption = "Rate the movie you just watched.
/ slidersize=(200, 20)
/ options = ("vanilla", "chocolate", "strawberry", "mint chip")
</slider>


soundcapture attribute

The soundcapture attribute records audio during an experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Syntax

/ soundcapture = boolean

Parameters

boolean A boolean value of true or false.

Remarks

The soundcapture attribute supports recording of long form verbal responses, such as an answer to an interview question. When the soundcapture attribute is set to true, audio recording starts at the beginning of the expt, block, or trial with this attribute specified after any preinstructions are presented. It continues to record records until they end or before any postinstructions are presented. Recordings are saved to wav files in a subfolder called "soundcaptures". When used with Inquisit Web, the maximum recording time is 20 minutes. The recording enabled by the outermost expt, block, or trial takes precedence.

Examples

The following trial records audio after presenting three stimuli until the participant clicks the mouse:

<trial q1>
/ stimulustimes = [1=target1, target2, target3]
/ soundcapture = true
/ validresponse = (noresponse, lbuttondown)
/ timeout = 1000
/ inputdevice = mousekey
</trial>


srsignal attribute

The srsignal attribute controls the extent to which voice input is analyzed by the speech recognition engine.

Member of

<response>

Syntax

/ srsignal = voicesignal

Parameters

srsignal One of the following:
Value | Description
sound | Any sound is considered valid, and the speech engine does no recognition analysis.
hypothesis | Any utterance hypothesized by the speech engine to be a valid response.
identify | Any utterance identified by the speech engine to be a valid response. An identify recognition has met a higher threshold than a hypothesis recognition.

Remarks

The default is identify.

Examples

The following implements a voice key response:

<response windowprocedure>
/ srsignal = sound
</response>


stimulusframes attribute

The stimulusframes attribute specifies the stimulus presentation sequence for a trial in terms of vertical retrace frames of the monitor.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ stimulusframes = [framenumber = stimulusname, stimulusname, ...; framenumber = stimulusname, ...]

or

/ stimulusframes = [framenumber = list.name]

or

/ stimulusframes = [framenumber = selectionmode(stimulusname, stimulusname, stimulusname, ...)]

Parameters

framenumber | A non-negative integer specifying a vertical retrace frame.
stimulusname | The name of a stimulus defined elsewhere in the script to be presented on the specified frame.
list.name | The name of a list that selects the stimulus to be presented on the specified frame.
selectionmode One of the following values:
Value | Description
noreplace | Randomly selects without replacement which stimulus in the group to run.
noreplacenorepeat | Randomly selects which stimulus in the group to present without replacement and without selecting any single stimulus consecutively.
replace | Randomly selects with replacement which stimulus in the group to run.
replacenorepeat | Randomly selects which stimulus in the group to present with replacement and without selecting any single stimulus consecutively.
sequence | Runs each stimulus in the group.

Remarks

The stimulusframes attribute schedules stimuli to be presented on particular vertical retrace frames in the <trial>’s frame sequence. The framenumber represents the ordinal position of the frame within the sequence. If a stimulus is assigned to a frame, it will be displayed at the onset of that frame. If no stimulus is assigned to a frame, the display is not changed during that frame and previously displayed stimuli will remain visible. Multiple stimuli can be assigned to a single frame, in which case all of those stimuli are displayed simultaneously at the onset of the frame.

Alternatively, stimulus presentation can be defined in terms of milliseconds using stimulustimes.

A vertical retrace frame is the interval during which a the screen is painted from top to bottom. Video presentation on a digital monitor is not continuous over time but instead consists of discreet frames during which the screen is painted (think of the frames in an animated cartoon or a motion picture). On a digital monitor, stimuli must therefore be presented for durations that are multiples of a duration of a single frame, and the shortest time interval a stimulus can be presented is the duration of 1 frame.

On most standard monitors, the screen is repainted every 16.7 ms (60 hz) or 13.9 ms (72 hz) — these frequencies are known as the vertical frame rate or simply the frame rate. Some video systems permit the frame rate to be adjusted in the Windows control panel. Consult your hardware dealer to determine how to adjust the frame rate for your monitor.

Examples

The following trial presents a forward and backward masked prime for exactly 1 vertical retrace frame, and then presents a target stimulus that remains on the screen until the subject responds:

<trial mytrial>
/ stimulusframes=[1=forwardmask; 2=prime; 3=backwardmask; 4=target]
/ validresponse=("a", "b")
/ correctresponse=("a")
</trial>

The following trial presents a forward and backward masked prime for exactly 1 vertical retrace frame, and then presents a target stimulus that remains on the screen until the subject responds. The particular forward and backward mask used on each trial are selected from list elements called forwardmaskselector and backwardmaskselector respectively:

<trial mytrial>
/ stimulusframes=[1=list.forwardmaskselector; 2=prime; 3=list.backwardmaskselector; 4=target]
/ validresponse=("a", "b")
/ correctresponse=("a")
</trial>

The following trial presents a focusstimulus for 10 vertical retrace frames, then presents a two stimuli simultaneously on the left and right of the screen:

<trial mytrial>
/ stimulusframes=[1=focusstimulus; 10=lefttarget,righttarget]
/ validresponse=("a", "b")
/ correctresponse=("a")
</trial>


stimulustimes attribute

The stimulustimes attribute specifies the stimulus presentation sequence for a trial in terms of time in milliseconds.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ stimulustimes = [time = stimulusname, stimulusname, ...; time = stimulusname, ...]

or

/ stimulustimes = [time = list.name]

or

/ stimulustimes = [time = selectionmode(stimulusname, stimulusname, stimulusname, ...)]

Parameters

time | A non-negative integer specifying the time in milliseconds relative to the beginning of the sequence.
stimulusname | The name of a stimulus defined elsewhere in the script to be presented on the specified frame.
list.name | The name of a list that selects the stimulus to be presented on the specified frame.
selectionmode One of the following values:
Value | Description
noreplace | Randomly selects without replacement which stimulus in the group to run.
noreplacenorepeat | Randomly selects which stimulus in the group to present without replacement and without selecting any single stimulus consecutively.
replace | Randomly selects with replacement which stimulus in the group to run.
replacenorepeat | Randomly selects which stimulus in the group to present with replacement and without selecting any single stimulus consecutively.
sequence | Runs each stimulus in the group.

Remarks

Given that digital monitors repaint the screen with a finite frequency (typically every 10 to 16.7 milliseconds), stimuli can only be physically presented on the display at the particular time the frame is repainted. Inquisit therefore rounds each specified time value to the nearest retrace frame boundary. For example, on a 60 hz monitor, a stimulus time of 3 would be rounded down to 0, a stimulustime of 10 ms would be rounded up to 16.7 ms, and 36 ms would be rounded down to 33.3 ms in order to coordinate the times with the onset of the frame. Multiple stimuli can be assigned to a single time, in which case all of those stimuli are displayed simultaneouly at the given time.

Alternatively, stimulus presentation can be defined in terms of vertical retrace frames using stimulusframes.

Examples

The following trial presents a forward and backward masked prime for 10 milliseconds, and then presents a target stimulus that remains on the screen until the subject responds. Both masks are presented for 20 milliseconds.

<trial mytrial>
/stimulustimes=[0=forwardmask; 20=prime; 30=backwardmask; 50=target]
/ validresponse=("a", "b")
/ correctresponse=("a")
</trial>

The following trial presents a forward and backward masked prime for 10 milliseconds, and then presents a target stimulus that remains on the screen until the subject responds. The particular forward and backward mask used on each trial are selected from list elements named forwardmaskselector and backwardmaskselector respectively:

<trial mytrial>
/stimulustimes=[0=list.forwardmaskselector; 20=prime; 30=list.backwardmaskselector; 40=target]
/ validresponse=("a", "b")
/ correctresponse=("a")
</trial>

The following trial presents a focusstimulus for 500 milliseconds, then presents a two stimuli simultaneously on the left and right of the screen:

<trial mytrial>
/stimulustimes=[0=focusstimulus; 500=lefttarget,righttarget]
/ validresponse=("a", "b")
/ correctresponse=("a")
</trial>


stop attribute

The stop command specifies the conditions in which an expt or block should be terminated.

Member of

<block> <expt>

Syntax

/ stop = [expression; expression; expression; ...]

Parameters

expression Specifies the expression to evaluate to determine whether the expt or block should stop.

Remarks

The stop command enables a script to conditionally end an expt or block based on whether a logical expression is true. The expression can evaluate the subject's performance, the current state of the experiment, the elapsed time, and other variables as well. You may specify multiple expressions separated by semi-colons, or contained in separate stop commands. The stop conditions are evaluated after each trial is complete. If any single condition is true, the expt or block ends. Otherwise, the expt or block continues.

Examples

The following block is interrupted if the subject gives 5 incorrect answers in a row, or if mean response latency on testtrials drifts above 1000 milliseconds:

<block myblock>
/ trials=[1-20=noreplace(testtrials, distractortrials)]
/ stop=[block.myblock.errorstreak >= 5; trial.testtrials.percentcorrect >= 1000]
</block>


stop attribute

The stop command specifies the conditions in which a trial should end.

Member of

<likert> <openended> <slidertrial> <surveypage> <trial>

Syntax

/ stop = [expression; expression; expression; ...]

Parameters

expression Specifies the expression to evaluate to determine whether the trial should stop.

Remarks

When the stop command is defined for a trial, the trial continues to run and poll for responses until the logical expression is the stop condition is true. The stop command is useful for tracking multiple responses within a trial or tracking continuous response data. For example, a test that measures Visual Analog Scale responses as participants watch a video would check that the video is no longer playing as a stop condition. Every valid response made before the trial stops is registered and triggers any associated response, error, or correct messages.

Examples

The following trial plays a video until the end, registering left and right mouse button clicks along the way:

<trial vsa>
/ stimulusframes=[1=testvideos]
/ stop=[video.testvideos.isplaying == false;]
/ validresponse=(lbuttondown, rbuttondown)
</trial>


stream attribute

The stream attribute specifies whether video files located on the web should be completely downloaded at the beginning of an experiment or streamed over the web as they are played. This attribute has no effect for videos loaded from the local computer.

Member of

<video>

Syntax

/ stream = boolean

Parameters

boolean A value of true or false.

Remarks

By default, Inquisit Web downloads all video files to a temporary folder on the local computer at the beginning the experiment. This allows Inquisit to start playing the videos more quickly, and it prevent video playback from being paused or interrupted due to spotty network connections or high traffic. This approach can greatly increase the load time of the experiment, however, given that all of the (potentially large) video files are downloaded up front as the experiment loads. If the load time takes too long, participants may lose patience and drop out of the study. Furthermore, Inquisit downloads all video files, not just the ones that are played for a particular participant. Generally speaking, if the total size of the video files to be downloaded is large, and/or if a given participant will see only one of the videos, the stream attribute should be set to true to minimize the participant's waiting time.

Examples

The following shows a video that streams from the web:

<video somevideo>
/ stream=true
</video>


subcaption attribute

The subcaption attribute determines the subcaption text for a survey item.

Member of

<checkboxes> <dropdown> <image> <listbox> <radiobuttons> <slider> <surveypage> <textbox>

Syntax

/ subcaption = "text"

Parameters

text A string in quotes serving as subcaption for the survey item.

Remarks

Default is no subcaption

Subcaptions can be richly formatted using a subset of supported HTML markup tags. For example, markup tags can be used to make selected words appear in bold, italics, a different font, or a different color. For more information on formatting options, see Using HTML Markup in Text

Examples

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


subcaptionfontstyle attribute

The subcaptionfontstyle attribute specifies the font in which subcaptions of survey pages and items are presented.

Member of

<caption> <checkboxes> <dropdown> <image> <listbox> <radiobuttons> <slider> <surveypage> <textbox>

Syntax

/ subcaptionfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)

Parameters

face name | A string in quotes indicating the name of the font.
height | (Optional) An integer that specifies the height of the font in points (default), pixels, or percent.
bold | (Optional) A value of true or false indicating whether the font should be bold.
italic | (Optional) A value of true or false indicating whether the font should be italic.
underline | (Optional) A value of true or false indicating whether the font should underlined.
strikeout | (Optional) A value of true or false indicating whether the font should appear with a strikeout line.
quality | (Optional) An integer ranging from 1 to 5 indicating the font quality. 5 is the best quality (ClearType).
character set (Optional) An integer indicating the character set code. The character set can be any of the following:
Value | Description
0 | ANSI
186 | Baltic
1 | Default (uses the current system locale on the local computer)
136 | Chinese Big5 (Taiwan, Hong Kong, Macau)
238 | Eastern European
134 | GB2312 (Simplified Chinese)
161 | Greek
129 | Hangul (Korean)
77 | Mac
255 | OEM (operating system dependent)
204 | Russian
128 | ShiftJIS (Japanese)
2 | Symbol
162 | Turkish
163 | Vietnamese
130 | Johab (Korean)
178 | Arabic.
177 | Hebrew
222 | Thai

Remarks

The font can be set for the entire survey, or for a particular page, with the page setting overriding the survey settings. Individual items may have additional font settings that will override this font style.

Inquisit provides an easy to use font picker dialog to set this attribute. To use the font picker, 1) move the cursor to where you want to insert the the font attribute, 2) open the Insert menu, and 3) select "Font...". Once you have selected the desired font settings in the Font Wizard dialog, select OK and the font attribute and appropriate settings will automatically be inserted in your script at the cursor location.

Examples

The following sets the default font for the subcaption of a textbox survey item to text in 2 inch Courier New font:

<textbox q1>
/ subcaptionfontstyle = ("Courier New", 2in, false, false, false)
/ caption = ("Enter the first three words that pop into your head.")
</textbox>

The following sets the subcaption font for a checkbox survey item to an 8 point Courier New font:

<checkboxes q1>
/ subcaptionfontstyle = ("Courier New", 8pt, false, false, true)
/ caption = ("Check all that apply.")
/ options=("I am a US citizen.", "I have never been convicted of a felony")
</checkboxes>

The following sets the default subcaption font for the entire survey to 14pt Arial bold:

<survey somesurvey>
/ subcaptionfontstyle = ("Arial", 14pt, true)
/ pages = (1=p1; 2=p2; 3=p3)
</survey>

The following sets the default subcaption font for the entire survey to Arial bold and sets the height to 10% of the screen height:

<survey somesurvey>
/ subcaptionfontstyle = ("Arial", 10%, true)
/ pages = (1=p1; 2=p2; 3=p3)
</survey>

The following sets the default subcaption font for a particular survey page to italic Tahoma font, 25 pixels high:

<surveypage page1>
/ subcaptionfontstyle = ("Tahoma", 25px, false, true)
/ questions = (1=q1; 2=q2; 3=q3)
</surveypage>


subjects attribute

The subjects attribute enables between-subject variation of experiment procedures.

Member of

<batch> <expt>

Syntax

/ subjects = (integer, integer, integer, ... of modulus)

Parameters

integer | A positive integer indicating which subject numbers should run the experiment.
modulus | A positive integer indicating the modulus.

Remarks

The subjects attribute allows you to run different expts depending on the subject number that is entered when you run an Inquisit script. If given subject number will run the experiment if the following is true:

integer = remainder( subjectnumber / modulus )

Multiple expts can be defined in the script, allowing different subject numbers to be assigned to different experimental conditions. A single subject number can be assigned to multiple expts, in which case all of the assigned expts will be run for that subject number in the order they appear in the script.

Examples

The following expt is run for odd numbered subjects:

<expt>
/ blocks=[1-20=noreplace(testtrials, distractortrials)]
/ subjects = (1 of 2)
</expt>

The following expt is run for even numbered subjects:

<expt>
/ blocks=[1-20=noreplace(testtrials, distractortrials)]
/ subjects = (2 of 2)
</expt>

The following expt is run for second of every four subjects (i.e. subject numbers 2, 6, 10, 14, ...):

<expt>
/ blocks=[1-20=noreplace(testtrials, distractortrials)]
/ subjects = (1 of 4)
</expt>


subport attribute

The subport attribute specifies whether to target the LPT data or control port.

Member of

<port>

Syntax

/ subport = porttype

Parameters

porttype Specifies which LPT subport to target. Must be one of the following:

Operator | Definition
data | The data port.
control | The control port.

Remarks

The standard PC parallel port contains 2 output registers, the data and control registers. This attribute defines which register to use to send TTL signals.

Examples

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


columns attribute

The columns attribute specifies which data columns to record to the summary data file.

Member of

<summarydata>

Syntax

/ columns = (property, property, property, ...)

Parameters

property Any property of any element may be listed as a data column. This includes custom properties defined in the values and expressions elements.

Remarks

The columns attribute specifies the specific data to be written to the summary data file. Any property of any element defined in the script can be listed. The data values may be specified in any order. On each trial, Inquisit will write a single line of data consisting of each data value specified by the column. Columns will appear in the data file in the specified order.

Examples

The following records 10 columns to the data file:

<summarydata>
/ columns=(script.subjectid, script.startdate, script.starttime, inquisit.version, inquisit.releasedate, inquisit.appmode, computer.ipaddress, values.latencydiff, values.errordiff, values.totaltimeontask)
</summarydata>


textboxsize attribute

The textboxsize attribute defines the width and height of the bounding rectangle of the edit control on a textbox survey item.

Member of

<textbox>

Syntax

/ textboxsize = (width variable, height variable)

Parameters

width variable | The width of the rectangle in pixels (default), percent, or points.
height variable | The height of the rectangle in pixels (default), percent, or points.

Remarks

The textboxsize attribute allows the edit control to be scaled to the desired size for a questionnaire, independent of the size of the entire item.

Examples

The following presents a textbox question, with the textbox sized to 200 by 100 pixels.

<textbox question1>
/ caption = "What is your name?"
/ textboxsize=(200, 100)
</textbox>


timeout attribute

The timeout attribute specifies a time deadline in milliseconds for a block, instruction page, or trial.

Member of

<block> <clock> <instruct> <likert> <openended> <response> <slidertrial> <trial>

Syntax

/ timeout = integer expression

Parameters

integer expression A integer value expressing the length of the deadline in milliseconds.

Remarks

Once the timeout duration expires, the event is immediately terminated and the next event begins. For blocks, the timeout duration begins before pre-instruction pages and trials are run and thus includes time spent on instruction pages and trials. For trials, the duration begins as soon as Inquisit begins waiting for a response (by default, this is at the end of the stimulus presentation sequence, but can be earlier if the either the beginresponsetime or beginresponseframe attribute is set).

If a trial or block times out before the subject responds, the response is recorded as "0" and the latency is recorded as the timeout duration.

See How to Control Trial Duration and Inter-Trial Intervals for more details on controlling timing of trials.

Examples

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


transparentcolor attribute

The transparentcolor attribute specifies that a particular color on a picture should be rendered transparent.

Member of

<picture>

Syntax

/ transparentcolor = (red value, green value, blue value)

Parameters

red value | An integer from 0 to 255 specifying the intensity of the red component.
green value | An integer from 0 to 255 specifying the intensity of the green component.
blue value | An integer from 0 to 255 specifying the intensity of the blue component.

Remarks

By default Inquisit will render pictures using without any transparent regions (this includes transparent GIF files). To make regions of an image such as the background transparent, those regions should be set to a single uniform color that does not appear anywhere else in the image, and that color should be specified as the transparent color using this attribute. This attribute can used with any picture format supported by Inquisit (e.g., bmp, jpg, gif), regardless of whether that format natively supports transparency.

Examples

The following presents a picture with white regions transparent:

<picture somepicture>
/ items = ("mypicture.bmp")
/ transparentcolor = (255, 255, 255)
</picture>

The following presents a picture with black regions transparent:

<picture somepicture>
/ items = ("mypicture.jpg")
/ transparentcolor = (0, 0, 0)
</picture>


trialduration attribute

The trialduration attribute fixes the duration of the trial to the specified number of milliseconds.

Member of

<likert> <openended> <slidertrial> <trial>

Syntax

/ trialduration = integer expression

Parameters

integer expression A integer value expressing the duration of the trial in milliseconds.

Remarks

If the subject does not respond before the duration expires, the trial ends and the next trial begins. If the subject responds before the duration is over, Inquisit pauses for the remainder of the duration before moving to the next trial.

See How to Control Trial Duration and Inter-Trial Intervals for more details on controlling timing of trials.

Examples

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


trials attribute

The trials attribute specifies the sequence of trials to be run in the block.

Member of

<block>

Syntax

/ trials = [trialnumber, trialnumber = trialname; trialnumber-trialnumber = selectmode(trialname, trialname,...); trialnumber, trialnumber-trialnumber = trialname]

or

/ trials = [trialnumber-trialnumber = list.name]

Parameters

trialnumber | A non-negative integer specifying the trial number.
trialname | The name of a trial defined elsewhere in the script to be run on this block.
list.name | The name of a trial defined elsewhere in the script to be run on this block.
selectmode One of the following values:
Value | Description
noreplace | Randomly selects without replacement which trial in the group to run.
noreplacenorepeat | Randomly selects which trial in the group to present without replacement and without selecting any single trial consecutively.
replace | Randomly selects with replacement which trial in the group to run.
replacenorepeat | Randomly selects which trial in the group to present with replacement and without selecting any single trial consecutively.
sequence | Presents each trial in the group.

Remarks

The integers to the left of the equal signs represent ordinal positions within the sequence of trials. Trials can be directly assigned to a position in the sequence using the equals sign. A trial can be simultaneously assigned to multiple positions by separating the position numbers with commas (equivalent to "and") or dashes (equivalent to "through"). All trial positions in the block must be assigned to a trial or set of trials.

Examples

The first five trials of the following block are practicetrial, and the last five trials are testtrial:

<block myblock>
/ trials=[1-5=practicetrial; 6-10=testtrial]
</block>

The following block randomly selects either lefttrial or righttrial for each of its ten trials. Both trial types are run exactly five times.

<block myblock>
/ trials=[1-10=noreplace(lefttrial, righttrial)]
</block>

The following block selects trials one through ten from a list element named 'trialselector' containing a set of trial.

<block myblock>
/ trials=[1-10=list.trialselector]
</block>

The following block randomly selects either testtrial or distractortrial for each of its 12 trials. The testtrial is run exactly 8 time and distractortrial is run 4 times.

<block myblock>
/ trials=[1-12=noreplace(testtrial, testtrial, distractortrial)]
</block>

The following block runs bigtrial on even numbered trials and littletrial on odd numbered trials.

<block myblock>
/ trials=[1,3,5,7,9 = littletrial; 2,4,6,8,10 = bigtrial]
</block>


txbgcolor attribute

The txbgcolor attribute determines the color of the immediate background behind the text displayed on the screen.

Member of

<clock> <defaults> <text>

Syntax

/ txbgcolor = (red value, green value, blue value)

or

/ txbgcolor = (transparent)

or

/ txbgcolor = color name

or

/ txbgcolor = color value

Parameters

red value | An integer from 0 to 255 specifying the intensity of the red component.
green value | An integer from 0 to 255 specifying the intensity of the green component.
blue value | An integer from 0 to 255 specifying the intensity of the blue component.
color name | The name of a built in color.
color value | A 32-bit argb value specified as in integer or a CSS hex value (e.g., #0000FF or #00F for blue).

Remarks

The immediate background is the rectangular region of the screen spanned by text when presented. If the value is set to transparent, the immediate text background color is transparent.

Examples

The following presents white text on a blue background:

<text sometext>
/ items = ("inquisit rocks")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
</text>

The following presents purple text on a black background:

<text sometext>
/ items = ("inquisit rocks")
/ txcolor = (255, 0, 255)
/ txbgcolor = (0, 0, 0)
</text>


txcolor attribute

The txcolor attribute specifies the foreground color in which text is displayed.

Member of

<caption> <checkboxes> <clock> <defaults> <dropdown> <image> <listbox> <radiobuttons> <slider> <slidertrial> <text> <textbox>

Syntax

/ txcolor = (red value, green value, blue value)

or

/ txcolor = color name

or

/ txcolor = color value

Parameters

red value | An integer from 0 to 255 specifying the intensity of the red component.
green value | An integer from 0 to 255 specifying the intensity of the green component.
blue value | An integer from 0 to 255 specifying the intensity of the blue component.
color name | The name of a built in color.
color value | A 32-bit argb value specified as in integer or a CSS hex value (e.g., #0000FF or #00F for blue).

Remarks

The default color is black.

Examples

The following presents white text on a blue background:

<text sometext>
/ items = ("inquisit rocks")
/ txcolor = (0, 0, 255)
/ txbgcolor = (255, 255, 255)
</text>

The following presents purple text on a black background:

<text sometext>
/ items = ("inquisit rocks")
/ txcolor = (255, 0, 255)
/ txbgcolor = (0, 0, 0)
</text>


undodraw attribute

The undodraw attribute specifies conditions in which any drawing on a given trial should be erased.

Member of

<trial>

Syntax

/ undodraw = [expression; expression; expression; ...]

Parameters

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

Remarks

This parameter evaluates one or more specified expressions at the end of a trial. If the expressions evaluate to true, any drawing on that trial will be removed from the screen. This attribute thus provides a mechanism for a give task to allow participants to undo drawing mistakes (e.g., tracing to the incorrect target in the Trail Making Test.

Examples

The following trial erases a drawing if the participant clicks on an "undo" button placed on the screen.

<trial mytrial>
/ stimulusframes = [1=start, undo]
/ undodraw = [trial.mytrial.response == "undo"]
</trial>


userid attribute

The userid attribute specifies the logon name to use for accessing secured network locations.

Member of

<data> <survey>

Syntax

/ userid = "string"

Parameters

string A quoted string indicating a logon name.

Remarks

The userid and password are used to log in when data is stored on a secured network resource such as a web site.

Examples

The following saves the data to a secure https share using the specified userid and password:

<data>
/ file="https://storage.millisecond.com/mydata/"
/ userid="sean"
/ password="open sesame"
</data>


validresponse attribute

The validresponse attribute specifies the set of responses considered valid for a given trial.

Member of

<checkboxes> <defaults> <dropdown> <listbox> <radiobuttons> <slider> <textbox> <trial>

Syntax

/ validresponse = ("character", "character",...)

or

/ validresponse = (scancode, scancode, ...)

or

/ validresponse = (stimulusname, stimulusname, ...)

or

/ validresponse = (mouseevent, mouseevent, ...)

or

/ validresponse = (joystickevent, joystickevent, ...)

or

/ validresponse = ("word", "word", ...)

or

/ validresponse = (keyword)

or

/ validresponse = (property, property, ...)

Parameters

character | A character indicating a valid keyboard response.
scancode | An integer specifying the scancode of a valid keyboard response. To determine the scancode of a given key, use the "Keyboard Scancode..." command on Inquisit's Tools menu, or see the scancodes table for corresponding key value assignments.
stimulusname | The name of a stimulus element defined elsewhere in the script.
mouseevent Any of the following mouse events:
Name | Description
lbuttondown | Left mouse button down
lbuttonup | Left mouse button up
lbuttondblclk | Left mouse button double click
rbuttondown | Right mouse button down
rbuttonup | Right mouse button up
rbuttondblclk | Right mouse button double click
mbuttondown | Middle mouse button down
mbuttonup | Middle mouse button up
mbuttondblclk | Middle mouse button double click
mousemove | Mouse is moved in any direction
mousewheel | Mouse wheel is scrolled in any direction
joystickevent Any of the following joystick events:
Name | Description
buttona | button a
buttonb | button b
buttoncenter | center button
buttonguide | guide button
buttonselect | selection button
buttonstart | start button
buttonup | up direction button
buttondown | down direction button
buttonleft | left direction button
buttonright | right direction button
buttonx | x button
buttony | y button
buttonl1 | left shoulder button
buttonl2 | left trigger button
buttonl3 | left stick button
buttonr1 | right shoulder button
buttonr2 | right trigger button
buttonr3 | right stick button
leftthumbstickback | left thumbstick back value
leftthumbstickforward | left thumbstick forward value
leftthumbstickleft | left thumbstick left value
leftthumbstickright | left thumbstick right value
rightthumbstickback | right thumbstick back value
rightthumbstickforward | right thumbstick forward value
rightthumbstickleft | right thumbstick left value
rightthumbstickright | right thumbstick right value
change | any change in joystick state
word | A string (in quotes) indicating a valid spoken or openended response.
keyword Can be any of the following values:
Name | Description
noresponse | The absence of a response is considered valid. This setting requires that a timeout be defined for the trial.
anyresponse | Any response is considered valid.
property | A dynamic property that resolves to either a character or a scancode integer.

Remarks

This attribute specifies an array of responses considered valid for this trial. Inquisit uses this attribute to determine whether a subject's response should be considered a valid possible response for the trial, or whether is should be ignored. The syntax of the settings depends on the type of input device used (e.g., mouse, keyboard, voice) as defined by the inputdevice attribute.

For all input devices, "noresponse" can be specified to indicate that the absence of a response should be considered a valid response. This setting can be used in conjunction with the timeout attribute to implement "go/no go" tasks.

For voice and openended input, the validresponse can be set to a stimulus name, in which case the all of the possible items in that stimulus are considered a valid responses.

For mouse input, the validresponse can be set to a visual stimulus name, in which case the subject may click on the area of the screen occupied by the stimulus. For overlapping visual stimuli, Inquisit evaluates whether the mouse click hits a stimulus according to the order in which stimuli are listed in validresponse. Thus, if a click falls within the region of two or more stimuli, the response will be counted as the whichever stimulus is listed prior to the others.

Examples

In the following trial, pressing the space bar or "8" key is considered valid:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ validresponse=(" ", "8")
</trial>

In the following trial, pressing the key with a scancode or character value equal to the value.leftresponse and value.rightresponse properties is considered valid:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ validresponse=(values.leftresponse, values.rightresponse)
</trial>

In the following trial, pressing the tab key is considered valid:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=keyboard
/ validresponse=(15)
</trial>

In the following trial, a right mouse press is considered valid:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=mouse
/ validresponse=(rbuttondown)
</trial>

In the following trial, pulling the left joystick back is considered valid:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=joystick
/ validresponse=(leftthumbstickback)
</trial>

In the following trial, a clicking the area on the screen occupied by the "sometext" stimulus is considered valid:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=mouse
/ validresponse=(sometext)
</trial>

In the following trial, pronouncing the currently selected item in "sometext" is considered valid:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=voice
/ validresponse=(sometext)
</trial>

In the following trial, typing the currently selected item in "sometext" is considered valid:

<openended mytrial>
/stimulusframes=[1=sometext]
/ validresponse=(sometext)
</openended>

In the following trial, typing "yes" is considered valid:

<openended mytrial>
/stimulusframes=[1=sometext]
/ validresponse=("yes")
</openended>

In the following trial, the absence of a response before the 1000 millisecond deadline is considered valid:

<trial mytrial>
/stimulusframes=[1=sometext]
/ inputdevice=voice
/ validresponse=(sometext)
/ validresponse=(noresponse)
/ timeout = 1000 </trial>


valign attribute

The valign attribute determines the vertical alignment of text on the screen relative to the position coordinates.

Member of

<button> <clock> <defaults> <picture> <shape> <text> <video>

Syntax

/ valign = alignment

Parameters

alignment One of the following values:
Value | Description
top | Text is aligned to the top.
bottom | Text is aligned to the bottom.
center | Text is center aligned.

Remarks

Alignment is relative to the position coordinates of the text. The default is center.

Examples

The following presents bottom-aligned text:

<text sometext>
/ items = ("ipsum")
/ valign = bottom
</text>


vjustify attribute

The vjustify attribute determines whether the text is top, bottom, or center justified.

Member of

<text>

Syntax

/ vjustify = justification

Parameters

justification One of the following values:
Value | Description
top | Text is justified to the top.
bottom | Text is justified to the bottom.
center | Text is center justified.

Remarks

Justification is relative to the bounding rectangle specified by area. The default is center.

Examples

The following presents top justified text:

<text sometext>
/ items = ("ipsum")
/ area = (500, 500)
/ vjustify = top
</text>


voicekeythreshold attribute

The voicekeythreshold specifies the amplitude threshold used to identify spoken input in voicekey or voicekeyrecord mode.

Member of

<defaults>

Syntax

/ voicekeythreshold = integer

Parameters

integer An integer value ranging from 0 to 100.

Remarks

The threshold value is specified as a percentage ranging from 0 to 100, where 0 represents silence and 100 represents the maximum amplitude. The default threshold is 5.

Examples

The following sets the voicekeythreshold to 20%:

<defaults>
/ voicekeythreshold=20
</defaults>


voiceover attribute

The voiceover attribute specifies whether text stimulus should be read aloud by the device's text-to-speech services.

Member of

<html> <instruct> <text>

Syntax

/ voiceover = boolena(language, gender, age, rate)

Parameters

boolean | true or false.
language | (Optional).A lowercase, two-letter (also some three-letter), ISO 639 language code (e.g., en, es, de, nl). Default is the local device language.
gender | (Optional). Either male, female, or unknown. Default is female.
age | (Optional). Either child, teenager, adult, senior, or other. Default is adult.
rate | (Optional). The speed of the voice over, ranging from -1.0 to 1.0. The default is 0.0.

Remarks

The voiceover attribute enables easy, automated narration of instructions and other text. The feature can be used to provide voice-only presentation of instructions, or both visual and voice presentation. The command includes optional arameters for choosing the language, gender, age, and speed of the voice to use for reading text. Inquisit will search for the best fit, prioritizing the attributes in the previously stated order. If no optional parameters are specified, the machine's default voice is used.

Examples

The following voiceovers the data file using the given password:

        <text start>
/ items = "The test will start when you press the spacebar")
/ voiceover = true
</text>


volume attribute

The volume attribute defines the loudness of a sound stimulus.

Member of

<sound>

Syntax

/ volume = integer

Parameters

integer An integer from 0 to -10000 specifying volume in 1/100 decibel units.

Remarks

Volume values may range from 0 (no volume adjustment) to -10,000 (essentially silent). Inquisit does not support amplification. Volume units are relative to the original volume of the WAV file. The decibel scale corresponds to the logarithmic hearing characteristics of the ear. An attenuation of 10 dB makes a buffer sound half as loud; an attenuation of 20 dB makes a buffer sound one-quarter as loud. The pan setting is cumulative with the volume setting.

Examples

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


vposition attribute

The vposition attribute determines the vertical position of the item on the screen.

Member of

<button> <clock> <html> <picture> <shape> <text> <video>

Syntax

/ vposition = y expression

Parameters

y expression The vertical screen coordinate in pixels, percent(default), or points.

Remarks

The value is specified as a percentage of the vertical plane of the screen, where 0.0 corresponds to the top edge of the screen and 100.0 to the bottom. The default value is 50.0, which corresponds to the center of the screen.

Examples

The following sets the position of the text to be the top right corner of the screen:

<text sometext>
/ items = ("ipsum")
/ hposition = 95
/ vposition = 5
</text>

The following sets the position based on the trial number:

<text sometext>
/ items = ("ipsum")
/ vposition = trial.mytrial.currenttrialnumber * 5
</text>


wait attribute

The wait attribute determines how long in milliseconds to wait before allowing the subject to move to the next instruction page.

Member of

<instruct>

Syntax

/ wait = integer

Parameters

integer An integer specifying the time in milliseconds to wait.

Remarks

By default, subjects can immediately advance passed an instruction page.

Examples

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


width attribute

The width attribute specifies the width of a visual stimulus.

Member of

<button> <clock> <picture> <shape> <text> <video>

Syntax

/ width = numeric expression

Parameters

numeric expression An expression that can be converted to a number result.

Remarks

The default unit is percentage of the vertical width of the presentation window.

Examples

The following sets the width of a clock to 5% of the screen width:

<clock timer>
/ mode = timer
/ width = 5%
/ timeout = 300000
/ position = (50%, 10%)
/ format = "mm:ss"
</clock>


windowaspectratio attribute

Member of

Syntax

Parameters

Remarks

Examples

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


windowsize attribute

The size attribute defines the width and height of instruction pages.

Member of

<instruct>

Syntax

/ windowsize = (width variable, height variable)

Parameters

width variable | The width of the rectangle in pixels, percent(default), or points.
height variable | The height of the rectangle in pixels, percent(default), or points.

Remarks

This attribute is useful for making instruction pages larger or smaller. The default width and height are 640 by 480.

Examples

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


windowsize attribute

The windowsize attribute defines the width and height of window in which experimental stimuli are presented.

Member of

<defaults>

Syntax

/ windowsize = (width variable, height variable)

Parameters

width variable | The width of the rectangle in pixels, percent(default), or points.
height variable | The height of the rectangle in pixels, percent(default), or points.

Remarks

By default, Inquisit runs experiments in full screen mode. This attribute allows you to run an experiment inside a standard window with a close button in the upper right corner. Running experiments in windowed mode is especially useful for web experiments that involve participants recruited from the internet because windowed applications are much more common than full screen applications, and because the close button provides a clear way for participants to quit an experiment. Generally speaking, it's best to specify the window size in terms of percentage of the screen so that it scales properly on different display resolutions.

Examples

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


button element

The button element defines a single button stimulus and specifies how the button is presented.

Syntax

<button buttonname>
/ caption = "text"
/ dropposition = (x value, y value) or (x constant, y constant)
/ dropsource = value or boolean
/ droptarget = property or boolean
/ erase = true(red value, green value, blue value) or true(color value) or true(color name) or false
/ fontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ halign = alignment
/ height = numeric expression
/ hposition = x expression
/ monitor = integer
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ position = (x value, y value)
/ size = (width variable, height variable)
/ valign = alignment
/ vposition = y expression
/ width = numeric expression
</button>

Properties

button.buttonname.bottom
button.buttonname.caption
button.buttonname.dropsource
button.buttonname.droptarget
button.buttonname.dropx
button.buttonname.dropy
button.buttonname.erase
button.buttonname.erasecolor
button.buttonname.erasecolorblue
button.buttonname.erasecolorgreen
button.buttonname.erasecolorred
button.buttonname.height
button.buttonname.heightpct
button.buttonname.heightpx
button.buttonname.hposition
button.buttonname.left
button.buttonname.monitor
button.buttonname.name
button.buttonname.resetinterval
button.buttonname.right
button.buttonname.skip
button.buttonname.stimulusonset
button.buttonname.timestamp
button.buttonname.top
button.buttonname.typename
button.buttonname.vposition
button.buttonname.width
button.buttonname.widthpct
button.buttonname.widthpx
button.buttonname.xpct
button.buttonname.xpx
button.buttonname.ypct
button.buttonname.ypx

Functions

None.

Remarks

button stimuli provide a convenient means of overwriting previously presented stimuli during a presentation sequence, or for drawing background to be presented behind other stimuli.

Examples

The following defines a blue circle that appears on the right side of the screen:

<button bluecircle>
/ shape = circle
/ color = (0, 0, 200)
/ position = (80%, 50%)
</button>


clearscreen element

Syntax

<clearscreen clearscreenname>
This element has no attributes
</clearscreen>

Properties

clearscreen.clearscreenname.color
clearscreen.clearscreenname.colorblue
clearscreen.clearscreenname.colorgreen
clearscreen.clearscreenname.colorred
clearscreen.clearscreenname.typename

Functions

None.

Remarks

The clearscreen element is built-in, there is no need to explicitly declare it in the script. It is a type of visual stimulus, so it can be used wherever a visual stimulus element is valid. The clearscreen is useful for quickly clearing the screen. The advantage of using clearscreen rather than the shape element is that it is much faster. By default, the color used is the screencolor specified in defaults or white if none is specified. Can be referenced as clearscreen (defaults to primary monitor) or clearscreen.monitor where monitor specifies the monitor to be cleared (i.e. clearscreen.1 for the primary, clearscreen.2 for the secondary, etc.)

Examples

The following trial presents a beep.

<trial beeptrial>
/ stimulustimes = [1=systembeep]
/ validresponse = (anyresponse)
</trial>


datastream element

The datastream element specifies how data is recorded in the data file.

Syntax

<datastream datastreamname>
/ columns = (columnname, columnname, columnname, property, property, property)
/ file = "location"
/ encrypt = true("password") or false
/ filter = [expression; expression; expression; ...]
/ frequency = integer
/ labels = ("label", "label", "label", ...)
/ password = "string"
/ separatefiles = boolean
/ userid = "string"
</datastream>

Properties

datastream.datastreamname.elapsedtime
datastream.datastreamname.encrypt
datastream.datastreamname.encryptionkey
datastream.datastreamname.file
datastream.datastreamname.name
datastream.datastreamname.password
datastream.datastreamname.recorddata
datastream.datastreamname.typename
datastream.datastreamname.userid

Functions

None.

Remarks

The datastream element allows customization of data recording, including specifying which data is recorded, the format of the data file, and the location where the data are saved. If no datastream element is defined, Inquisit uses a default data recording scheme.

Examples

The following records 10 columns to an encrypted data file on an http server.

<datastream>
/ columns=[subject, blockcode, trialcode, trialnum, latency, response, stimulusitem, stimulusnumber, stimulusitem, stimulusnumber]
/ file="https://storage.millisecond.com/mydata/"
/ userid="sean"
/ password="open sesame"
/ encrypt=true("password")
</datastream>


eyetracker element

Inquisit SR Research EyeLink Plugin

The attributes and properties here are supported by the SR Research EyeLink Eye Tracker plugin. To use the plugin, the plugin attribute must be set to "srresearch".

To use Inquisit with SR Research EyeLink eye trackers, perform the following steps:
* Set up the eye tracker according to the EyeLink User Manual. Make sure it is plugged into your computer's network port.
* Open an Inquisit script that defines the eye tracker element with plugin attribute set to "srresearch" (sample scripts are available from our library)
* Run the script. You will be asked to register the Inquisit 6 SR Research EyeLink Plugin if you haven't already.

How to Program the SR Research EyeLink Eye Tracker Plugin

Syntax

<eyetracker>
/ aoidurationthreshold = maxfixationtime
/ calibrationmode = mode
/ calibrationstimulus = stimulus
/ framerate = framerate
/ ipaddress = ipaddress
/ plugin = "srresearch"
/ saccadethreshold = saccadethreshold
</eyetracker>

Properties

eyetracker.aoidurationthreshold
eyetracker.framerate
eyetracker.framerates
eyetracker.ipaddress
eyetracker.lastex
eyetracker.lastey
eyetracker.lastfixationx
eyetracker.lastfixationy
eyetracker.lasthasfixation
eyetracker.lastlefteyex
eyetracker.lastlefteyey
eyetracker.lastlefteyez
eyetracker.lastleftfixationx
eyetracker.lastleftfixationy
eyetracker.lastleftgazex
eyetracker.lastleftgazey
eyetracker.lastleftgazez
eyetracker.lastlefthasfixation
eyetracker.lastleftpupilheight
eyetracker.lastleftpupilwidth
eyetracker.lastleftvalidity
eyetracker.lastleftx
eyetracker.lastlefty
eyetracker.lastmarker
eyetracker.lastpixelsperdegreex
eyetracker.lastpixelsperdegreey
eyetracker.lastpupilheight
eyetracker.lastpupilwidth
eyetracker.lastrighteyex
eyetracker.lastrighteyey
eyetracker.lastrighteyez
eyetracker.lastrightfixationx
eyetracker.lastrightfixationy
eyetracker.lastrightgazex
eyetracker.lastrightgazey
eyetracker.lastrightgazez
eyetracker.lastrighthasfixation
eyetracker.lastrightpupilheight
eyetracker.lastrightpupilwidth
eyetracker.lastrightvalidity
eyetracker.lastrightx
eyetracker.lastrighty
eyetracker.lasttimestamp
eyetracker.lastx
eyetracker.lasty
eyetracker.maxfixationtime
eyetracker.maxleftpupilheight
eyetracker.maxleftpupilwidth
eyetracker.maxpupilheight
eyetracker.maxpupilwidth
eyetracker.maxrightpupilheight
eyetracker.maxrightpupilwidth
eyetracker.meanpupilheight
eyetracker.meanpupilwidth
eyetracker.minfixationtime
eyetracker.minleftpupilheight
eyetracker.minleftpupilwidth
eyetracker.minpupilheight
eyetracker.minpupilwidth
eyetracker.minrightpupilheight
eyetracker.minrightpupilwidth
eyetracker.plugin
eyetracker.saccadethreshold
eyetracker.saccadethreshold

Functions

None.

Remarks

Examples

The following defines an eyetracker element that connects to a SR Research EyeLink eyetracker at the given network ip address.

<eyetracker>
/ plugin = "srresearch"
/ ipaddress = "168.192.0.22"
</eyetracker>

The following defines a text element that displays the current width of the right pupil:

<text rightpupil>
/ items = ("Right Pupil Width: <% eyetracker.lastrightpupilwidth %>")
</text>


html element

The html element allows HTML pages to be displayed as stimuli on a trial.

Syntax

<html htmlname>
/ erase = true(red value, green value, blue value) or true(color value) or true(color name) or false
/ halign = alignment
/ hposition = x expression
/ items = itemname or ("item", "item", "item",... ) or ("path", "path", "path",... )
/ monitor = integer
/ onanimate = [expression; expression; expression; ...]
/ onprepare = [expression; expression; expression; ...]
/ position = (x value, y value)
/ resetinterval = integer
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(listname) or listname
/ showborders = boolean
/ showscrollbars = boolean
/ size = (width variable, height variable)
/ valign = alignment
/ voiceover = boolena(language, gender, age, rate)
/ vposition = y expression
</html>

Properties

html.htmlname.currentindex
html.htmlname.currentitem
html.htmlname.currentvalue
html.htmlname.erase
html.htmlname.erasecolor
html.htmlname.erasecolorblue
html.htmlname.erasecolorgreen
html.htmlname.erasecolorred
html.htmlname.height
html.htmlname.hposition
html.htmlname.itemcount
html.htmlname.items
html.htmlname.monitor
html.htmlname.name
html.htmlname.nextindex
html.htmlname.nextvalue
html.htmlname.resetinterval
html.htmlname.selectedcount
html.htmlname.showborders
html.htmlname.showscrollbars
html.htmlname.skip
html.htmlname.stimulusonset
html.htmlname.timestamp
html.htmlname.typename
html.htmlname.unselectedcount
html.htmlname.voiceover
html.htmlname.vposition
html.htmlname.width

Functions

html.htmlname.appenditem
html.htmlname.clearitems
html.htmlname.insertitem
html.htmlname.item
html.htmlname.removeitem
html.htmlname.resetselection
html.htmlname.setitem

Remarks

The html element is a type of stimulus (like text, pictures, sound, videos, etc.) that can be displayed on the screen by trial. A given html element can consist of a set of HTML pages that can be selected randomly or in fixed sequence. The element also specifies the size and position of the html page on the screen.

The content of the HTML file can include dynamically evaluated expressions by inserting the expression into the HTML surrounded by <% and %>. For example, the IP address of the current computer could be reported in an HTML page by embedding <% computer.ipaddress.1 %> in the desired location in the page.

Examples

The following randomly selects from 3 html files and displays the page on the upper left quadrant of the screen.

<html profiles>
/ items = ("profile1.htm", "profile2.htm", "profile3.htm")
/ position = (0, 0)
/ size = (25%, 25%)
</html>


parameters element

The parameters element contains settings that can be used to alter the behavior or mode of the script.

Syntax

<parameters>
/ parametername1
/ parametername2
/ parametername3
</parameters>

Properties

parameters.name
parameters.parametername1
parameters.parametername2
parameters.parametername3
parameters.typename

Functions

None.

Remarks

The parameters element is where a script's customizable settings are defined. For example, a script that enables administrators to change the total time of a test may define a "totaltesttime" parameter that can be set to the total number of milliseconds a test will run before ending. Users of the test can then adjust the time according to their needs simply by setting the parameter. Parameters can also be set by <a href="../elements/batch.htm">batch elements </a> in cases where a script is run as part of a batch.

Examples

The following defines and initializes 3 parameters controling the win and loss stakes for a gambling task, as well as the maximum amount that can be one.

<parameters>
/ rewardamount=10
/ penaltyamount=5
/ maxwinnings=500
</parameters>

The following defines a parameter that determines whether to show the respondent a performance feedback summary.

<parameters>
/ showfeedback=true
</parameters>


slidertrial element

The slidertrial element is a specialized trial element for gathering ratings using a slider are input.

Syntax

<slidertrial slidertrialname>
/ beginresponseframe = integer expression
/ beginresponsetime = integer expression
/ branch = [if expression then event]
/ buttonlabel = "string"
/ correctmessage = false or true(stimulusname, duration)
/ correctresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
/ datastreams = (eyetracker) or eyetracker or false
/ defaultresponse = "text" or property or expression
/ errormessage = false or true(stimulusname, duration)
/ increment = integer
/ iscorrectresponse = [expression; expression; expression; ...]
/ isvalidresponse = [expression; expression; expression; ...]
/ labels = ("label", "label", "label", ...)
/ monkeyresponse = ("string", "string",...) or (scancode, scancode, ...) or (property, property, ...) or [expression; expression; expression;...]
/ navigationbuttonfontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ numframes = integer
/ ontrialbegin = [expression; expression; expression; ...]
/ ontrialend = [expression; expression; expression; ...]
/ orientation = layout
/ position = (x value, y value)
/ posttrialpause = integer expression
/ posttrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ pretrialpause = integer expression
/ pretrialsignal = (modality, signal) or (mouse, stimulusname) or (mouse, mouseevent)
/ quit = [expression; expression; expression; ...]
/ range = (minimum, maximum)
/ recorddata = boolean
/ required = boolean
/ response = responsename or timeout(milliseconds) or window(center, width, stimulusname) or responsemode
/ responsefontstyle = ("face name", height, bold, italic, underline, strikeout, quality, character set)
/ responseinterrupt = mode
/ responsemessage = (responsevalue, stimulusname, duration)
/ responsetrial = (response, trialname)
/ screencapture = boolean
/ showmousecursor = boolean
/ showticks = boolean
/ size = (width variable, height variable)
/ skip = [expression; expression; expression; ...]
/ stimulusframes = [framenumber = stimulusname, stimulusname, ...; framenumber = stimulusname, ...] or [framenumber = list.name] or [framenumber = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stimulustimes = [time = stimulusname, stimulusname, ...; time = stimulusname, ...] or [time = list.name] or [time = selectionmode(stimulusname, stimulusname, stimulusname, ...)]
/ stop = [expression; expression; expression; ...]
/ timeout = integer expression
/ trialduration = integer expression
/ txcolor = (red value, green value, blue value) or color name or color value
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word", "word", ...) or (keyword) or (property, property, ...)
</slidertrial>

Properties

slidertrial.slidertrialname.beginresponseframe
slidertrial.slidertrialname.beginresponsetime
slidertrial.slidertrialname.buttonlabel
slidertrial.slidertrialname.correct
slidertrial.slidertrialname.correctcount
slidertrial.slidertrialname.correctstreak
slidertrial.slidertrialname.count
slidertrial.slidertrialname.defaultresponse
slidertrial.slidertrialname.error
slidertrial.slidertrialname.errorcount
slidertrial.slidertrialname.errorstreak
slidertrial.slidertrialname.fontheight
slidertrial.slidertrialname.height
slidertrial.slidertrialname.heightpct
slidertrial.slidertrialname.heightpx
slidertrial.slidertrialname.inwindow
slidertrial.slidertrialname.latency
slidertrial.slidertrialname.maxlatency
slidertrial.slidertrialname.meanlatency
slidertrial.slidertrialname.medianlatency
slidertrial.slidertrialname.minlatency
slidertrial.slidertrialname.name
slidertrial.slidertrialname.percentcorrect
slidertrial.slidertrialname.percentinwindow
slidertrial.slidertrialname.posttrialpause
slidertrial.slidertrialname.pretrialpause
slidertrial.slidertrialname.required
slidertrial.slidertrialname.response
slidertrial.slidertrialname.responsefontheight
slidertrial.slidertrialname.responsetext
slidertrial.slidertrialname.responsex
slidertrial.slidertrialname.responsey
slidertrial.slidertrialname.sdlatency
slidertrial.slidertrialname.sumlatency
slidertrial.slidertrialname.timestamp
slidertrial.slidertrialname.totalcorrectcount
slidertrial.slidertrialname.totalcount
slidertrial.slidertrialname.totalerrorcount
slidertrial.slidertrialname.totalmaxlatency
slidertrial.slidertrialname.totalmeanlatency
slidertrial.slidertrialname.totalmedianlatency
slidertrial.slidertrialname.totalminlatency
slidertrial.slidertrialname.totalnuminwindow
slidertrial.slidertrialname.totalpercentcorrect
slidertrial.slidertrialname.totalpercentinwindow
slidertrial.slidertrialname.totalsdlatency
slidertrial.slidertrialname.totalsumlatency
slidertrial.slidertrialname.totaltrialcount
slidertrial.slidertrialname.totalvarlatency
slidertrial.slidertrialname.trialcode
slidertrial.slidertrialname.trialcount
slidertrial.slidertrialname.trialduration
slidertrial.slidertrialname.typename
slidertrial.slidertrialname.varlatency
slidertrial.slidertrialname.width
slidertrial.slidertrialname.widthpct
slidertrial.slidertrialname.widthpx
slidertrial.slidertrialname.xpct
slidertrial.slidertrialname.xpx
slidertrial.slidertrialname.ypct
slidertrial.slidertrialname.ypx

Functions

slidertrial.slidertrialname.clearstimulusframes
slidertrial.slidertrialname.insertstimulusframe
slidertrial.slidertrialname.insertstimulustime
slidertrial.slidertrialname.removestimulusframe
slidertrial.slidertrialname.removestimulustime
slidertrial.slidertrialname.resetstimulusframes
slidertrial.slidertrialname.setstimulusframe
slidertrial.slidertrialname.setstimulustime
slidertrial.slidertrialname.stimulusframe
slidertrial.slidertrialname.stimulustime

Remarks

The slidertrial element controls the timing and the content of stimulus presentation as well as how responses are obtained. Every time a slidertrial element is executed, a line of data is written to the raw data file.

The respondent can advance past this trial by placing the slider and hitting ENTER or clicking the response button if response input is set to mouse.

Examples

The following displays a text entry box at the bottom of the screen, sets the line length to 40 characters, and the total number of lines in the box to 3:

<slidertrial question>
/ stimulusframes=[1=sometext]
/ position = (50, 90)
/ linelength = 40
/ numlines = 3
</slidertrial>


usermanual element

The usermanual element is used to describe and document the script.

Syntax

<usermanual>
This element has no attributes
</usermanual>

Properties

None.

Functions

None.

Remarks

Examples

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


Functions

The Inquisit expression language includes a number of commonly used mathematical functions that perform various calculations, from rounding decimal numbers to the nearest integer to computing a number's arctangent.

Function | Description | Examples | Result
abs Returns the absolute value of the argument

abs(-1)

 1
mod Returns the floating point remainder when the first argument is divided by the second mod(1.33, 1)
mod(9, 4) 		0.33
1.0
ipart Returns the integer portion of a floating point argument

ipart(3.14)

 3
fpart Returns the fractional portion of a floating point argument

fpart(3.14)

 0.14
min Returns the minimum value of the arguments min(0, 1, 2, 3)
min(-100, -1000) 		0
-1000
max Returns the maximum value of arguments max(0, 1, 2, 3)
max(-100, -1000) 		3
-100
pow Returns the first argument to the power of the second argument pow(3, 3)
pow(10, 2) 		27
100
sqrt | Returns the square root of the argument | sqrt(4) | 2
sin | Returns the sine of the argument | sin(1.570796) | 1
sinh Returns the hyperbolic sine of the argument sinh(1.570796) 2.301299
asin | Returns the arcsine of the argument
cos | Returns the cosine of the argument | cos(1.570796) | 0
cosh | Returns the hyperbolic cosine of the argument | cosh(1.570796) | 2.509178
acos | Returns the arccosine of the argument
tan | Returns the tangent of the argument | tan(0.785398) | 1
tanh | Returns the hyperbolic tangent of the argument | tanh(1.000000) | 0.761594
atan | Returns the arctangent of the argument | atan(5.0) | 1.373401
atan2 | Returns the arctangent of the first argument divided by the second argument | atan2(5.0 / 5.0) | 0.99669
log | Returns the base 10 logarithm of the argument | log(9000.00) | 9.104980
ln | Returns the natural logarithm of the argument | ln(9000.00) | 3.954243
exp | Returns the exponential values of the argument | exp(2.302585) | 10.0
logn | Returns the logarithm of the first argument using the second argument as the base
round Rounds the argument to the nearest integer round(1.49)
round(1.50) 		1
2
ceil Rounds the argument up to the nearest integer ceil(1.49)
ceil(1.50) 		2
2
floor Rounds the argument down to the nearest integer floor(1.49)
floor(1.50) 		1
1
deg | Converts an argument from radians to degrees
rad | Converts an argument from degrees to radians
rand Generates a random number within a given range rand(0, 1)
rand(0, 100) 		0.55678
97.12314
randgaussian Generates a random number from a guassian distribution with the given mean and sd randgaussian(50, 16)
randgaussian(0, 10) 		55
-4.33

Examples

The following block rounds the mean latency down to an integer and saves it to a value:

<block myblock>
/ trials=[1-5=practicetrial; 6-10=testtrial)]
/ onblockend=[values.simplemean = round(block.myblock.meanlatency)]
</block>

The following block finds the best performance from 3 different trial types and saves the result to a value.

<block myblock>
/ trials=[1-300=noreplace(t1, t2, t3)]
/ onblockend=[values.bestscore = max(trial.t1.percentcorrect, trial.t2.percentcorrect, trial.t3.percentcorrect)]
</block>

Selection Functions

The following table lists functions for selecting randomly or otherwise from a pool of values.

Function Description Examples
noreplace Randomly selects without replacement from a set of values noreplace(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
noreplace(0, 2.5, 5, 7.5, 10)
noreplacecorrect Randomly selects without replacement if a correct response is given and with replacement if an incorrect response is given

noreplacecorrrect(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
noreplacecorrect(0, 2.5, 5, 7.5, 10)
noreplaceerror Randomly selects without replacement if an incorrect response is given and with replacement if a correct response is given

noreplaceerror(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
noreplaceerror(0, 2.5, 5, 7.5, 10)
noreplacenorepeat Randomly selects without replacement or consecutive selection fo a value noreplacenorepeat(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
noreplacenorepeat(0, .3333333, .6666667, 1)
replace Randomly selects with replacement from a set of values replace(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
replace(0, .3333333, .6666667, 1)
replacenorepeat Randomly selects with replacement if an incorrect response is given and with replacement if a correct response is given replacenorepeat(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
replacenorepeat(0, .3333333, .6666667, 1)
sequence Selects the items in the specified order sequence(10, 9, 8, 7, 6, 5, 4, 3, 2, 1)
sequence(2, 4, 6, 8, 10)
getitem Returns the item at the specified index. getitem(counter.deck, 1)
getitem(text.presenteditems, text.presenteditems.itemcount)
getitem(item.useritems, item.useritems.itemcount - 1)
setitem Sets the item at the specified index to the specified value. setitem(counter.deck, values.currentcard, 10)
setitem(text.presenteditems, text.targets.currentitem, text.presenteditems.itemcount)
setitem(item.useritems, values.firstresponse, 1)
insert Inserts an item of the specified value into the specified index. insert(counter.deck, values.currentcard, 2)
insert(text.presenteditems, text.targets.currentitem, 1)
insert(item.useritems, values.firstresponse, 1)
remove Removes item at the specified index. remove(counter.deck, 10)
remove(text.presenteditems, text.presenteditems.itemcount)
remove(item.useritems, item.useritems.itemcount - 1)
clear Removes all items from a stimulus or counter. clear(counter.deck)
clear(text.response)
clear(item.useritems)
reset Resets a counter. If the counter selects without replacement, all items are returned to the selection pool. If selection is sequential, the first item in the pool is selected next. reset(counter.odds)
reset(picture.faces)

Examples

The following stimulus will be presented in a randomly selected position on the screen:

<picture mypic>
/ items = ("foo.jpg")
/ hposition = replace(0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%)
/ vposition = replace(0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%)
</picture>

The following trial has a response timeout that gets 50 milliseconds shorter each time the trial is run.

<trial mytrial>
/ stimulustimes = [1=target]
/ timeout = sequence(1000, 950, 900, 850, 800, 750, 700, 650, 600, 550, 500)
/ response = ("a", "b")
</block>

String Functions

The following table lists functions for analyzing and manipulating strings of text.

Function | Description | Examples | Result
tolower Converts all alphabetic characters in the string to lower case. tolower("TURNIPS")
tolower("Sales@Server.Com") 		turnips
sales@server.com
toupper Converts all alphabetic characters in the string to upper case. toupper("turnips")
 TURNIPS
capitalize Converts the first letter of each word in the string to upper case. This is useful for presenting proper nouns entered by the participant. capitalize("john")
capitalize("bill gates")
capitalize(tolower("dIET cOKE")) 		John
Bill Gates
Diet Coke
concat Contenates two strings together.

concat("basket", "ball")
concat(concat("United", " "), "States")

 basketball
United States
search Searches the first string for any occurrence of the second string. If the string is found, it returns the zero based index of the first occurrence. If the string is not found, it returns -1. search("benjamin", "ben")
search("benjamin", "benji")
search("benjamin", "jamin") 		0
-1
3
replaceall Searches the first string for all occurrences of the second string and replaces them with the third stringFinds all occurrences of the Randomly selects with replacement from a set of values replaceall("Hello %name%", "%name%", "Julia")
replaceall("old old old", "old", "new") 		Hello Julia
new new new
contains Returns true if the first string contains the second string, otherwise false.

contains("sales@server.com", "@")
containst("https://www.millisecond.com", "@")

 true
false
startswith Returns true if the first string starts with the second string. startswith("https://www.millisecond.com", "http://")
startswith("Four score and seven years ago", " ") 		true
false
endswith Returns true if the first string ends with the second string. endswith("All's well that ends well.", ".")
endswith("Why did the chicken cross the road", "?") 		true
false
substring | Returns a portion of the string starting at the specified start index and of the specified length | substring("www.millisecond.com", 4, 11) | millisecond
trim Trims the characters in the second string from the beginning and end of the first string trim(" hello ", " ")
 hello
trimright Trims the characters in the second string from the right side of the first string trimright("Get into the chopper!", "!?.")
 Get into the chopper
trimleft Trims the characters in the second string from the left side of the first string trimleft("$1.00", "$"))
 1.00
length Returns the length of the string length("123")
length("54321") 		3
5
format An advanced function that allows string substitutions and formatting of decimals using format strings as used by the C function printf. format("You have %i points", 16)
format("%.2f", 3.14159265)
 You have 16 points
3.14
evaluate An function that evaluates a string as an expression and returns the result. evaluate("(1 + 6) * 5")
evaluate(text.mathproblems.currentitem) - evaluate(text.mathproblems.currentitem)
 35
0

Examples

The following stimulus will be presented in a randomly selected position on the screen:

<surveypage mypage>
/ caption = format
/ questions = [1=firsname; 2=lastname]
/ ontrialend = [text.firstname.item = capitalize(lower(textbox.firstname.response))]
</surveypage>

The following trial has a response timeout that gets 50 milliseconds shorter each time the trial is run.

<block myblock>
/ trials = [1-100=test]
/ branch = [if( contains(textbox.college.response, "Cornell") == true ) block.next]
</block>

Performance Metric Functions

The following table lists functions that calculate performance metrics and statistics. Many elements contain properties corresponding to these functions. The benefit of the functions is that they can compute performance metrics for combinations of elements, whereas the property returns the metric for its element only.

Consider, for example, a task involving two types of trials, a target trial and distractor trial. Using the totalpercentcorrect property, we can get the percent of correct responses on either trial element. Specifically, the expression "trial.target.totalpercentcorrect" returns the percentage for target trials, and "trial.distractor.totalpercentcorrect" returns percentage for distractor trials. What if we want the percent correct for both types of trials. For this, we can use the totalpercentcorrect function. Specifically, the expression "totalpercentcorrect(trial.target, trial.distractor)" will return the percentage for the combined set of trials. These functions can be used to compute metrics for any arbitrary combination of elements.

Function | Description | Examples
correctcount | number of correct responses in the current block | correctcount(trial.targeta, trial.targetb, trial.targetc)
count | number of times the item was run within the current block | count(trial.foo, trial.bar, trial.foobar)
errorcount | number of incorrect responses in the current block | errorcount(trial.red, trial.green, trial.blue)
inwindowcount | number of responses occurring within the response window in the current block | inwindowcount(trial.category1, trial.category2)
maxlatency | maximum response latency in the current block | maxlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
meanlatency | mean response latency in the current block | meanlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
minlatency | minimum response latency in the current block | minlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
notinwindowcount | number of responses occurring outside the response window in the current block | notinwindowcount(trial.category1, trial.category2)
percentcorrect | percent of correct responses in the current block | percentcorrect(trial.stroopredred, trial.stroopgreengreen, trial.stroopyellowyellow, trial.stroopblueblue)
sdlatency | standard deviation of response latencies in the current block | sdlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
sumlatency | sum of response latencies in the current block | sumlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
selectedcount | number of selected items | selectedcount(item.targets, item.distractors)
totalcorrectcount | total number of correct responses | totalcorrectcount(trial.critical, trial.test)
totalcount | total number of times the item was run so far | totalcount(trial.soa100, trial.soa300, trial.soa500)
totalerrorcount | total number of incorrect responses | totalerrorcount(trial.critical, trial.test)
totalinwindowcount | total number of responses occurring within the response window | totalinwindowcount(trial.congruent, trial.incongruent, trial.neutral)
totalmaxlatency | maximum response latency | totalmaxlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
totalmeanlatency | mean response latency | totalmeanlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
totalminlatency | minimum response latency | totalminlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
totalnotinwindowcount | total number of responses outside the response window | totalnotinwindowcount(trial.congruent, trial.incongruent, trial.neutral)
totalpercentcorrect | percent of correct responses | totalpercentcorrect(trial.bigtargeta, trial.bigtargetb, trialbigtargetc)
totalpercentinwindow | percent of responses within the response window | totalpercentinwindow(trial.congruent, trial.incongruent, trial.neutral)
totalsdlatency | standard deviation of response latencies | totalsdlatency(block.critical1, block.critical2)
totalsumlatency | total sum of response latencies | totalsumlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
totaltrialcount | total number of trials run | totaltrialcount(block.training1, block.training2)
totalvarlatency | variance of response latencies | totalvarlatency(trial.leftlow, trial.lefthigh, trial.leftmid)
trialcount | number of trials run within the current block | trialcount(trial.congruent, trial.incongruent)
unselectedcount | number of unselected items | unselectedcount(picture.target1, picture.target2, picture.target3)
varlatency | variance of response latencies within the current block | varatency(trial.leftlow, trial.lefthigh, trial.leftmid)


abort function

Aborts the script.

Member of

<script>

Syntax

element.name.abort(abortbatch)

Parameters

Name | Type | Description
abortbatch | boolean | Optional. Whether the entire batch should be aborted.

Examples

The following aborts the script at the end of an informed consent trial:

<trial consent>
/ ontrialend= [if ( trail.consent.response == 57 ) script.abort();]
</trial>

The following aborts the script if performance dips below threshold:

<trial sometrial>
/ ontrialend= [if ( trial.sometrial.percentcorrect <= 50% ) script.abort();]
</trial>


abs function

Returns the absolute value of the argument.

Member of

<global>

Syntax

abs(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


acos function

Returns the arccosine of the argument

Member of

<global>

Syntax

acos(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


appenditem function

Inserts the item at the specified index.

Member of

<html>

<item>

<list>

<picture>

<port>

<sound>

<text>

<video>

<xid>

Syntax

element.name.appenditem(value)

Parameters

Name | Type | Description
value | any | The value for the item.

Examples

The following adds an item to the end of the item list of a text stimulus:

<trial sometrial>
/ ontrialend= [text.sometext.appenditem("Hello world!");]
</trial>

The following adds an item to the end of the item list of a list:

<trial sometrial>
/ ontrialend= [list.importantthings.appenditem(values.newvalue);]
</trial>


asin function

Returns the arcsine of the argument

Member of

<global>

Syntax

asin(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


atan function

Returns the arctangent of the argument

Member of

<global>

Syntax

atan(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


atan2 function

Returns the arctangent of the first argument divided by the second argument

Member of

<global>

Syntax

atan2(argument1, argument2)

Parameters

Name | Type | Description
argument1 | number | The number to raise.
argument2 | number | The power to raise to.

Examples

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


capitalize function

Converts the first letter of each word in the string to upper case. This is useful for presenting proper nouns entered by the participant.

Member of

<global>

Syntax

capitalize(s1)

Parameters

Name | Type | Description
s1 | string | The string to capitalize.

Examples

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


ceil function

Rounds the argument up to the nearest integer

Member of

<global>

Syntax

ceil(argument)

Parameters

Name | Type | Description
argument | number | The argument to round up.

Examples

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


chartoscancode function

Converts the given character into a Windows style scancode. This is useful for converting between .

Member of

<computer>

Syntax

element.name.chartoscancode(char)

Parameters

Name | Type | Description
char | string | The character to convert.

Examples

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


clearitems function

Removes all of the element's items.

Member of

<html>

<item>

<list>

<picture>

<port>

<sound>

<text>

<video>

<xid>

Syntax

element.name.clearitems()

Parameters

None.

Examples

The following clears all of the items from a text stimulus:

<trial sometrial>
/ ontrialend= [text.sometext.clearitems();]
</trial>

The following clears all of the items from the selection pool of a list:

<trial sometrial>
/ ontrialend= [list.mylist.clearitems();]
</trial>


clearstimulusframes function

Removes all of the stimuli from the stimulus frames list.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.clearstimulusframes()

Parameters

None.

Examples

The following clears all of the stimuli from a trial:

<trial sometrial>
/ ontrialend= [trial.sometrial.clearstimulusframes();]
</trial>

The following clears all of the stimuli from surveypage:

<surveypage somepage>
/ ontrialend= [surveypage.somepage.clearstimulusframes();]
</trial>


clip function

Member of

<global>

Syntax

Parameters

None.

Examples

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


concat function

Contenates two strings together.

Member of

<global>

Syntax

concat(s1, s2)

Parameters

Name | Type | Description
s1 | string | The first string.
s2 | string | The second string to append to the first.

Examples

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


constant function

Member of

<global>

Syntax

Parameters

None.

Examples

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


contains function

Returns true if the first string contains the second string, otherwise false.

Member of

<global>

Syntax

contains(s1, s2)

Parameters

Name | Type | Description
s1 | string | The string to be searched.
s2 | string | The target string to search for within the first string.

Examples

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


correctcount function

number of correct responses in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


correctstreak function

Member of

<global>

Syntax

Parameters

None.

Examples

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


cos function

Returns the cosine of the argument

Member of

<global>

Syntax

cos(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


cosh function

Returns the hyperbolic cosine of the argument

Member of

<global>

Syntax

cosh(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


count function

number of times the item was run within the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


debugbreak function

Stops script execution and opens the Debugger Watch Window.

Member of

<script>

Syntax

element.name.debugbreak(condition)

Parameters

Name | Type | Description
condition | boolean | Optional. The execution stops if true, otherwise the script continues running.

Examples

The following stops the script if the user responds with the space bar:

<trial consent>
/ ontrialend= [if ( trail.consent.response == 57 ) script.debugbreak();]
</trial>

The following stops the script if performance dips below threshold:

<trial sometrial>
/ ontrialend= [if ( trial.sometrial.percentcorrect <= 50% ) script.debugbreak();]
</trial>

The following stops the script if the number of items in a list is 0:

<trial sometrial>
/ ontrialend= [script.debugbreak(list.probabilities.itemcount == 0);]
</trial>


debugtrace function

This function sends messages to the Inquisit output window during the execution of the script.

Member of

<script>

Syntax

element.name.debugtrace()

Parameters

None.

Examples

The following writes the count of a given trial to the Output Window:

<trial consent>
/ ontrialend= [script.debugtrace(trial.sometrial.count);]
</trial>

The following writes a message to the Output Window when percent correct drops below 50:

<trial sometrial>
/ ontrialend= [if ( trial.sometrial.percentcorrect <= 50% ) script.debugtrace("Percent correct below 50, currently at <% trial.sometrial.percentcorrect %>");]
</trial>


deg function

Converts an argument from radians to degrees

Member of

<global>

Syntax

deg(argument)

Parameters

Name | Type | Description
argument | number | The radians to be converted.

Examples

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


endswith function

Returns true if the first string ends with the second string.

Member of

<global>

Syntax

endswith(s1, s1)

Parameters

Name | Type | Description
s1 | string | The first string.
s1 | string | The second string.

Examples

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


errorcount function

number of incorrect responses in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


errorstreak function

Member of

<global>

Syntax

Parameters

None.

Examples

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


evaluate function

An function that evaluates a string as an expression and returns the result.

Member of

<global>

Syntax

evaluate(s1)

Parameters

Name | Type | Description
s1 | string | The string containing the IQScript syntax to parse.

Examples

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


exp function

Returns the exponential values of the argument

Member of

<global>

Syntax

exp(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


floor function

Rounds the argument down to the nearest integer

Member of

<global>

Syntax

floor(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


format function

An advanced function that allows string substitutions and formatting of decimals using format strings as used by the C function printf.

Member of

<global>

Syntax

format(formatstring, arg1, arg2)

Parameters

Name | Type | Description
formatstring | string | The string specifying the format of the result.
arg1 | any | The first argument to be inserted into the formatting string.
arg2 | any | The second argument to be inserted into the formatting string.

Examples

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


fpart function

Returns the fractional portion of a floating point argument.

Member of

<global>

Syntax

fpart(argument)

Parameters

Name | Type | Description
argument | float | The argument to get the value of.

Examples

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


getitem function

Returns the item at the specified index.

Member of

<global>

Syntax

getitem(index)

Parameters

Name | Type | Description
index | integer | The index of the item to be returned.

Examples

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


getmmx function

Returns the horizontal size in mm corresponding to the pixels.

Member of

<display>

Syntax

element.name.getmmx(pixels, monitor)

Parameters

Name | Type | Description
pixels | integer | The horizontal pixels.
monitor | integer | The monitor number (optional).

Examples

The following displays the horizontal size in mm corresponding to 300 pixels on the second monitor:

<text sometext>
/ items= ("mm = <% display.getmmx(300, 2) %>")
</text>

The following displays the horizontal size in mm corresponding to last mouse coordinate on the default (first) monitor:

<page somepage>
mm = <% display.getmmx(mouse.x) %>
</page>


getmmy function

Returns the vertical size in mm corresponding to the pixels.

Member of

<display>

Syntax

element.name.getmmy(pixels, monitor)

Parameters

Name | Type | Description
pixels | integer | The vertical pixels.
monitor | integer | The monitor number (optional).

Examples

The following displays the vertical size in mm corresponding to 300 pixels on the second monitor:

<text sometext>
/ items= ("mm = <% display.getmmy(300, 2) %>")
</text>

The following displays the vertical size in mm corresponding to last mouse coordinate on the first (default) monitor:

<page somepage>
mm = <% display.getmmy(mouse.y) %>
</page>


getpercentx function

Returns the horizontal percentage corresponding to the pixels.

Member of

<display>

Syntax

element.name.getpercentx(percent, monitor)

Parameters

Name | Type | Description
percent | integer | The horizontal pixels.
monitor | integer | The monitor number (optional).

Examples

The following displays the horizontal percentage corresponding to 300 pixels on the second monitor:

<text sometext>
/ items= ("percentage = <% display.getpercentx(300, 2) %>")
</text>

The following displays the horizontal percentage corresponding to last mouse coordinate on the default (first) monitor:

<page somepage>
percentage = <% display.getpercentx(mouse.x) %>
</page>


getpercenty function

Returns the vertical percentage corresponding to the pixels.

Member of

<display>

Syntax

element.name.getpercenty(percent, monitor)

Parameters

Name | Type | Description
percent | integer | The vertical pixels.
monitor | integer | The monitor number (optional).

Examples

The following displays the vertical percentage corresponding to 300 pixels on the second monitor:

<text sometext>
/ items= ("percentage = <% display.getpercenty(300, 2) %>")
</text>

The following displays the vertical percentage corresponding to last mouse coordinate on the first (default) monitor:

<page somepage>
percentage = <% display.getpercenty(mouse.y) %>
</page>


getpixelsx function

Returns the horizontal pixel corresponding to the given screen percentage.

Member of

<display>

Syntax

element.name.getpixelsx(percent, monitor)

Parameters

Name | Type | Description
percent | integer | The horizontal percentage of the screen.
monitor | integer | The monitor number (optional).

Examples

The following displays the pixel value corresponding to the horizontal center of the screen on the second monitor:

<text sometext>
/ items= ("pixels = <% display.getpixelsx(50, 2) %>")
</text>

The following displays the pixel value corresponding to the right side of the screen on the first (default) monitor:

<page somepage>
pixels = <% display.getpixelsx(100) %>
</page>


getpixelsy function

Returns the vertical pixel corresponding to the given screen percentage.

Member of

<display>

Syntax

element.name.getpixelsy(percent, monitor)

Parameters

Name | Type | Description
percent | integer | The vertical percentage of the screen.
monitor | integer | The monitor number (optional).

Examples

The following displays the pixel value corresponding to the vertical middle of the screen on the second monitor:

<text sometext>
/ items= ("pixels = <% display.getpixelsy(50, 2) %>")
</text>

The following displays the pixel value corresponding to the bottom side of the screen on the first (default) monitor:

<page somepage>
pixels = <% display.getpixelsy(100) %>
</page>


indexof function

Searches the list for a value and returns the index.

Member of

<list>

Syntax

element.name.indexof(value, start)

Parameters

Name | Type | Description
value | expression | The value to search for.
start | integer | Optional. The index where the search starts.

Examples

The following clears all of the items from a text stimulus:

<trial sometrial>
/ ontrialend= [text.sometext.indexof();]
</trial>

The following clears all of the items from the selection pool of a list:

<trial sometrial>
/ ontrialend= [list.mylist.indexof();]
</trial>


insert function

Inserts an item of the specified value into the specified index.

Member of

<global>

Syntax

Parameters

None.

Examples

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


insertitem function

Inserts the item at the specified index.

Member of

<html>

<list>

<picture>

<port>

<sound>

<text>

<video>

<xid>

Syntax

element.name.insertitem(value, index)

Parameters

Name | Type | Description
value | any | The value for the item.
index | integer | The index where the item is inserted. The first item in the list is 1.

Examples

The following inserts the first item of a text stimulus:

<trial sometrial>
/ ontrialend= [text.sometext.insertitem("Hello world!", 1);]
</trial>

The following inserts an item into the middle of the selection pool of a list:

<trial sometrial>
/ ontrialend= [list.mylist.insertitem(values.newvalue, list.mylist.itemcount / 2);]
</trial>


insertstimulusframe function

Adds the stimulus to the specified frame of a trial.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.insertstimulusframe(value, index)

Parameters

Name | Type | Description
value | stimulus | The new stimulus.
index | integer | The index of the frame. The first item in the list is 1.

Examples

The following dynamically adds an error feedback stimulus to the trial if performance dips below 50%:

<trial sometrial>
/ ontrialend= [if (trial.sometrial.percentcorrect <= 50) trial.test.insertstimulusframe(text.errorfeedback, 1); ]
</trial>


insertstimulustime function

Adds the stimulus to the frame of a trial corresponding to the specified time.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.insertstimulustime(value, time)

Parameters

Name | Type | Description
value | stimulus | The new stimulus.
time | integer | The time in milliseconds.

Examples

The following dynamically adds an error feedback stimulus to the trial if performance dips below 50%:

<trial sometrial>
/ ontrialend= [if (trial.sometrial.percentcorrect <= 50) trial.test.insertstimulustime(text.errorfeedback, 0); ]
</trial>


inwindowcount function

number of responses occurring within the response window in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


inwindowstreak function

Member of

<global>

Syntax

Parameters

None.

Examples

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


ipart function

Returns the integer portion of a floating point argument

Member of

<global>

Syntax

ipart(argument)

Parameters

Name | Type | Description
argument | float | The argument to get the value of.

Examples

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


item function

Returns the item at the specified index.

Member of

<html>

<list>

<picture>

<port>

<sound>

<text>

<video>

<xid>

Syntax

element.name.item(index)

Parameters

Name | Type | Description
index | integer | The index of the item to get. The first item in the list is 1.

Examples

The following displays an item from one text element in the item from another text element:

<text sometext>
/ items= ("current category = <% text.someothertext.item(1) %>")
</text>

The following displays a stimulus item in an instruction page:

<page somepage>
current category  = <% text.current.item(10) %>
</page>


length function

Returns the number of characters in a string

Member of

<global>

Syntax

length(s1)

Parameters

Name | Type | Description
s1 | string | The string to compute the length.

Examples

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


ln function

Returns the natural logarithm of the argument

Member of

<global>

Syntax

ln(argument)

Parameters

Name | Type | Description
argument | number | The positive number for which you want the logarithm.

Examples

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


log function

Returns the base 10 logarithm of the argument

Member of

<global>

Syntax

log(argument)

Parameters

Name | Type | Description
argument | number | The positive number for which you want the logarithm.

Examples

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


logn function

Returns the exponential values of the argument

Member of

<global>

Syntax

logn(argument1, base)

Parameters

Name | Type | Description
argument1 | number | The positive number for which you want the logarithm.
base | number | The base of the logarithm.

Examples

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


max function

Returns the maximum value of arguments

Member of

<global>

Syntax

max(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


maxlatency function

maximum response latency in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


meanlatency function

mean response latency in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


medianlatency function

media response latency in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


min function

Returns the minimum value of the arguments

Member of

<global>

Syntax

min(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


minlatency function

minimum response latency in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


mod function

Returns the floating point remainder when the first argument is divided by the second

Member of

<global>

Syntax

mod(argument1, argument2)

Parameters

Name | Type | Description
argument1 | number | The number to divide.
argument2 | number | The number to divide by.

Examples

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


noreplace function

Randomly selects without replacement from a set of values

Member of

<global>

Syntax

Parameters

None.

Examples

Randomly selects without replacement from a set of values:

noreplace(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

noreplace(0, 2.5, 5, 7.5, 10)


noreplacecorrect function

Randomly selects without replacement if a correct response is given and with replacement if an incorrect response is given

Member of

<global>

Syntax

Parameters

None.

Examples

Randomly selects without replacement if a correct response is given and with replacement if an incorrect response is given from a set of values:

noreplacecorrrect(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

noreplacecorrect(0, 2.5, 5, 7.5, 10)


noreplaceerror function

Randomly selects without replacement if an incorrect response is given and with replacement if a correct response is given

Member of

<global>

Syntax

Parameters

None.

Examples

Randomly selects from a set of values without replacement if an incorrect response is given and with replacement if a correct response is given:

noreplaceerror(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

noreplaceerror(0, 2.5, 5, 7.5, 10)


noreplacenorepeat function

Randomly selects without replacement or consecutive selection of a value

Member of

<global>

Syntax

Parameters

None.

Examples

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


notinwindowcount function

number of responses occurring outside the response window in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


notinwindowstreak function

Member of

<global>

Syntax

Parameters

None.

Examples

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


pause function

Pause a clock that is in timer or stopwatch mode.

Member of

<clock>

Syntax

element.name.pause()

Parameters

None.

Examples

The following resets the time of a stopwatch:

<trial sometrial>
/ ontrialend= [clock.timespent.pause();]
</trial>

The following resets the time of a timer:

<trial sometrial>
/ ontrialend= [clock.timeremaining.pause();]
</trial>


percentcorrect function

percent of correct responses in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


percentinwindow function

percent of responses within the response window

Member of

<global>

Syntax

Parameters

None.

Examples

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


pofz function

Returns the cumulative probability for the given Z score.

Member of

<global>

Syntax

pofz(z score)

Parameters

Name | Type | Description
z score | number | A z score from -6 to 6.

Examples

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


pow function

Returns the first argument to the power of the second argument

Member of

<global>

Syntax

pow(argument1, argument2)

Parameters

Name | Type | Description
argument1 | number | The number to raise.
argument2 | number | The power to raise to.

Examples

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


rad function

Converts an argument from degrees to radians

Member of

<global>

Syntax

rad(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


rand function

Generates a random number from a uniform distribution within a given range

Member of

<global>

Syntax

rand(min, max)

Parameters

Name | Type | Description
min | number | The bottom of the range.
max | number | The top of the range.

Examples

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


randbernoulli function

Generates a random number according to the discrete probability function.

Member of

<global>

Syntax

randbernoulli(p)

Parameters

Name | Type | Description
p | number | The probability of generating true.

Examples

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


randbinomial function

Generates a random number representing the number of successes in a sequence of n yes/no experiments, each of which succeeds with probability p.

Member of

<global>

Syntax

randbinomial(n, p)

Parameters

Name | Type | Description
n | integer | The number of trials.
p | number | The probability of a success.

Examples

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


randchisquared function

Generates a random number from a Chi-squared distribution with a given degrees of freedom.

Member of

<global>

Syntax

randchisquared(n)

Parameters

Name | Type | Description
n | number | The degrees of freedom.

Examples

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


randexponential function

Generates a random non-negative number from an exponential distribution with a given rate parameter.

Member of

<global>

Syntax

randexponential(lambda)

Parameters

Name | Type | Description
lambda | number | The rate parameter.

Examples

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


randgamma function

Generates a random number from a gamma distribution with a given shape and scale.

Member of

<global>

Syntax

randgamma(alpha, beta)

Parameters

Name | Type | Description
alpha | number | The shape of the distribution.
beta | number | The scale of the distribution.

Examples

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


randgaussian function

Generates a random number from a gaussian distribution with a given mean and standard deviation.

Member of

<global>

Syntax

randgaussian(mean, sd)

Parameters

Name | Type | Description
mean | number | The mean of the distribution.
sd | number | The standard deviation of the distribution.

Examples

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


randgeometric function

Generates a random non-negative integer values from a geometric distribution representing the number of trials needed to obtain a single success.

Member of

<global>

Syntax

randgeometric(p)

Parameters

Name | Type | Description
p | number | The probability of success on a given trial.

Examples

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


randlognormal function

Generates a random number greater than zero from a log-normal distribution with a given scale and shape.

Member of

<global>

Syntax

randlognormal(m, s)

Parameters

Name | Type | Description
m | number | The log-scale.
s | number | The shape.

Examples

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


random function

Member of

<global>

Syntax

Parameters

None.

Examples

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


randpoisson function

Generates a random non-negative integers from a poisson distribution with the given mean.

Member of

<global>

Syntax

randpoisson(mean)

Parameters

Name | Type | Description
mean | number | The mean of the distribution.

Examples

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


removeitem function

Removes an item from the list.

Member of

<html>

<list>

<picture>

<port>

<sound>

<text>

<video>

<xid>

Syntax

element.name.removeitem(index)

Parameters

Name | Type | Description
index | integer | The index of the item to remove. The first item in the list is 1.

Examples

The following removes the first item from a text stimulus:

<trial sometrial>
/ ontrialend= [text.sometext.removeitem(1);]
</trial>

The following removes the last item from the selection pool of a list:

<trial sometrial>
/ ontrialend= [list.mylist.removeitem(list.mylist.itemcount);]
</trial>


removestimulusframe function

Removes any stimuli at the specified stimulus frame.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.removestimulusframe(index)

Parameters

Name | Type | Description
index | integer | The index of the stimulus to remove. The first item in the list is 1.

Examples

The following removes the first frame of stimuli from a trial:

<trial sometrial>
/ ontrialend= [trial.mytrial.removestimulusframe(1);]
</trial>


removestimulustime function

Removes all stimuli at the stimulus frame corresponding to the specified time.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.removestimulustime(time)

Parameters

Name | Type | Description
time | integer | The time in milliseconds.

Examples

The following removes the frame of stimuli from a trial corresponding to 1000 ms:

<trial sometrial>
/ ontrialend= [trial.mytrial.removestimulustime(1000);]
</trial>


replace function

Randomly selects with replacement from a set of values

Member of

<global>

Syntax

Parameters

None.

Examples

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


replaceall function

Searches the first string for all occurrences of the second string and replaces them with the third string.

Member of

<global>

Syntax

replaceall(s1, s2, s3)

Parameters

Name | Type | Description
s1 | string | The string to be searched.
s2 | string | The string to be replaced.
s3 | string | The replacement string.

Examples

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


replacenorepeat function

Member of

<global>

Syntax

Parameters

None.

Examples

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


reset function

Resets an element to its original state when the script was first parsed.

Member of

<global>

Syntax

reset(list)

Parameters

Name | Type | Description
list | element | An item, stimulus, or list element.

Examples

The following resets the items from a text stimulus:

<trial sometrial>
/ ontrialend= [item.targets.reset();]
</trial>

The following resets the items from the selection pool of a list:

<trial sometrial>
/ ontrialend= [list.options.reset();]
</trial>


reset function

Resets an element to its original state when the script was first parsed.

Member of

<item>

<list>

Syntax

element.name.reset()

Parameters

None.

Examples

The following resets the items from a text stimulus:

<trial sometrial>
/ ontrialend= [item.targets.reset();]
</trial>

The following resets the items from the selection pool of a list:

<trial sometrial>
/ ontrialend= [list.options.reset();]
</trial>


resetselection function

Replaces all selected items into the selection pool of a list or stimulus.

Member of

<html>

<list>

<picture>

<port>

<sound>

<text>

<video>

<xid>

Syntax

element.name.resetselection()

Parameters

None.

Examples

The following resets the selection pool of a text stimulus:

<trial sometrial>
/ ontrialend= [text.sometext.resetselection();]
</trial>

The following resets the items from the selection pool of a list:

<trial sometrial>
/ ontrialend= [list.groceries.resetselection();]
</trial>


resetstimulusframes function

Resets the stimulus frames for a trial to their original state when the script was first parsed.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.resetstimulusframes()

Parameters

None.

Examples

The following resets all of the stimuli from a trial:

<trial sometrial>
/ stimulusframes = [1=fmask;2=prime;3=bmask;7=target]
/ ontrialend= [trial.sometrial.resetstimulusframes();]
</trial>

The following clears all of the stimuli from surveypage:

<surveypage somepage>
/ ontrialend= [surveypage.somepage.resetstimulusframes();]
</trial>


resettime function

Resets the time of a clock that is in timer or stopwatch mode.

Member of

<clock>

Syntax

element.name.resettime()

Parameters

None.

Examples

The following resets the time of a stopwatch:

<trial sometrial>
/ ontrialend= [clock.timespent.resettime();]
</trial>

The following resets the time of a timer:

<trial sometrial>
/ ontrialend= [clock.timeremaining.resettime();]
</trial>


round function

Rounds the argument to the nearest integer

Member of

<global>

Syntax

round(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


scancodetochar function

Converts the given Windows scancode into a character. This is useful for converting generating text describing what key to press.

Member of

<computer>

Syntax

element.name.scancodetochar(scancode)

Parameters

Name | Type | Description
scancode | number | The scancode to convert.

Examples

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


sdlatency function

standard deviation of response latencies in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


search function

Searches the first string for any occurrence of the second string. If the string is found, it returns the zero based index of the first occurrence. If the string is not found, it returns -1.

Member of

<global>

Syntax

search(s1, s2)

Parameters

Name | Type | Description
s1 | string | The string to be searched.
s2 | string | The string to search for.

Examples

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


select function

Member of

<global>

Syntax

Parameters

None.

Examples

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


selectedcount function

number of selected items

Member of

<global>

Syntax

Parameters

None.

Examples

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


sequence function

Selects the items in the specified order

Member of

<global>

Syntax

Parameters

None.

Examples

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


setitem function

Sets the item at the specified index.

Member of

<list>

<picture>

<port>

<sound>

<text>

<video>

<xid>

Syntax

element.name.setitem(value, index)

Parameters

Name | Type | Description
value | any | The new value for the item.
index | integer | The index of the item to set. The first item in the list is 1.

Examples

The following sets the first item of a text stimulus:

<trial sometrial>
/ ontrialend= [text.sometext.setitem("Hello world!", 1);]
</trial>

The following sets the last item of the selection pool of a list:

<trial sometrial>
/ ontrialend= [list.mylist.setitem(values.newvalue, list.mylist.itemcount);]
</trial>


setitem function

Sets the item of the given element at the given index to the given value.

Member of

<global>

Syntax

setitem(element, value, index)

Parameters

Name | Type | Description
element | object | The element containing the item to be set.
value | any | The new value for the item.
index | integer | The index of the item to set. The first item in the list is 1.

Examples

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


setstimulusframe function

Sets the stimulus at the specified frame of a trial.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.setstimulusframe(value, index)

Parameters

Name | Type | Description
value | stimulus | The new stimulus.
index | integer | The index of the frame. The first item in the list is 1.

Examples

The following dynamically sets the first stimulus frame of a trial:

<trial sometrial>
/ ontrialend= [if (trial.sometrial.response == 50) trial.test.setstimulusframe(text.condition1, 1); ]
</trial>


setstimulustime function

Sets the stimulus at the frame of a trial corresponding to the specified time.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.setstimulustime(value, time)

Parameters

Name | Type | Description
value | stimulus | The new stimulus.
time | integer | The time in milliseconds corresponding to the frame to get.

Examples

The following dynamically adds a stimulus to be presented at 1000 ms to a trial:

<trial sometrial>
/ ontrialend= [if (trial.sometrial.response == 50) trial.test.setstimulustime(text.condition1, 1000); ]
</trial>


sin function

Returns the sine of the argument

Member of

<global>

Syntax

sin(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


sinh function

Returns the hyperbolic sine of the argument

Member of

<global>

Syntax

sinh(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


sort function

Sorts the items in a list.

Member of

<list>

Syntax

element.name.sort(ascending, alphabetic)

or

element.name.sort(ascending, alphabetic)

Parameters

Name | Type | Description
ascending | boolean | Optional. True for ascending order, false for descending order.
alphabetic | boolean | Optional. True for alphabetic sorting, false for numeric sorting.

Examples

The following sorts a list alphabetically in ascending order:

<trial example>
/ ontrialend = [list.names.sort();]
</trial>

The following sorts a list numerically in ascending order:

<trial example>
/ ontrialend = [list.scores.sort(true, false);]
</trial>

The following sorts a list numerically in descending order:

<trial example>
/ ontrialend = [list.topscores.sort(false, false);]
</trial>


sqrt function

Returns the square root of the argument

Member of

<global>

Syntax

sqrt(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


start function

Starts a clock in timer or stopwatch mode that has been paused.

Member of

<clock>

Syntax

element.name.start()

Parameters

None.

Examples

The following restarts a stopwatch:

<trial sometrial>
/ ontrialend= [clock.timespent.start();]
</trial>

The following restarts a timer:

<trial sometrial>
/ ontrialend= [clock.timeremaining.start();]
</trial>


startswith function

Returns true if the first string starts with the second string.

Member of

<global>

Syntax

startswith(s1, s1)

Parameters

Name | Type | Description
s1 | string | The first string.
s1 | string | The second string.

Examples

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


stimulusframe function

Returns the first stimulus presented on the frame at the specified index.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.stimulusframe(index)

Parameters

Name | Type | Description
index | integer | The index of the item to get. The first item in the list is 1.

Examples

The following displays the name of the stimulus presented on the first frame of a trial:

<text sometext>
/ items= ("current category = <% trial.mytrial.stimulusframe(1) %>")
</text>

The following displays the name of the stimulus presented on the tenth frame of a trial:

<page somepage>
current category  = <% trial.mytrial.stimulusframe(10) %>
</page>


stimulustime function

Returns the first stimulus presented on the frame corresponding to the specified time.

Member of

<likert>

<openended>

<slidertrial>

<surveypage>

<trial>

Syntax

element.name.stimulustime(time)

Parameters

Name | Type | Description
time | integer | The time in milliseconds corresponding to the frame to get.

Examples

The following displays the name of the stimulus presented at 100 ms:

<text sometext>
/ items= ("current category = <% trial.mytrial.stimulustime(100) %>")
</text>

The following displays the name of the stimulus presented at 1000 ms:

<page somepage>
current category  = <% trial.mytrial.stimulustime(1000) %>
</page>


substring function

Returns a portion of the string starting at the specified start index and of the specified length

Member of

<global>

Syntax

substring(start, length)

Parameters

Name | Type | Description
start | integer | The zero-based index of first character of the returned substring.
length | integer | The length of the returned substring.

Examples

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


sumlatency function

sum of response latencies in the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


tan function

Returns the tangent of the argument

Member of

<global>

Syntax

tan(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


tanh function

Returns the hyperbolic tangent of the argument

Member of

<global>

Syntax

tanh(argument)

Parameters

Name | Type | Description
argument | number | The argument to get the value of.

Examples

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


tolower function

Converts all alphabetic characters in the string to lowercase.

Member of

<global>

Syntax

tolower(s1)

Parameters

Name | Type | Description
s1 | string | The string to convert to lowercase.

Examples

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


totalcorrectcount function

total number of correct responses

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalcount function

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalerrorcount function

total number of incorrect responses

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalinwindowcount function

total number of responses occurring within the response window

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalmaxlatency function

maximum response latency

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalmeanlatency function

mean response latency

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalmedianlatency function

median response latency

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalminlatency function

minimum response latency

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalnotinwindowcount function

total number of responses outside the response window

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalnumcorrect function

number of correct responses

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalpercentcorrect function

percent of correct responses

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalpercentinwindow function

percent of responses within the response window

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalsdlatency function

standard deviation of response latencies

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalsumlatency function

total sum of response latencies

Member of

<global>

Syntax

Parameters

None.

Examples

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


totaltrialcount function

total number of trials run

Member of

<global>

Syntax

Parameters

None.

Examples

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


totalvarlatency function

variance of response latencies

Member of

<global>

Syntax

Parameters

None.

Examples

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


toupper function

Converts all alphabetic characters in the string to uppercase.

Member of

<global>

Syntax

toupper(s1)

Parameters

Name | Type | Description
s1 | string | The string to convert to uppercase.

Examples

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


trialcount function

number of trials run within the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


trim function

Trims the characters in the second string from the beginning and end of the first string

Member of

<global>

Syntax

trim(s1, s2)

Parameters

Name | Type | Description
s1 | string | The string to be trimmed.
s2 | string | The characters to trim from the first string.

Examples

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


trimleft function

Trims the characters in the second string from the left side of the first string

Member of

<global>

Syntax

trimleft(s1, s2)

Parameters

Name | Type | Description
s1 | string | The string to be trimmed.
s2 | string | The characters to trim from the left of the first string.

Examples

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


trimright function

Trims the characters in the second string from the right side of the first string

Member of

<global>

Syntax

trimright(s1, s2)

Parameters

Name | Type | Description
s1 | string | The string to be trimmed.
s2 | string | The characters to trim from the right of the first string.

Examples

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


unselectedcount function

number of unselected items

Member of

<global>

Syntax

Parameters

None.

Examples

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


varlatency function

variance of response latencies within the current block

Member of

<global>

Syntax

Parameters

None.

Examples

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


zofp function

Returns the Z score for the given cumulative probability.

Member of

<global>

Syntax

zofp(probability)

Parameters

Name | Type | Description
probability | number | A probability from 0 to 1.

Examples

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


anchorlabel property

The collection of anchor labels used by a likert scale.

Member of

<likert>

Remarks

This is a collection property.

Examples

The following displays the label used for the leftmost anchor of a likert scale:

<text sometext>
/ items= ("correct = <% trial.somelikert.anchorlabel.1 %>")
</text>

The following displays the label used for the rightmost anchor of a seven point likert scale:

<page somepage>
correct = <% trial.somelikert.anchorlabel.7 %>
</page>


anchorvalue property

The value assigned to each response on the likert scale.

Member of

<likert>

Remarks

This is an collection property. The anchorvalue is what is written to the datafile when a particular likert response is given.

Examples

The following displays the value of the first anchor of a likert scale:

<text sometext>
/ items= ("correct = <% trial.somelikert.anchorvalue.1 %>")
</text>

The following displays value of the last anchor of a seven point likert scale:

<page somepage>
correct = <% trial.somelikert.anchorvalue.7 %>
</page>


anchorwidth property

The width to be reserved between each anchor on the likert scale.

Member of

<likert>

Remarks

Examples

The following displays the width of the anchors of a likert scale:

<text sometext>
/ items= ("width = <% likert.somelikert.anchorwidth %>")
</text>

The following displays width of the anchors of a likert scale:

<page somepage>
anchor width = <% likert.somelikert.anchorwidth %>
</page>


aoidurationthreshold property

The AOI duration threshold property determines how long participants must gaze within an area of interest (i.e. an image) before a hit is scored.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

Examples

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


aoihitcountthreshold property

The AOI hit count threshold property determines how many gaze fixation points within an area of interest (i.e. an image) before a hit is scored.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

Examples

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


applicationmode property

The Inquisit module used to run the script.

Member of

<inquisit>

Remarks

The applicationmode property identifies which module of Inquisit was used to collect a given set of data. The applicationmode property returns one of the following values:

Name | Description
desktop | Inquisit Lab
.net | The ClickOnce .NET Framework module of Inquisit Web
java | The Java WebStart module of Inquisit Web
mozilla | The Mozilla Plugin module of Inquisit Web
activex | The ActiveX module of Inquisit Web
player | The Inquisit Web Player

Examples

The following displays the value of applicationmode in a text stimulus:

<text sometext>
/ items= ("applicationmode = <% inquisit.applicationmode %>")
</text>

The following saves the applicationmode (among other values) to a summary data file:

<summarydata>
/ columns=[script.subjectid, script.startdate, script.starttime, inquisit.version, inquisit.releasedate, inquisit.applicationmode, expressions.da, expressions.db, expressions.d]
/ file="iat_summary.iqdat"
</summarydata>


availablememory property

This property reports how much free memory remains available on the computer.

Member of

<computer>

Remarks

This is useful for determining whether a given computer has enough memory to run a script. When available memory drops to zero, Windows will resort to "page swapping" (caching memory on the hard drive), which can impose significant delays in the execution of a script. A script might record this information to the data file in order to discard data from participants using old computers.

Examples

The following displays the available memory mode:

<text sometext>
/ items= ("correct = <% computer.availablememory %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% computer.availablememory %>
</page>


backlabel property

Gets or sets the label of the back button.

Member of

<instruct> <surveypage>

Remarks

This is useful for dynamically setting the label for the back button used in navigating survey and instruction pages.

Examples

The following displays the available memory mode:

<text sometext>
/ items= ("correct = <% instruct.backlabel %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% instruct.backlabel %>
</page>


beginresponseframe property

Gets or sets the stimulus presentation frame after which the participant may respond.

Member of

<likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

This property indicates when, relative to the presentation of stimuli, Inquisit will begin registering participant responses. By default, Inquisit waits until the entire sequence of stimulus presentation frames has been presented before allowing responses.

Examples

The following displays the value of beginresponseframe:

<text sometext>
/ items= ("frame = <% trial.sometrial.beginresponseframe %>")
</text>

The following displays the value of beginresponseframe in an instruction page:

<page somepage>
frame = <% trial.sometrial.beginresponseframe %>
</page>


beginresponsetime property

Gets or sets the stimulus presentation time at which the participant may respond.

Member of

<likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

This property indicates when, relative to the presentation of stimuli, Inquisit will begin registering participant responses. By default, Inquisit waits until the entire sequence of stimulus presentation frames has been presented before allowing responses.

Examples

The following displays the value of beginresponsetime:

<text sometext>
/ items= ("time = <% trial.sometrial.beginresponsetime %>")
</text>

The following displays the value of beginresponsetime in an instruction page:

<page somepage>
time = <% trial.sometrial.beginresponsetime %>
</page>


blockcount property

The total number of blocks specified for an expt element.

Member of

<expt>

Remarks

Note that this total does not include blocks run conditionally based on participant performance.

Examples

The following displays the value of blockcount in a text stimulus:

<text sometext>
/ items= ("blockcount = <% expt.someexpt.blockcount %>")
</text>

The following displays the value of blockcount in an instruction page:

<page somepage>
blockcount = <% expt.someexpt.blockcount %>
</page>


blockscount property

The total number of blocks specified for an expt element.

Member of

<expt>

Remarks

Note that this total does not include blocks run conditionally based on participant performance.

Examples

The following displays the value of blockscount in a text stimulus:

<text sometext>
/ items= ("blockscount = <% expt.someexpt.blockscount %>")
</text>

The following displays the value of blockscount in an instruction page:

<page somepage>
blockscount = <% expt.someexpt.blockscount %>
</page>


bottom property

The vertical screen coordinate of the bottom of the stimulus.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

This property returns the bottom of the stimulus in screen pixels.

Examples

The following displays the value of bottom in a text stimulus:

<text sometext>
/ items= ("bottom = <% text.foo.bottom %>")
</text>

The following displays the value of bottom in an instruction page:

<page somepage>
bottom = <% defaults.bottom %>
</page>


build property

The build of Inquisit running the script.

Member of

<inquisit>

Remarks

The build property can be used in combination with the version property to track which version of Inquisit was used to collect a given set of data. This number refers to a unique build of an Inquisit version.

Examples

The following displays the value of build and version in a text stimulus:

<text sometext>
/ items= ("build = <% inquisit.build %>")
</text>

The following saves the releasedate (among other values) to a summary data file:

<summarydata>
/ columns=[script.subjectid, script.startdate, script.starttime, inquisit.version, inquisit.build, inquisit.releasedate, expressions.da, expressions.db, expressions.d]
/ file="iat_summary.iqdat"
</summarydata>


button property

A value indicating whether a given button on the joystick is pressed.

Member of

<joystick>

Remarks

A value of zero indicates the button is not pressed. A nonzero value indicates the button is pressed. This is a collection property with a maximum of 32 buttons.

Examples

The following displays the value of a button on the joystick:

<page somepage>
position of button 10 = <% joystick.button.10 %>
</page>


buttona property

A value indicating whether Button A on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button A is not pressed. A value of 1 indicates Button A is pressed.

Examples

The following displays the value of Button A on the gamepad:

<page somepage>
position of button 10 = <% joystick.button.10 %>
</page>


buttonb property

A value indicating whether Button B on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button B is not pressed. A value of 1 indicates Button B is pressed.

Examples

The following displays the value of Button B on the gamepad:

<page somepage>
position of button B = <% joystick.buttonb %>
</page>


buttoncenter property

A value indicating whether Button Center on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button Center is not pressed. A value of 1 indicates Button Center is pressed.

Examples

The following displays the value of Button Center on the gamepad:

<page somepage>
position of button center = <% joystick.buttoncenter %>
</page>


buttondown property

A value indicating whether Button Down on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button Down is not pressed. A value of 1 indicates Button Down is pressed.

Examples

The following displays the value of Button Down on the gamepad:

<page somepage>
position of button down = <% joystick.buttondown %>
</page>


buttonguide property

A value indicating whether Button Guide on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button Guide is not pressed. A value of 1 indicates Button Guide is pressed.

Examples

The following displays the value of Button Guide on the gamepad:

<page somepage>
position of button guide = <% joystick.buttonguide %>
</page>


buttonl1 property

A value indicating whether Button L1 on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button L1 is not pressed. A value of 1 indicates Button L1 is pressed.

Examples

The following displays the value of Button L1 on the gamepad:

<page somepage>
position of button l1 = <% joystick.buttonl1 %>
</page>


buttonl2 property

A value indicating whether Button L2 on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button L2 is not pressed. A value of 1 indicates Button L2 is pressed.

Examples

The following displays the value of Button L2 on the gamepad:

<page somepage>
position of button l2 = <% joystick.buttonl2 %>
</page>


buttonl3 property

A value indicating whether Button L3 on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button L3 is not pressed. A value of 1 indicates Button L3 is pressed.

Examples

The following displays the value of Button L3 on the gamepad:

<page somepage>
position of button L3 = <% joystick.buttonl3 %>
</page>


buttonlabel property

The text label on the navigation button for openended responses.

Member of

<openended> <slidertrial>

Remarks

Examples

The following displays the value of buttonlabel in a text stimulus:

<text sometext>
/ items= ("buttonlabel = <% openended.someopenended.buttonlabel %>")
</text>

The following displays the value of buttonlabel in an instruction page:

<page somepage>
buttonlabel = <% openended.someopenended.buttonlabel %>
</page>


buttonleft property

A value indicating whether Button Left on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button Left is not pressed. A value of 1 indicates Button Left is pressed.

Examples

The following displays the value of Button Left on the gamepad:

<page somepage>
position of button left = <% joystick.buttonleft %>
</page>


buttonr1 property

A value indicating whether Button R1 on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button R1 is not pressed. A value of 1 indicates Button R1 is pressed.

Examples

The following displays the value of Button R1 on the gamepad:

<page somepage>
position of button r1 = <% joystick.buttonr1 %>
</page>


buttonr2 property

A value indicating whether Button R2 on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button R2 is not pressed. A value of 1 indicates Button R2 is pressed.

Examples

The following displays the value of Button R2 on the gamepad:

<page somepage>
position of button r2 = <% joystick.buttonr2 %>
</page>


buttonr3 property

A value indicating whether Button R3 on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button R3 is not pressed. A value of 1 indicates Button R3 is pressed.

Examples

The following displays the value of Button R3 on the gamepad:

<page somepage>
position of button r3 = <% joystick.buttonr3 %>
</page>


buttonright property

A value indicating whether Button Right on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button Right is not pressed. A value of 1 indicates Button Right is pressed.

Examples

The following displays the value of Button Right on the gamepad:

<page somepage>
position of button right = <% joystick.buttonright %>
</page>


buttonselect property

A value indicating whether Button Select on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button Select is not pressed. A value of 1 indicates Button Select is pressed.

Examples

The following displays the value of Button Select on the gamepad:

<page somepage>
position of button select = <% joystick.buttonselect %>
</page>


buttonstart property

A value indicating whether Button Start on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button Start is not pressed. A value of 1 indicates Button Start is pressed.

Examples

The following displays the value of Button Start on the gamepad:

<page somepage>
position of button start = <% joystick.buttonstart %>
</page>


buttonup property

A value indicating whether Button Up on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button Up is not pressed. A value of 1 indicates Button Up is pressed.

Examples

The following displays the value of Button Up on the gamepad:

<page somepage>
position of button up = <% joystick.buttonup %>
</page>


buttonx property

A value indicating whether Button X on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button X is not pressed. A value of 1 indicates Button X is pressed.

Examples

The following displays the value of Button X on the gamepad:

<page somepage>
position of button x = <% joystick.buttonx %>
</page>


buttony property

A value indicating whether Button Y on the gamepad is pressed.

Member of

<joystick>

Remarks

A value of 0 indicates Button Y is not pressed. A value of 1 indicates Button Y is pressed.

Examples

The following displays the value of Button Y on the gamepad:

<page somepage>
position of button Y = <% joystick.buttony %>
</page>


canvasheight property

The height of the display canvas in pixels.

Member of

<display>

Remarks

The canvasheight property returns the height of canvas as determined by the constraints specified in the canvassize, canvasposition, and canvasaspectratio attributes.

Examples

The following displays the value of canvasheight in a text stimulus:

<text sometext>
/ items= ("canvasheight = <% display.canvasheight %>")
</text>

The following displays the value of canvasheight in an instruction page:

<page somepage>
canvasheight = <% display.canvasheight %>
</page>


canvaswidth property

The width of the display canvas in pixels.

Member of

<display>

Remarks

The canvaswidth property returns the width of canvas as determined by the constraints specified in the canvassize, canvasposition, and canvasaspectratio attributes.

Examples

The following displays the value of canvaswidth in a text stimulus:

<text sometext>
/ items= ("canvaswidth = <% display.canvaswidth %>")
</text>

The following displays the value of canvaswidth in an instruction page:

<page somepage>
canvaswidth = <% display.canvaswidth %>
</page>


caption property

The text caption on a survey question.

Member of

<button> <caption> <checkboxes> <dropdown> <image> <listbox> <radiobuttons> <slider> <surveypage> <textbox>

Remarks

Examples

The following displays the value of caption in a text stimulus:

<text sometext>
/ items= ("caption = <% listbox.q1.caption %>")
</text>

The following displays the value of caption in an instruction page:

<page somepage>
caption = <% checkboxes.q2.caption %>
</page>


charlimit property

The maximum number of characters permitted for an openended response.

Member of

<openended>

Remarks

Examples

The following displays the value of charlimit in a text stimulus:

<text sometext>
/ items= ("charlimit = <% openended.someopenended.charlimit %>")
</text>

The following displays the value of charlimit in an instruction page:

<page somepage>
charlimit = <% openended.someopenended.charlimit %>
</page>


color property

The color of the shape.

Member of

<clearscreen> <shape>

Remarks

Can be set to any named color (e.g., brown, green, blue, lightyellow, ...).

Examples

The following trial sets the color of a shape based on whether or not the response to the previous trial was correct:

<trial feedback>
/ontrialbegin = [ if (trial.test.correct == true) shape.feedback.color = green; else shape.feedback.color = red; ]
/ stimulusframes = [1=feedback]
</trial>


colorblue property

The value (0 to 255) of the blue component of a shape's color.

Member of

<shape>

Remarks

Examples

The following displays the value of colorblue in a text stimulus:

<text sometext>
/ items= ("colorblue = <% shape.circle.colorblue %>")
</text>

The following displays the value of colorblue in an instruction page:

<page somepage>
colorblue = <% shape.circle.colorblue %>
</page>


colordepth property

The depth of color supported by the current display mode.

Member of

<display>

Remarks

This reports the number of bits of color in the current display mode.

Examples

The following displays the value of colordepth in a text stimulus:

<text sometext>
/ items= ("colordepth = <% display.colordepth %>")
</text>

The following displays the value of colordepth in an instruction page:

<page somepage>
colordepth = <% display.colordepth %>
</page>


colorgreen property

The value (0 to 255) of the blue component of a shape's color.

Member of

<shape>

Remarks

Examples

The following displays the value of colorgreen in a text stimulus:

<text sometext>
/ items= ("colorgreen = <% shape.circle.colorgreen %>")
</text>

The following displays the value of colorgreen in an instruction page:

<page somepage>
colorgreen = <% shape.circle.colorgreen %>
</page>


colorred property

The value (0 to 255) of the blue component of a shape's color.

Member of

<shape>

Remarks

Examples

The following displays the value of colorred in a text stimulus:

<text sometext>
/ items= ("colorred = <% shape.circle.colorred %>")
</text>

The following displays the value of colorred in an instruction page:

<page somepage>
colorred = <% shape.circle.colorred %>
</page>


completed property

Whether or not to record data.

Member of

<script>

Remarks

A value of 1 indicates the participant completed the script in its entirety. A value of 0 indicates that they aborted the script before it was finished.

Examples

The following records whether the script was completed in the summary data file:

<summarydata>
/ columns = [script.startdate, script.starttime, script.subjectid, script.groupid, values.totalscore, script.completed]
</summarydata>


content property

The textual content of an instruction page.

Member of

<htmlpage> <page>

Remarks

Examples

The following displays the value of content in a text stimulus:

<text sometext>
/ items= ("content = <% page.somepage.content %>")
</text>

The following displays the value of content in an instruction page:

<page somepage>
content = <% htmlpage.somepage.content %>
</page>


correct property

Accuracy of the last response for the specified element.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

A value of 1 indicates correct. A value of 0 indicates incorrect.

Examples

The following displays the value of correct in a text stimulus:

<text sometext>
/ items= ("correct = <% trial.sometrial.correct %>")
</text>

The following displays the value of correct in an instruction page:

<page somepage>
correct = <% trial.sometrial.correct %>
</page>


correctcount property

The number of correct responses for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of correctcount in a text stimulus:

<text sometext>
/ items= ("correctcount = <% trial.sometrial.correctcount %>")
</text>

The following displays the value of correctcount in an instruction page:

<page somepage>
correctcount = <% trial.sometrial.correctcount %>
</page>


correctstreak property

The number of consecutive correct responses for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

This property can be used to define branches that apply when the participant makes a given number of consecutive correct responses.

Examples

The following displays the value of correctstreak in a text stimulus:

<text sometext>
/ items= ("correctstreak = <% trial.sometrial.correctstreak %>")
</text>

The following displays the value of correctstreak in an instruction page:

<page somepage>
correctstreak = <% trial.sometrial.correctstreak %>
</page>


count property

The number of times the specified element has been run within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

If the element is a block, this property always returns 1 because a block can only be run once within a single block. If the element is a trial, this property returns the number of times the given trial has been run within the block.

Examples

The following displays the value of count in a text stimulus:

<text sometext>
/ items= ("count = <% trial.sometrial.count %>")
</text>

The following displays the value of count in an instruction page:

<page somepage>
count = <% trial.sometrial.count %>
</page>


countrycode property

The two letter ISO 3166 country code of the default user locale.

Member of

<computer>

Remarks

This property indicates the country code of the current computer user (for example, "US" for United States, "GB" for Great Britian). See the ISO 3166 standard for a complete list of country codes.

Examples

The following displays the countrycode in a text stimulus:

<text sometext>
/ items= ("correct = <% computer.countrycode %>")
</text>

The following displays the countrycode in an instruction page:

<page somepage>
correct = <% computer.countrycode %>
</page>


cpuspeed property

This property reports the clock speed of the system CPU.

Member of

<computer>

Remarks

This is useful for determining whether a given computer is fast enough to run a particular script.

Examples

The following displays the available memory mode:

<text sometext>
/ items= ("correct = <% computer.cpuspeed %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% computer.cpuspeed %>
</page>


currentblock property

The name of the currently running block.

Member of

<script>

Remarks

This property indicates which block, if any, is currently running.

Examples

The following displays the value of currentblock in a text stimulus:

<text sometext>
/ items= ("currentblock = <% script.currentblock %>")
</text>

The following displays the value of currentblock in an instruction page:

<page somepage>
currentblock = <% script.currentblock %>
</page>


currentblocknumber property

The ordinal number of the currently running block.

Member of

<block> <expt> <script>

Remarks

This value increments each time a block is run.

Examples

The following displays the value of currentblocknumber in a text stimulus:

<text sometext>
/ items= ("currentblocknumber = <% expt.currentblocknumber %>")
</text>

The following displays the value of currentblocknumber in an instruction page:

<page somepage>
currentblocknumber = <% expt.currentblocknumber %>
</page>


currentexpt property

The name of the currently running expt.

Member of

<script>

Remarks

This property indicates which expt, if any, is currently running.

Examples

The following displays the value of currentexpt in a text stimulus:

<text sometext>
/ items= ("currentexpt = <% script.currentexpt %>")
</text>

The following displays the value of currentexpt in an instruction page:

<page somepage>
currentexpt = <% script.currentexpt %>
</page>


currentgroupnumber property

The between-subjects group number currently running.

Member of

<expt>

Remarks

This value indicates which of the between-subjects groups the current session belongs to. The group number can be based on the subject id, group id, or it can be randomly assigned.

Examples

The following displays the value of currentgroupnumber in a text stimulus:

<text sometext>
/ items= ("currentgroupnumber = <% expt.currentgroupnumber %>")
</text>

The following displays the value of currentgroupnumber in an instruction page:

<page somepage>
currentgroupnumber = <% expt.currentgroupnumber %>
</page>


currentindex property

The index of the currently selected value of a standalone list item or a stimulus list.

Member of

<list> <picture> <port> <sound> <text> <video> <xid>

Remarks

None.

Examples

The following displays the value of currentindex in a text stimulus:

<text sometext>
/ items= ("currentindex = <% text.sometext.currentindex %>")
</text>

The following displays the value of currentindex in an instruction page:

<page somepage>
currentindex = <% text.sometext.currentindex %>
</page>


currentitem property

The currently selected item in the stimulus set.

Member of

<clock> <counter> <picture> <port> <sound> <text> <video> <xid>

Remarks

None.

Examples

The following displays the value of currentitem in a text stimulus:

<text sometext>
/ items= ("currentitem = <% text.sometext.currentitem %>")
</text>

The following displays the value of currentitem in an instruction page:

<page somepage>
currentitem = <% text.sometext.currentitem %>
</page>


currentpagenumber property

The number of current survey page.

Member of

<survey> <surveypage>

Remarks

This value indicates the page number of the survey that is currently visible.

Examples

The following displays the value of currentpagenumber in a text stimulus:

<text sometext>
/ items= ("currentpagenumber = <% survey.s1.currentpagenumber %>")
</text>

The following displays the value of currentpagenumber in an instruction page:

<page somepage>
currentpagenumber = <% survey.mysurvey.currentpagenumber %>
</page>


currentquestionnumber property

The number of the first question on the currently visible survey page.

Member of

<survey> <surveypage>

Remarks

This value indicates which survey question is currently visible to the user. If a survey page contains multiple questions, the number of the first question is returned.

Examples

The following displays the value of currentquestionnumber in a text stimulus:

<text sometext>
/ items= ("currentquestionnumber = <% surveypage.page1.currentquestionnumber %>")
</text>

The following displays the value of currentquestionnumber in an instruction page:

<page somepage>
currentquestionnumber = <% survey.mysurvey.currentquestionnumber %>
</page>


currentscript property

The file name of the currently running script.

Member of

<batch>

Remarks

This property returns the file name of the currently running script.

Examples

The following displays the value of currentexpt in a text stimulus:

<batch>
/ file = "script1.iqx"
/ file = "script2.iqx"
/ onscriptbegin = [if(batch.main.currentscript == "script1.iqx") parameters.maxtrials = 10]
</batch>


currenttime property

The current time.

Member of

<clock> <script>

Remarks

The format of the time is hh:mm:ss where hours range from 1 to 24.

Examples

The following displays the value of currenttime in a text stimulus:

<text sometext>
/ items= ("currenttime = <% script.currenttime %>")
</text>

The following displays the value of currenttime in an instruction page:

<page somepage>
currenttime = <% script.currenttime %>
</page>


currenttime property

This property returns the current playing time video in milliseconds.

Member of

<video>

Remarks

Examples

The following trial stops after playing a video for 6 seconds:

<trial test>
/ stimulustimes = [1=treatmentvideo]
/ validresponse = (" ")
/ stop = [video.treatmentvideo.currenttime == 10000]
</trial>


currenttrial property

The name of the currently running trial.

Member of

<block> <script>

Remarks

This property indicates which trial, if any, is currently running.

Examples

The following displays the value of currenttrial in a text stimulus:

<text sometext>
/ items= ("currenttrial = <% script.currenttrial %>")
</text>

The following displays the value of currenttrial in an instruction page:

<page somepage>
currenttrial = <% script.currenttrial %>
</page>


currenttrialnumber property

The number of the currently running trial.

Member of

<block> <expt> <script>

Remarks

This value increments each time a trial is run.

Examples

The following displays the value of currenttrialnumber in a text stimulus:

<text sometext>
/ items= ("currenttrialnumber = <% block.currenttrialnumber %>")
</text>

The following displays the value of currenttrialnumber in an instruction page:

<page somepage>
currenttrialnumber = <% block.currenttrialnumber %>
</page>


currentvalue property

The last selected value of a standalone list item or a stimulus list.

Member of

<list> <picture> <port> <sound> <text> <video> <xid>

Remarks

None.

Examples

The following displays the value of currentvalue in a text stimulus:

<text sometext>
/ items= ("currentvalue = <% text.sometext.currentvalue %>")
</text>

The following displays the value of currentvalue in an instruction page:

<page somepage>
currentvalue = <% text.sometext.currentvalue %>
</page>


defaultresponse property

The default text to appear in a edit box.

Member of

<openended> <slidertrial> <textbox>

Remarks

The defaultresponse property can be used to prepopulate the edit box of a textbox or openended with a given string of text.

Examples

The following displays the value of defaultresponse in a text stimulus:

<text sometext>
/ items= ("defaultresponse = <% openended.foo.defaultresponse %>")
</text>


directory property

Returns a directory from the batch file.

Member of

<batch>

Remarks

This is a collection property.

Examples

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


dropsource property

Determines whether a visual stimulus is can be dragged and dropped on the screen.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

A value of true (or 1) indicates the stimulus is a valid dropsource. A value of false (or 0) indicates it can not be dragged and dropped. Valid drop sources can be dragged and dropped onto other visual stimuli marked as <a href="isdroptarget.htm">drop targets</a>.

Examples

The following displays the value of dropsource in a text stimulus:

<text sometext>
/ items= ("dropsource = <% text.sometext.dropsource %>")
</text>

The following displays the value of dropsource in an instruction page:

<page somepage>
dropsource = <% text.sometext.dropsource %>
</page>


droptarget property

Determines whether visual stimuli can be dragged and dropped onto this stimulus.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

A value of true (or 1) indicates the stimulus is a valid droptarget. A value of false (or 0) indicates that items can not be dragged and dropped on it. Visual stimuli marked as drop sources can be dragged and dropped onto drop targets.

Examples

The following displays the value of droptarget in a text stimulus:

<text sometext>
/ items= ("droptarget = <% text.sometext.droptarget %>")
</text>

The following displays the value of droptarget in an instruction page:

<page somepage>
droptarget = <% text.sometext.droptarget %>
</page>


dropx property

The horizontal screen coordinate of the visual stimulus where stimuli that are dragged and dropped onto it are positioned.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

This property allows a script to get or set the horizontal position on the stimulus where dragged and dropped items are positioned. The coordinate can be specified in pixels or percents.

Examples

The following sets the drop position of a drop target to the upper left corner of the stimulus:

<trial example>
/ ontrialbegin = [shape.dropoption1.dropy = 10%; shape.dropoption1.dropy = 10%;]
</trial>


dropy property

The vertical screen coordinate of the visual stimulus where stimuli that are dragged and dropped onto it are positioned.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

This property allows a script to get or set the vertical position on the stimulus where dragged and dropped items are positioned. The coordinate can be specified in pixels or percents.

Examples

The following sets the drop position of a drop target to the upper left corner of the stimulus:

<trial example>
/ ontrialbegin = [shape.dropoption1.dropy = 10%; shape.dropoption1.dropy = 10%;]
</trial>


duration property

The duration in milliseconds of the systembeep.

Member of

<systembeep>

Remarks

By default, the duration is 250 ms.

Examples

The following trial presents a beep for 1 second.

<trial beeptrial>
/ ontrialbegin = [systembeep.duration = 1000]
/ stimulustimes = [1=systembeep]
/ validresponse = (anyresponse)
</trial>


elapsedtime property

The amount of time since the script or experimental event began or a clock was started.

Member of

<block> <clock> <datastream> <expt> <likert> <openended> <script> <slidertrial> <survey> <surveypage> <trial>

Remarks

The time is reported in milliseconds.

Examples

The following displays the value of elapsedtime in a text stimulus:

<text sometext>
/ items= ("elapsedtime = <% script.elapsedtime %>")
</text>

The following displays the value of elapsedtime in an instruction page:

<page somepage>
elapsedtime = <% script.elapsedtime %>
</page>


encrypt property

Indicates whether or not the data file should be encrypted.

Member of

<data>

Remarks

A value of 1 indicates the data are encrypted, 0 indicates data are saved in plain text.

Examples

The following displays the value of encrypt in a text stimulus:

<text sometext>
/ items= ("encrypt = <% data.encrypt %>")
</text>

The following displays the value of encrypt in an instruction page:

<page somepage>
encrypt = <% data.encrypt %>
</page>


encryptionkey property

The password key used to encrypt the data.

Member of

<data>

Remarks

To open a password encrypted data file in Inquisit, the user must enter this password.

Examples

The following displays the value of encryptionkey in a text stimulus:

<text sometext>
/ items= ("encryptionkey = <% data.encryptionkey %>")
</text>

The following displays the value of encryptionkey in an instruction page:

<page somepage>
encryptionkey = <% data.encryptionkey %>
</page>


erase property

Determines whether a stimulus is erased at the end of a trial.

Member of

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

Remarks

A value of 1 indicates the stimulus will be erased. A value of 0 indicates it will not.

Examples

The following displays the value of erase in a text stimulus:

<text sometext>
/ items= ("erase = <% text.sometext.erase %>")
</text>

The following displays the value of erase in an instruction page:

<page somepage>
erase = <% text.sometext.erase %>
</page>


erasecolor property

The color used to overwrite a stimulus when it is erased.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

Examples

The following trial erases the color of a text stimulus to black or white based on whether or not the response to the previous trial was correct:

<trial feedback>
/ontrialbegin = [ if (trial.test.correct == true) text.target.erasecolor = black; else text.target.erasecolor = white; ]
/ stimulusframes = [1=feedback]
</trial>


erasecolorblue property

A value from 0 ot 255 specifying the intensity of the blue component of the erase color.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

Higher values mean the color has more blue.

Examples

The following displays the value of erasecolorblue in a text stimulus:

<text sometext>
/ items= ("erasecolorblue = <% text.sometext.erasecolorblue %>")
</text>

The following displays the value of erasecolorblue in an instruction page:

<page somepage>
erasecolorblue = <% text.sometext.erasecolorblue %>
</page>


erasecolorgreen property

A value from 0 ot 255 specifying the intensity of the green component of the erase color.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

Higher values mean the color is greener.

Examples

The following displays the value of erasecolorgreen in a text stimulus:

<text sometext>
/ items= ("erasecolorgreen = <% text.sometext.erasecolorgreen %>")
</text>

The following displays the value of erasecolorgreen in an instruction page:

<page somepage>
erasecolorgreen = <% text.sometext.erasecolorgreen %>
</page>


erasecolorred property

A value from 0 ot 255 specifying the intensity of the red component of the erase color.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

Higher values mean the color is more red.

Examples

The following displays the value of erasecolorred in a text stimulus:

<text sometext>
/ items= ("erasecolorred = <% text.sometext.erasecolorred %>")
</text>

The following displays the value of erasecolorred in an instruction page:

<page somepage>
erasecolorred = <% text.sometext.erasecolorred %>
</page>


erasesignal property

Determines the setting used to reset a port signal.

Member of

<port> <xid>

Remarks

Examples

The following displays the value of erasesignal in a text stimulus:

<text sometext>
/ items= ("erasesignal = <% port.someport.erasesignal %>")
</text>

The following displays the value of erasesignal in an instruction page:

<page somepage>
erasesignal = <% port.aport.erasesignal %>
</page>


error property

Accuracy of the last response for the specified element.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

A value of 1 indicates incorrect, 0 indicates correct).

Examples

The following displays the value of error in a text stimulus:

<text sometext>
/ items= ("error = <% trial.sometrial.error %>")
</text>

The following displays the value of error in an instruction page:

<page somepage>
error = <% trial.sometrial.error %>
</page>


errorcount property

The number of correct responses for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of errorcount in a text stimulus:

<text sometext>
/ items= ("errorcount = <% trial.sometrial.errorcount %>")
</text>

The following displays the value of errorcount in an instruction page:

<page somepage>
errorcount = <% trial.sometrial.errorcount %>
</page>


errorstreak property

The number of consecutive incorrect responses for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

This property can be used to define branches that apply when the participant makes a given number of consecutive incorrect responses.

Examples

The following displays the value of errorstreak in a text stimulus:

<text sometext>
/ items= ("errorstreak = <% trial.sometrial.errorstreak %>")
</text>

The following displays the value of errorstreak in an instruction page:

<page somepage>
errorstreak = <% trial.sometrial.errorstreak %>
</page>


expression property

Determines the setting used to reset a port signal.

Member of

<expressions> <htmlpage> <page>

Remarks

This is a collection property that returns items from a list of expressions associated with the element.

Examples

The following displays the value of expression in a text stimulus:

<text sometext>
/ items= ("expression = <% expressions.expression %>")
</text>

The following displays the value of expression in an instruction page:

<page somepage>
expression = <% page.feedback.expression %>
</page>


file property

The path of the file.

Member of

<data> <htmlpage> <include>

Remarks

Examples

The following displays the value of file in a text stimulus:

<text sometext>
/ items= ("file = <% data.file %>")
</text>

The following displays the value of file in an instruction page:

<page somepage>
file = <% htmlpage.feedback.file %>
</page>


filename property

The name of the file.

Member of

<script>

Remarks

This property returns just the file name, not the full path

Examples

The following displays the value of filename in a text stimulus:

<text sometext>
/ items= ("filename = <% script.filename %>")
</text>

The following displays the value of filename in an instruction page:

<page somepage>
filename = <% script.filename %>
</page>


finishlabel property

Gets or sets the label of the finish button.

Member of

<instruct> <survey> <surveypage>

Remarks

This is useful for dynamically setting the label for the finish button used in navigating survey and instruction pages.

Examples

The following displays the available memory mode:

<text sometext>
/ items= ("correct = <% instruct.finishlabel %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% survey.survey1.finishlabel %>
</page>


finishpage property

Gets or sets the finish page url.

Member of

<defaults>

Remarks

The finish page property is used to redirect web participants to a url after they have completed to experiment. The destination url could be dynamically determined from a response on a single trial, the results of an aggregate performance metric, the time of day, or any property value from the experiment. The property can also be used to dynamically set values of query parameters to be sent to the destination web server.

Examples

The following displays the available memory mode:

<trial example>
/ ontrialend = [if (values.percentcorrect > 80) defaults.finishpage="https://myserver.com/topprize.html";]
</trial>


firstcharlatency property

The response latency for the first character typed into the textbox.

Member of

<openended>

Remarks

None.

Examples

The following displays the value of firstcharlatency in a text stimulus:

<text sometext>
/ items= ("firstcharlatency = <% trial.sometrial.firstcharlatency %>")
</text>

The following displays the value of firstcharlatency in an instruction page:

<page somepage>
firstcharlatency = <% trial.sometrial.firstcharlatency %>
</page>


fixationwindowlength property

The fixationwindowlength property returns the length of the window length in milliseconds used in determining when a fixation has ended.

Member of

<eyetracker>

Remarks

This is used to smooth out data and minimize the effect of noise inherent in high sample rates. The default value is 20ms.

Examples

The following displays the value of fixationwindowlength in a text stimulus:

<text sometext>
/ items= ("fixationwindowlength = <% eyetracker.fixationwindowlength %>")
</text>


fontheight property

The height of the font.

Member of

<caption> <checkboxes> <clock> <defaults> <dropdown> <image> <instruct> <likert> <listbox> <openended> <radiobuttons> <slider> <slidertrial> <survey> <surveypage> <text> <textbox>

Remarks

The height can be specified in percentages, pixels, or points.

Examples

The following displays the value of fontheight in a text stimulus:

<text sometext>
/ items= ("fontheight = <% text.foo.fontheight %>")
</text>

The following displays the value of fontheight in an instruction page:

<page somepage>
fontheight = <% defaults.fontheight %>
</page>


framerate property

The framerate property specifies the eye tracker sample rate.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

Examples

The following displays the value of framerate in a text stimulus:

<text sometext>
/ items= ("framerate = <% eyetracker.framerate %>")
</text>


framerates property

The framerates property returns the sample rates the eye tracker supports.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

Examples

The following displays the value of framerates in a text stimulus:

<text sometext>
/ items= ("framerates = <% eyetracker.framerates %>")
</text>


frequency property

The tone frequency in hz of the systembeep.

Member of

<systembeep>

Remarks

The frequence must be an integer between 37 through 32,767. By default, the frequency is 750 hz.

Examples

The following trial presents a beep at 2000 hz.

<trial beeptrial>
/ ontrialbegin = [systembeep.frequence = 2000]
/ stimulustimes = [1=systembeep]
/ validresponse = (anyresponse)
</trial>


fullpath property

The full path of the file.

Member of

<script>

Remarks

The full path can be a url or local path.

Examples

The following displays the value of fullpath in a text stimulus:

<text sometext>
/ items= ("fullpath = <% script.fullpath %>")
</text>

The following displays the value of fullpath in an instruction page:

<page somepage>
fullpath = <% script.fullpath %>
</page>


groupassignmentcode property

Returns the randomly generated code used to assign the participant to a between subjects group.

Member of

<script>

Remarks

Examples

The following displays the value of groupassignmentcode in a text stimulus:

<text sometext>
/ items= ("groupassignmentcode = <% script.groupassignmentcode %>")
</text>

The following displays the value of groupassignmentcode in an instruction page:

<page somepage>
groupassignmentcode = <% script.groupassignmentcode %>
</page>


groupcount property

Returns the randomly generated code used to assign the participant to a between subjects group.

Member of

<batch> <expt>

Remarks

Examples

The following displays the value of groupcount in a text stimulus:

<text conditionA>
/ items= ("groupcount = <% expt.conditionA.groupcount %>")
</text>

          <text conditionB>
/ items= ("groupcount = <% expt.conditionB.groupcount %>")
</text>


groupid property

The current group id code.

Member of

<script>

Remarks

Examples

The following displays the value of groupid in a text stimulus:

<text sometext>
/ items= ("groupid = <% script.groupid %>")
</text>

The following displays the value of groupid in an instruction page:

<page somepage>
groupid = <% script.groupid %>
</page>


haskeyboard property

This property reports whether the computer has a hardware keyboard.

Member of

<computer>

Remarks

Examples

The following displays if we're on a computer with a hardware keyboard':

<text sometext>
/ items= ("haskeyboard = <% computer.haskeyboard %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
haskeyboard = <% computer.haskeyboard %>
</page>


height property

The display height of the item.

Member of

<button> <caption> <checkboxes> <clock> <display> <dropdown> <image> <instruct> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

The height can be specified in percentages, pixels, or points.

Examples

The following displays the value of height in a text stimulus:

<text sometext>
/ items= ("height = <% text.foo.height %>")
</text>

The following displays the value of height in an instruction page:

<page somepage>
height = <% defaults.height %>
</page>


heightpct property

The display height of the item as a percentage of the canvas height.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <instruct> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

Use the heightpx attribute to get the width in pixels.

Examples

The following displays the value of height in a text stimulus:

<text sometext>
/ items= ("height = <% text.foo.heightpct %>")
</text>

The following displays the value of height in an instruction page:

<page somepage>
height = <% defaults.heightpct %>
</page>


heightpx property

The display height of the item in pixels.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <instruct> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

Use the heightpct attribute to get the width as a percentage of the canvas width.

Examples

The following displays the value of height in a text stimulus:

<text sometext>
/ items= ("height = <% text.foo.heightpx %>")
</text>

The following displays the value of height in an instruction page:

<page somepage>
height = <% defaults.heightpx %>
</page>


hposition property

The horizontal position of the item on the canvas.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <likert> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

The hposition can be specified in percentages, pixels, or points.

Examples

The following displays the value of hposition in a text stimulus:

<text sometext>
/ items= ("hposition = <% text.foo.hposition %>")
</text>


imageheight property

The height of the image used by a image survey item.

Member of

<image>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the value of imageheight in a text stimulus:

<text sometext>
/ items= ("imageheight = <% image.i1.imageheight %>")
</text>

The following displays the value of imageheight in an instruction page:

<page somepage>
imageheight = <% image.i1.imageheight %>
</page>


imagewidth property

The width of the image used by a image survey item.

Member of

<image>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the value of imagewidth in a text stimulus:

<text sometext>
/ items= ("imagewidth = <% image.i1.imagewidth %>")
</text>

The following displays the value of imagewidth in an instruction page:

<page somepage>
imagewidth = <% image.i1.imagewidth %>
</page>


increment property

The size of the response increments on a slider survey item.

Member of

<slider> <slidertrial>

Remarks

Examples

The following displays the value of increment in a text stimulus:

<text sometext>
/ items= ("increment = <% slider.q1.increment %>")
</text>

The following displays the value of increment in an instruction page:

<page somepage>
increment = <% slider.q1.increment %>
</page>


index property

The value of the item at the specified index number.

Member of

<item>

Remarks

The index property is expressed as an actual numeric value rather than the text "index". For example, to specify the fifth item in an itemset, the index would be expressed as "5". To specify the tenth item, the index would be expressed as "10", and so on.

Examples

The following displays the value of an item in a text stimulus:

<text sometext>
/ items= ("item number 4 = <% item.someitem.4 %>")
</text>

The following displays the value of an item in an instruction page:

<page somepage>
item number 7 = <% item.someitem.7 %>
</page>


inputmask property

A binary mask determining which pins on a parallel port an input device should use.

Member of

<likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

For each pin, a value of 0 indicates that any input device connected to the port should not change the state of the corresponding pin. A value of 1 indicates the input device can change the corresponding pin. This is useful in cases where different pins on a parallel port are being used simultaneously for input and output. By restricting the pins affected by the input device, the input will not interfere with output signals.

Examples

The following displays the value of inputmask in a text stimulus:

<text sometext>
/ items= ("inputmask = <% trial.foo.inputmask %>")
</text>

The following displays the value of inputmask in an instruction page:

<page somepage>
inputmask = <% trial.sometrial.inputmask %>
</page>


inwindow property

Whether or not the last response for the specified element was inside (1) or outside of (0) the response window.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

A value of 1 indicates the response was in the window. A value of 0 indicates the response was not in the window.

Examples

The following displays the value of inwindow in a text stimulus:

<text sometext>
/ items= ("inwindow = <% trial.sometrial.inwindow %>")
</text>

The following displays the value of inwindow in an instruction page:

<page somepage>
inwindow = <% trial.sometrial.inwindow %>
</page>


inwindowcount property

The number of responses occuring within the response window.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

Examples

The following displays the value of inwindowcount in a text stimulus:

<text sometext>
/ items= ("inwindowcount = <% trial.sometrial.inwindowcount %>")
</text>

The following displays the value of inwindowcount in an instruction page:

<page somepage>
inwindowcount = <% trial.sometrial.inwindowcount %>
</page>


inwindowstreak property

The number of consecutive responses occurring within the response window.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

Examples

The following displays the value of inwindowstreak in a text stimulus:

<text sometext>
/ items= ("inwindowstreak = <% trial.sometrial.inwindowstreak %>")
</text>

The following displays the value of inwindowstreak in an instruction page:

<page somepage>
inwindowstreak = <% trial.sometrial.inwindowstreak %>
</page>


ipaddress property

This property reports the IP addresses assigned to the computer.

Member of

<computer>

Remarks

This is a collection property containing a list of all of the IP Addresses assigned to a computer. Computers typically have only one IP Address but may have more if they have multiple network cards. If the computer is located within a LAN, the computer may be assigned an IP address that is not globally unique.

Examples

The following displays the ip address in a text stimulus:

<text sometext>
/ items= ("correct = <% computer.ipaddress.1 %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% computer.ipaddress.1 %>
</page>


isplaying property

This property indicates whether the video is currently playing.

Member of

<video>

Remarks

Examples

The following displays if the video is currently playing:

<text sometext>
/ items= ("isplaying = <% video.test.isplaying %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
isplaying = <% video.test.isplaying %>
</page>


item property

Returns an item from a stimulus item set.

Member of

<item> <list> <picture> <port> <sound> <text> <video>

Remarks

This is a collection property.

Examples

The following displays the value of the first item in a text stimulus:

<text sometext>
/ items= ("item = <% text.sometext.item.2 %>")
</text>

The following displays the value of the first item in an item set:

<item negativeitems>
item = <% item.negativeitems.item.1 %>
</page>

The following displays the value of the first item in a list:

<list rankedpreferences>
item = <% list.rankedpreferences.item.1 %>
</page>


itemcount property

Returns the number of items in a set.

Member of

<counter> <item> <list> <picture> <port> <sound> <text> <video> <xid>

Remarks

Examples

The following displays the value of itemcount in a text stimulus:

<text sometext>
/ items= ("item = <% text.sometext.itemcount %>")
</text>

The following displays the value of itemcount in an instruction page:

<page somepage>
item = <% item.negativeitems.itemcount %>
</page>


itemfontheight property

The height of the font used for survey items.

Member of

<survey> <surveypage>

Remarks

The height can be specified in percentages, pixels, or points.

Examples

The following displays the value of itemfontheight in a text stimulus:

<text sometext>
/ items= ("itemfontheight = <% survey.mysurvey.itemfontheight %>")
</text>

The following displays the value of itemfontheight in an instruction page:

<page somepage>
itemfontheight = <% surveypage.page1.itemfontheight %>
</page>


itemprobabilities property

Returns a collection of decimal values representing the probabilities with which the corresponding items in the items collection are randomly selected.

Member of

<list>

Remarks

This is a collection property.

Examples

The following displays the value of the probability with which the second item in a list is presented:

<text sometext>
/ items= ("The probability of <% list.payoffs.items.2 %> is <% list.payoffs.itemprobabilities.2 %>")
</text>

The following displays the value of the first itemprobabilities in an itemprobabilities set:

<itemprobabilities negativeitems>
itemprobabilities = <% itemprobabilities.negativeitems.itemprobabilities.1 %>
</page>

The following displays the value of the first itemprobabilities in a list:

<list rankedpreferences>
itemprobabilities = <% list.rankedpreferences.itemprobabilities.1 %>
</page>


items property

Returns an item from a stimulus item set.

Member of

<html> <item> <list> <picture> <port> <sound> <text> <video> <xid>

Remarks

This is a collection property.

Examples

The following displays the value of the first item in a text stimulus:

<text sometext>
/ items = ("item = <% text.sometext.items.2 %>")
</text>

The following displays the value of the first item in an item set:

<item negativeitems>
items = <% item.negativeitems.items.1 %>
</page>

The following displays the value of the first item in a list:

<page rankedpreferences>
items = <% list.rankedpreferences.items.1 %>
</page>


itemspacing property

The amount of spacing between survey items.

Member of

<survey> <surveypage>

Remarks

The amount can be specified in percentages, pixels, or points.

Examples

The following displays the value of itemspacing in a text stimulus:

<text sometext>
/ items= ("itemspacing = <% surveypage.page3.itemspacing %>")
</text>

The following displays the value of itemspacing in an instruction page:

<page somepage>
itemspacing = <% survey.mysurvey.itemspacing %>
</page>


label property

The label for each response increment on a slider survey item.

Member of

<slider>

Remarks

This is a collection property.

Examples

The following displays the value of label in a text stimulus:

<text sometext>
/ items= ("label = <% slider.q1.label.1 %>")
</text>

The following displays the value of label in an instruction page:

<page somepage>
label = <% slider.q1.label.1 %>
</page>


language property

The primary language used by the computer.

Member of

<computer>

Remarks

This property indicates which language version of Windows the computer is running, and thus provides a hint as to the native language of the respondent.

Examples

The following displays the language in a text stimulus:

<text sometext>
/ items= ("correct = <% computer.language %>")
</text>

The following displays the language in an instruction page:

<page somepage>
correct = <% computer.language %>
</page>


languagecode property

The two letter ISO 639-1 code of the default country/region of the current user.

Member of

<computer>

Remarks

This property indicates the default language of the current computer user (for example, "en" for English, "jp" for Japanese). See the ISO 639-1 standard for a complete list of language codes.

Examples

The following displays the languagecode in a text stimulus:

<text sometext>
/ items= ("correct = <% computer.languagecode %>")
</text>

The following displays the languagecode in an instruction page:

<page somepage>
correct = <% computer.languagecode %>
</page>


lastcharlatency property

The response latency for the last character typed into the textbox.

Member of

<openended>

Remarks

None.

Examples

The following displays the value of lastcharlatency in a text stimulus:

<text sometext>
/ items= ("lastcharlatency = <% trial.sometrial.lastcharlatency %>")
</text>

The following displays the value of lastcharlatency in an instruction page:

<page somepage>
lastcharlatency = <% trial.sometrial.lastcharlatency %>
</page>


lastdroplatency property

The time in milliseconds between the start and finish of the last drag/drop gesture.

Member of

<trial>

Remarks

The the start of the time interval is the initiation of a drag gesture. The end of the interval is when the item is successfully dropped.

Examples

The following displays the value of lastdroplatency in a text stimulus:

<text sometext>
/ items= ("last drop target = <% trial.lastdroplatency %>")
</text>


lastdropsource property

The last stimulus that was drag/dropped on the trial.

Member of

<trial>

Remarks

This property returns the stimulus that was drag/dropped on the last run of the trial.

Examples

The following displays the value of lastdropsource in a text stimulus:

<text sometext>
/ items= ("last drop target = <% trial.lastdropsource %>")
</text>


lastdroptarget property

The last stimulus upon which a dropsource was dropped on the trial.

Member of

<trial>

Remarks

This property returns the stimulus upon which a dropsource was dropped on the last run of the trial.

Examples

The following displays the value of lastdroptarget in a text stimulus:

<text sometext>
/ items= ("last drop target = <% trial.lastdroptarget %>")
</text>


lastevent property

The lastevent property returns the last reponse on a Cedrus Response Pad.

Member of

<xid>

Remarks

This property returns a unique 8-bit numeric code of the last event on a Cedrus Response Pad. An event almost always corresponds to the pressing or releasing of a button, but it could also be a signal from a device plugged into the Response Pad's TTL port. The event code is an aggregate value identifying the button (if any), whether it was pressed or released, and the port number, which is 0 for button events, and 1 or 2 depending on which TTL port generated the event. The value of this property corresponds to the value of the response property of the trial.

Examples

The following defines a valid response as the value 8:

<trial example>
/ isvalidresponse = [xid.responsebox.lastevent == 8]
</trial>


lasteventaction property

Indicates whether a button was released or pressed on a Cedrus Response Pad.

Member of

<xid>

Remarks

This property returns 1 if the button was pressed, or 0 if the button was released or the event was generated from a TTL signal rather than a button.

Examples

The following defines any button press as a valid response:

<trial example>
/ isvalidresponse = [xid.responsebox.lasteventaction == 1]
</trial>


lasteventbutton property

A numeric identifier indicating which button on a Cedrus Response Pad was last pressed or released.

Member of

<xid>

Remarks

None.

Examples

The following defines a valid response as the release of button number 7:

<trial example>
/ isvalidresponse = [xid.responsebox.lasteventbutton == 7 && xid.responsebox.lasteventaction == 0]
</trial>


lasteventport property

The number of the port that generated the last event.

Member of

<xid>

Remarks

This property allows a script to determine whether an event was generated by a button press (port number is 0) or an incoming TTL signal from one of the ports of a Response Pad (port number 1 or 2).

Examples

The following displays the value of lasteventport in a text stimulus:

<text sometext>
/ items= ("height = <% xid.lasteventport %>")
</text>


lastex property

The horizontal coordinate of the most recent gaze point in eye tracker units.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property reports the last horizontal position of the gaze points in the eyetracker's internal coordinate system. For gaze point in display coordinates (i.e., pixels), see the lastx property.

Examples

The following displays the value of lastex in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastex %>")
</text>


lastey property

The vertical coordinate of the most recent gaze point in eye tracker units.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property reports the last vertical position of the gaze points in the eyetracker's internal coordinate system. For gaze point in display coordinates (i.e., pixels), see the lasty property.

Examples

The following displays the value of lastey in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastey %>")
</text>


lastfixationx property

The horizontal screen coordinate of the most recently calculated fixation point.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in pixels of the fixation point for the purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastfixationx in a text stimulus:

<text sometext>
/ items= ("lastfixationx = <% eyetracker.lastfixationx %>")
</text>


lastfixationy property

The vertical screen coordinate of the most recently calculated fixation point.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in pixels of the fixation point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastfixationy in a text stimulus:

<text sometext>
/ items= ("lastfixationy = <% eyetracker.lastfixationy %>")
</text>


lasthasfixation property

Indicates whether Inquisit has currently detected a fixation point from the eye tracker for either or both eyes.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read whether the Inquisit has detected a fixation point.

Examples

The following displays the value of lasthasfixation in a text stimulus:

<text sometext>
/ items= ("lasthasfixation = <% eyetracker.lasthasfixation %>")
</text>


lastlatency property

The latency (response time) of the last response given by the XID device.

Member of

<xid>

Remarks

This property returns the response latency for the last response registered by an XID device.

Examples

The following displays the value of last latency in a text stimulus:

<text sometext>
/ items= ("latency = <% xid.myrb.lastlatency %>")
</text>


lastlefteyex property

The horizontal user coordinate of the most recent left eye position reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in mm of the eye for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastlefteyex in a text stimulus:

<text sometext>
/ items= ("lastlefteyex = <% eyetracker.lastlefteyex %>")
</text>


lastlefteyey property

The vertical user coordinate of the most recent left eye position reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in mm of the eye for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastlefteyey in a text stimulus:

<text sometext>
/ items= ("lastlefteyey = <% eyetracker.lastlefteyey %>")
</text>


lastlefteyez property

The distance user coordinate of the most recent left eye position reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the distance position in mm of the eye for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastlefteyez in a text stimulus:

<text sometext>
/ items= ("lastlefteyez = <% eyetracker.lastlefteyez %>")
</text>


lastleftfixationx property

The horizontal screen coordinate of the most recently calculated fixation point of the left eye.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastleftfixationx in a text stimulus:

<text sometext>
/ items= ("lastleftfixationx = <% eyetracker.lastleftfixationx %>")
</text>


lastleftfixationy property

The vertical screen coordinate of the most recently calculated fixation point of the left eye.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastleftfixationy in a text stimulus:

<text sometext>
/ items= ("lastleftfixationy = <% eyetracker.lastleftfixationy %>")
</text>


lastleftgazex property

The horizontal user coordinate of the most recent gaze point of the left eye reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in mm of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastleftgazex in a text stimulus:

<text sometext>
/ items= ("lastleftgazex = <% eyetracker.lastleftgazex %>")
</text>


lastleftgazey property

The vertical user coordinate of the most recent gaze point of the left eye reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in mm of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastleftgazey in a text stimulus:

<text sometext>
/ items= ("lastleftgazey = <% eyetracker.lastleftgazey %>")
</text>


lastleftgazez property

The distance user coordinate of the most recent gaze point of the left eye reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the distance position in mm of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastleftgazez in a text stimulus:

<text sometext>
/ items= ("lastleftgazez = <% eyetracker.lastleftgazez %>")
</text>


lastlefthasfixation property

Indicates whether Inquisit has currently detected a fixation point from the eye tracker for the left eye.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read whether the Inquisit has detected a fixation point for the left eye.

Examples

The following displays the value of lastlefthasfixation in a text stimulus:

<text sometext>
/ items= ("lastlefthasfixation = <% eyetracker.lastlefthasfixation %>")
</text>


lastleftpupilheight property

The most recent height in mm of the participant's left pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the last recorded pupil height for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastleftpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastleftpupilheight %>")
</text>


lastleftpupilwidth property

The most recent width in mm of the participant's left pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the last recorded pupil height for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastleftpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastleftpupilwidth %>")
</text>


lastlefttpupilwidth property

The most recent width of the participant's left pupil as reported by the eye tracker.

Applies to

<eyetracker>

Remarks

This property allows a script to read the last recorded pupil height for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastlefttpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastlefttpupilwidth %>")
</text>


lastleftvalidity property

The last validity score for left pupil gaze point data.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns a validity score for the last received gaze point message. The score is reported as a percentage ranging from 0 - 100% with 100% representing the highest validity.

Examples

The following displays the value of lastleftvalidity in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastleftvalidity %>")
</text>


lastleftx property

The horizontal screen coordinate of the most recent gaze point of the left eye reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastleftx in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastleftx %>")
</text>


lastlefty property

The vertical screen coordinate of the most recent gaze point of the left eye reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastlefty in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastlefty %>")
</text>


lastmarker property

This property returns the last marker value sent to the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property tracks the last integer value that was sent to the eye tracker to mark the onset of an event.

Examples

The following displays the value of lastmarker in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastmarker %>")
</text>


lastpixelsperdegreex property

The lastpixelsperdegreex property specifies the number of horizontal pixels on the display monitor relative to the degree of visual angle.

Member of

<eyetracker>

Remarks

Examples

The following displays the value of lastpixelsperdegreex in a text stimulus:

<text sometext>
/ items= ("lastpixelsperdegreex = <% eyetracker.lastpixelsperdegreex %>")
</text>


lastpixelsperdegreey property

The lastpixelsperdegreey property specifies the number of vertical pixels on the display monitor relative to the degree of visual angle.

Member of

<eyetracker>

Remarks

Examples

The following displays the value of lastpixelsperdegreey in a text stimulus:

<text sometext>
/ items= ("lastpixelsperdegreey = <% eyetracker.lastpixelsperdegreey %>")
</text>


lastpupilheight property

The most recent height in mm of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the last recorded pupil height for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastpupilheight %>")
</text>


lastpupilwidth property

The most recent width in mm of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the last recorded pupil height for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastpupilwidth %>")
</text>


lastrighteyex property

The horizontal user coordinate of the most recent right eye position reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in mm of the eye for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastrighteyex in a text stimulus:

<text sometext>
/ items= ("lastrighteyex = <% eyetracker.lastrighteyex %>")
</text>


lastrighteyey property

The vertical user coordinate of the most recent right eye position reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in mm of the eye for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastrighteyey in a text stimulus:

<text sometext>
/ items= ("lastrighteyey = <% eyetracker.lastrighteyey %>")
</text>


lastrighteyez property

The distance user coordinate of the most recent right eye position reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the distance position in mm of the eye for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastrighteyez in a text stimulus:

<text sometext>
/ items= ("lastrighteyez = <% eyetracker.lastrighteyez %>")
</text>


lastrightfixationx property

The horizontal screen coordinate of the most recently calculated fixation point of the right eye.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastrightfixationx in a text stimulus:

<text sometext>
/ items= ("lastrightfixationx = <% eyetracker.lastrightfixationx %>")
</text>


lastrightfixationy property

The vertical screen coordinate of the most recently calculated fixation point of the right eye.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastrightfixationy in a text stimulus:

<text sometext>
/ items= ("lastrightfixationy = <% eyetracker.lastrightfixationy %>")
</text>


lastrightgazex property

The horizontal user coordinate of the most recent gaze point of the right eye reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in mm of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastrightgazex in a text stimulus:

<text sometext>
/ items= ("lastrightgazex = <% eyetracker.lastrightgazex %>")
</text>


lastrightgazey property

The vertical user coordinate of the most recent gaze point of the right eye reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in mm of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastrightgazey in a text stimulus:

<text sometext>
/ items= ("lastrightgazey = <% eyetracker.lastrightgazey %>")
</text>


lastrightgazez property

The distance user coordinate of the most recent gaze point of the right eye reported by the eye tracker in (mm).

Member of

<eyetracker> <eyetracker>

Remarks

This property allows a script to read the distance position in mm of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display. This position is typically in the User Coordinate System (in mm) with it's origin at the center of the frontal surface of the eye tracker.

Examples

The following displays the value of lastrightgazez in a text stimulus:

<text sometext>
/ items= ("lastrightgazez = <% eyetracker.lastrightgazez %>")
</text>


lastrighthasfixation property

Indicates whether Inquisit has detected a fixation point from the eye tracker for the right eye.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read whether the Inquisit has detected a fixation point for the left eye.

Examples

The following displays the value of lastrighthasfixation in a text stimulus:

<text sometext>
/ items= ("lastrighthasfixation = <% eyetracker.lastrighthasfixation %>")
</text>


lastrightpupilheight property

The most recent height in mm of the participant's rigth pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the last recorded pupil height for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastrightpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastrightpupilheight %>")
</text>


lastrightpupilwidth property

The most recent width in mm of the participant's right pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the last recorded pupil height for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastrightpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastrightpupilwidth %>")
</text>


lastrightvalidity property

The last validity score for right pupil gaze point data.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns a validity score for the last received gaze point message. The score is reported as a percentage ranging from 0 - 100% with 100% representing the highest validity.

Examples

The following displays the value of lastrightvalidity in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastrightvalidity %>")
</text>


lastrightx property

The horizontal screen coordinate of the most recent gaze point of the right eye reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastrightx in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastrightx %>")
</text>


lastrighty property

The vertical screen coordinate of the most recent gaze point of the right eye reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastrighty in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastrighty %>")
</text>


lasttimestamp property

This property returns the timestamp for when the last marker value was sent to the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property tracks the timestamp for the last integer value that was sent to the eye tracker to mark the onset of an event. The timestamp is computed using the eyetracker's clock, so it can be used to identify at what point in the eyetracker's gaze data log a given event occurred (for example, a stimulus was presented).

Examples

The following displays the value of lasttimestamp in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lasttimestamp %>")
</text>


lastx property

The horizontal screen coordinate of the most recent gaze point reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the horizontal position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lastx in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lastx %>")
</text>


lasty property

The vertical screen coordinate of the most recent gaze point reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property allows a script to read the vertical position in pixels of the gaze point for purposes of recording data, reporting feedback to participants, or directing the flow of a task or visual display.

Examples

The following displays the value of lasty in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.lasty %>")
</text>


latency property

The last response latency recorded for the specified element.

Member of

<block> <expt> <likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

None.

Examples

The following displays the value of latency in a text stimulus:

<text sometext>
/ items= ("latency = <% trial.sometrial.latency %>")
</text>

The following displays the value of latency in an instruction page:

<page somepage>
latency = <% trial.sometrial.latency %>
</page>


left property

The horizontal screen coordinate of the left of the stimulus.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

This property returns the left of the stimulus in screen pixels.

Examples

The following displays the value of left in a text stimulus:

<text sometext>
/ items= ("left = <% text.foo.left %>")
</text>

The following displays the value of left in an instruction page:

<page somepage>
left = <% defaults.left %>
</page>


leftmargin property

The amount of spacing for the left margin of a survey page.

Member of

<survey> <surveypage>

Remarks

The amount can be specified in percentages, pixels, or points.

Examples

The following displays the value of leftmargin in a text stimulus:

<text sometext>
/ items= ("leftmargin = <% surveypage.page3.leftmargin %>")
</text>

The following displays the value of leftmargin in an instruction page:

<page somepage>
leftmargin = <% survey.mysurvey.leftmargin %>
</page>


leftx property

The position of the left joystick along the x (left-right) axis.

Member of

<joystick>

Remarks

The value runs from -1.0 to 1.0, with 0 representing the joystick in the center position

Examples

The following displays the value of leftx the joystick:

<page somepage>
joystick leftx position = <% joystick.leftx %>
</page>


lefty property

The position of the left joystick along the y (forward-backward) axis.

Member of

<joystick>

Remarks

The value runs from -1.0 to 1.0, with 0 representing the joystick in the center position

Examples

The following displays the value of lefty the joystick:

<page somepage>
joystick lefty position = <% joystick.lefty %>
</page>


listheight property

The height of the listbox or dropdown used by survey item.

Member of

<dropdown> <listbox>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the value of listheight in a text stimulus:

<text sometext>
/ items= ("listheight = <% listbox.q1.listheight %>")
</text>

The following displays the value of listheight in an instruction page:

<page somepage>
listheight = <% dropdown.q1.listheight %>
</page>


listwidth property

The width of the listbox or dropdown used by survey item.

Member of

<dropdown> <listbox>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the value of listwidth in a text stimulus:

<text sometext>
/ items= ("listwidth = <% listbox.q1.listwidth %>")
</text>

The following displays the value of listwidth in an instruction page:

<page somepage>
listwidth = <% dropdown.q1.listwidth %>
</page>


loop property

Whether a video stimulus should automatically loop back when a video is complete.

Member of

<sound> <video>

Remarks

A value of 1 indicates the data are encrypted, 0 indicates data are saved in plain text.

Examples

The following displays the value of loop in a text stimulus:

<text sometext>
/ items= ("loop = <% video.foo.loop %>")
</text>

The following displays the value of loop in an instruction page:

<page somepage>
loop = <% video.crimes.loop %>
</page>


macaddress property

This property reports the MAC addresses associated with the computer's network card.

Member of

<computer>

Remarks

This is a collection property containing a list of all of the MAC addresses the computer has. The MAC address is a globally unique code permanently assigned to a network adapter. As such, it can be a useful way to detect repeat responders over the internet. If the computer has no network adapter, the result is all zeroes. A computer with multiple network cards will thus have multiple MAC addresses in this collection.

Examples

The following displays the mac address in a text stimulus:

<text sometext>
/ items= ("correct = <% computer.macaddress.1 %>")
</text>

The following displays the mac address in an instruction page:

<page somepage>
correct = <% computer.macaddress.1 %>
</page>


maxchars property

The maximum number of characters permitted for a text response.

Member of

<textbox>

Remarks

Examples

The following displays the value of maxchars in a text stimulus:

<text sometext>
/ items= ("maxchars = <% textbox.question.maxchars %>")
</text>

The following displays the value of maxchars in an instruction page:

<page somepage>
maxchars = <% textbox.question.maxchars %>
</page>


maxfixationtime property

The maxfixationtime property specifies the maximum duration of a fixation in milliseconds used in calculating a fixation point.

Member of

<eyetracker> <eyetracker>

Remarks

This is the maximum amount of time that will be used in calculating the current fixation.

Examples

The following displays the value of maxfixationtime in a text stimulus:

<text sometext>
/ items= ("maxfixationtime = <% eyetracker.maxfixationtime %>")
</text>


maximum property

The maximum value in the list.

Member of

<list>

Remarks

Evaluates every item in the list and returns the lowest value. If no numeric items are in the list, the property returns 0.

Examples

The following displays the maximum value in a list:

<page somepage>
file = <% list.ratings.maximum %>
</page>


maxlatency property

The longest response latency for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

None.

Examples

The following displays the value of maxlatency in a text stimulus:

<text sometext>
/ items= ("maxlatency = <% trial.sometrial.maxlatency %>")
</text>

The following displays the value of maxlatency in an instruction page:

<page somepage>
maxlatency = <% trial.sometrial.maxlatency %>
</page>


maxlatency property

The longest response latency for the monkey.

Member of

<monkey>

Remarks

None.

Examples

The following displays the value of maxlatency in a text stimulus:

<text sometext>
/ items= ("maxlatency = <% monkey.maxlatency %>")
</text>

The following displays the value of maxlatency in an instruction page:

<page somepage>
maxlatency = <% monkey.maxlatency %>
</page>


maxleftpupilheight property

The maximum height of the participant's left pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the maximum height of the participant's left pupil during a given trial.

Examples

The following displays the value of maxleftpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.maxleftpupilheight %>")
</text>


maxleftpupilwidth property

The maximum width of the participant's left pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the maximum width of the participant's left pupil during a given trial.

Examples

The following displays the value of maxleftpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.maxleftpupilwidth %>")
</text>


maxpupilheight property

The maximum height of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the maximum height of the participant's pupil during a given trial.

Examples

The following displays the value of maxpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.maxpupilheight %>")
</text>


maxpupilwidth property

The maximum width of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the maximum width of the participant's pupil during a given trial.

Examples

The following displays the value of maxpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.maxpupilwidth %>")
</text>


maxrightpupilheight property

The maximum height of the participant's right pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the maximum height of the participant's right pupil during a given trial.

Examples

The following displays the value of maxrightpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.maxrightpupilheight %>")
</text>


maxrightpupilwidth property

The maximum width of the participant's right pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the maximum width of the participant's right pupil during a given trial.

Examples

The following displays the value of maxrightpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.maxrightpupilwidth %>")
</text>


maxrunsize property

Gets or sets the maximum number of times a given value can be consecutively selected by a list.

Member of

<list>

Remarks

The maxrunsize attribute places a constraint on random selection to ensure that a given item isn't selected multiple times in a row. If set to 1, for example, maxrunsize ensures that no value is selected twice or more in a row. A value of 2 would prevent runs of 3 or greater. By default, runs of any size are permitted. This attribute can only be specified if selectionmode is set to 'uniform' or 'normal'.

Random selection is done on the fly, so if multiple selection constraints such as not or replace are in place, it may not be possible to satisfy them all on a give trial, especially if there are only a few remaining items in the selection pool. In that case, the list will suspend one of the constraints and try again. If it still can not satisfy the remaining constraints, it suspends another and tries again, and so forth. By default, the maxrunsize constraint is suspended first, then replace, and finally the not constraints. If a procedure requires that the constraints always be satisfied, pregenerate a set of selection sequences that satisfy the constraints and then randomly select one of the pregenerated sequences to use for a given session.

Examples

The following sets maxrunsize to 1 on a list:

<trial example>
/ ontrialbegin = [list.primenumbers.maxrunsize = true;]
</trial>


maxvalue property

The highest possible response value on a slider survey item.

Member of

<checkboxes> <slider> <slidertrial> <textbox>

Remarks

Examples

The following displays the value of maxvalue in a text stimulus:

<text sometext>
/ items= ("maxvalue = <% slider.q1.maxvalue %>")
</text>

The following displays the value of maxvalue in an instruction page:

<page somepage>
maxvalue = <% slider.q1.maxvalue %>
</page>


mean property

The mean of the values in the list.

Member of

<list>

Remarks

Evaluates every item in the list and returns the mean. Non-numeric values are assigned a value of 0. If no numeric items are in the list, the property returns 0.

Examples

The following displays the mean of the values in a list:

<page somepage>
file = <% list.ratings.mean %>
</page>


meanlatency property

The mean response latency for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

None.

Examples

The following displays the value of meanlatency in a text stimulus:

<text sometext>
/ items= ("meanlatency = <% trial.sometrial.meanlatency %>")
</text>

The following displays the value of meanlatency in an instruction page:

<page somepage>
meanlatency = <% trial.sometrial.meanlatency %>
</page>


meanlatency property

The mean response latency for the monkey's responses.

Member of

<monkey>

Remarks

None.

Examples

The following displays the value of meanlatency in a text stimulus:

<text sometext>
/ items= ("meanlatency = <% monkey.meanlatency %>")
</text>

The following displays the value of meanlatency in an instruction page:

<page somepage>
meanlatency = <% monkey.meanlatency %>
</page>


meanleftpupilheight property

The average height of the participant's left pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the average height of the participant's left pupil during a given trial.

Examples

The following displays the value of meanleftpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.meanleftpupilheight %>")
</text>


meanleftpupilwidth property

The average width of the participant's left pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the average left width of the participant's pupil during a given trial.

Examples

The following displays the value of meanleftpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.meanleftpupilwidth %>")
</text>


meanpupilheight property

The average height of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the average height of the participant's pupil during a given trial.

Examples

The following displays the value of meanpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.meanpupilheight %>")
</text>


meanpupilwidth property

The average width of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the average width of the participant's pupil during a given trial.

Examples

The following displays the value of meanpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.meanpupilwidth %>")
</text>


meanrightpupilheight property

The average height of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the average height of the participant's pupil during a given trial.

Examples

The following displays the value of meanrightpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.meanrightpupilheight %>")
</text>


meanrightpupilwidth property

The average width of the participant's right pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the average width of the participant's right pupil during a given trial.

Examples

The following displays the value of meanrightpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.meanrightpupilwidth %>")
</text>


median property

The median of the values in the list.

Member of

<list>

Remarks

Evaluates every item in the list and returns the median. Non-numeric values are assigned a value of 0. If no numeric items are in the list, the property returns 0.

Examples

The following displays the median of the values in a list:

<page somepage>
file = <% list.ratings.median %>
</page>


medianlatency property

The median response latency for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

None.

Examples

The following displays the value of medianlatency in a text stimulus:

<text sometext>
/ items= ("medianlatency = <% trial.sometrial.medianlatency %>")
</text>

The following displays the value of medianlatency in an instruction page:

<page somepage>
medianlatency = <% trial.sometrial.medianlatency %>
</page>


memory property

This property reports the total memory on the computer.

Member of

<computer>

Remarks

Examples

The following displays the available memory mode:

<text sometext>
/ items= ("correct = <% computer.memory %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% computer.memory %>
</page>


minchars property

The minimum number of characters permitted for a text response.

Member of

<textbox>

Remarks

Examples

The following displays the value of minchars in a text stimulus:

<text sometext>
/ items= ("minchars = <% textbox.question.minchars %>")
</text>

The following displays the value of minchars in an instruction page:

<page somepage>
minchars = <% textbox.question.minchars %>
</page>


minfixationtime property

The minfixationtime property specifies the minimum duration of a fixation in milliseconds used in determining when a fixation is started.

Member of

<eyetracker> <eyetracker>

Remarks

This is the minimum amount of time they eye needs to be focused on a particular area without moving beyond the saccade threshold.

Examples

The following displays the value of minfixationtime in a text stimulus:

<text sometext>
/ items= ("minfixationtime = <% eyetracker.minfixationtime %>")
</text>


minimum property

The minimum value in the list.

Member of

<list>

Remarks

Evaluates every item in the list and returns the lowest value. If no numeric items are in the list, the property returns 0.

Examples

The following displays the minimum value in a list:

<page somepage>
file = <% list.ratings.minimum %>
</page>


minlatency property

The shortest response latency for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

None.

Examples

The following displays the value of minlatency in a text stimulus:

<text sometext>
/ items= ("minlatency = <% trial.sometrial.minlatency %>")
</text>

The following displays the value of minlatency in an instruction page:

<page somepage>
minlatency = <% trial.sometrial.minlatency %>
</page>


minlatency property

The shortest response latency for the monkey to respond.

Member of

<monkey>

Remarks

None.

Examples

The following displays the value of minlatency in a text stimulus:

<text sometext>
/ items= ("minlatency = <% monkey.minlatency %>")
</text>

The following displays the value of minlatency in an instruction page:

<page somepage>
minlatency = <% monkey.minlatency %>
</page>


minleftpupilheight property

The minimum height of the participant's left pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the minimum height of the participant's left pupil during a given trial.

Examples

The following displays the value of minleftpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.minleftpupilheight %>")
</text>


minleftpupilwidth property

The minimum width of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the minimum width of the participant's pupil during a given trial.

Examples

The following displays the value of minleftpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.minleftpupilwidth %>")
</text>


minpupilheight property

The minimum height of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the minimum height of the participant's pupil during a given trial.

Examples

The following displays the value of minpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.minpupilheight %>")
</text>


minpupilwidth property

The minimum width of the participant's pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the minimum width of the participant's pupil during a given trial.

Examples

The following displays the value of minpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.minpupilwidth %>")
</text>


minrightpupilheight property

The minimum height of the participant's right pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the minimum height of the participant's right pupil during a given trial.

Examples

The following displays the value of minrightpupilheight in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.minrightpupilheight %>")
</text>


minrightpupilwidth property

The minimum width of the participant's right pupil as reported by the eye tracker.

Member of

<eyetracker> <eyetracker> <eyetracker>

Remarks

This property returns the minimum width of the participant's right pupil during a given trial.

Examples

The following displays the value of minrightpupilwidth in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.minrightpupilwidth %>")
</text>


minvalue property

The lowest possible response value on a slider survey item.

Member of

<checkboxes> <slider> <slidertrial> <textbox>

Remarks

Examples

The following displays the value of minvalue in a text stimulus:

<text sometext>
/ items= ("minvalue = <% slider.q1.minvalue %>")
</text>

The following displays the value of minvalue in an instruction page:

<page somepage>
minvalue = <% slider.q1.minvalue %>
</page>


monitor property

The monitor property specifies the screen on which the stimulus is presented.

Member of

<button> <clock> <html> <picture> <shape> <text> <video>

Remarks

The property specifies which monitor a given stimulus appears on for experimental paradigms that use multiple display monitors connected to the computer.

Examples

The following displays the value of monitor in a text stimulus:

<text sometext>
/ items= ("monitor = <% text.foo.monitor %>")
</text>


monitor property

The monitor that the mouse cursor is on.

Member of

<mouse>

Remarks

The monitor property indicates the monitor that the mouse is currently on regardless of whether it is used by the script. This returns -1 if the monitor is unknown.

Examples

The following displays the value of monitor for the mouse:

<text sometext>
/ items= ("mouse monitor = <% mouse.monitor %>")
</text>


monkeymode property

Indicates whether the script is running in monkey mode.

Member of

<monkey>

Remarks

This property returns true if the subject is the Inquisit monkey, and false if the subject is humanoid.

Examples

The following displays the value of monkeymode in a text stimulus:

<text sometext>
/ items= ("monkeymode = <% monkey.monkeymode %>")
</text>

The following displays the value of monkeymode in an instruction page:

<page somepage>
monkeymode = <% monkey.monkeymode %>
</page>


multiline property

Whether openended input allows multiple lines of text.

Member of

<openended>

Remarks

A value of 1 indicates multiple lines are permitted, 0 indicates only a single line of text may be entered.

Examples

The following displays the value of multiline in a text stimulus:

<text sometext>
/ items= ("multiline = <% openended.q1.multiline.1 %>")
</text>

The following displays the value of multiline in an instruction page:

<page somepage>
multiline = <% openended.q1.multiline.1 %>
</page>


name property

The name of the element.

Member of

<batch> <block> <button> <caption> <checkboxes> <clock> <counter> <data> <defaults> <dropdown> <expt> <htmlpage> <image> <include> <instruct> <item> <likert> <list> <listbox> <monkey> <openended> <page> <picture> <port> <radiobuttons> <response> <shape> <slider> <slidertrial> <sound> <survey> <surveypage> <text> <textbox> <trial> <video> <xid>

Remarks

Examples

The following displays the name of a trial element in a text stimulus:

<text sometext>
/ items= ("name = <% trial.sometrial.name %>")
</text>

The following displays the name of a trial in an instruction page:

<page somepage>
name = <% trial.sometrial.name %>
</page>


navigationbuttonheight property

The height of the back and forward buttons on a survey page.

Member of

<survey> <surveypage>

Remarks

The amount can be specified in percentages, pixels, or points.

Examples

The following displays the value of navigationbuttonheight in a text stimulus:

<text sometext>
/ items= ("navigationbuttonheight = <% surveypage.page3.navigationbuttonheight %>")
</text>

The following displays the value of navigationbuttonheight in an instruction page:

<page somepage>
navigationbuttonheight = <% survey.mysurvey.navigationbuttonheight %>
</page>


navigationbuttonwidth property

The width of the back and forward buttons on a survey page.

Member of

<survey> <surveypage>

Remarks

The amount can be specified in percentages, pixels, or points.

Examples

The following displays the value of navigationbuttonwidth in a text stimulus:

<text sometext>
/ items= ("navigationbuttonwidth = <% surveypage.page3.navigationbuttonwidth %>")
</text>

The following displays the value of navigationbuttonwidth in an instruction page:

<page somepage>
navigationbuttonwidth = <% survey.mysurvey.navigationbuttonwidth %>
</page>


nextindex property

The index of the next-selected value of a standalone list item or a stimulus list.

Member of

<list> <picture> <port> <sound> <text> <video>

Remarks

A new index and value are selected according to the selectionrate setting. If the selectionrate is set to "always", for example, this property selects a new index and value from the list everytime it is accessed. If selectionrate is "trial", a new index and value are selected the first time the property is accessed on a given trial, and the same index is returned every subsequent time the property is accessed on that trial.

To retrieve the current index without causing a new index and value to be selected, see the currentindex property.

This property is a synonym for the obselete "selectedindex" property.

Examples

The following displays the value of nextindex in a text stimulus:

<text sometext>
/ items= ("nextindex = <% text.sometext.nextindex %>")
</text>

The following displays the value of nextindex in an instruction page:

<page somepage>
nextindex = <% text.sometext.nextindex %>
</page>


nextlabel property

The label on the next button of a survey or instruction page.

Member of

<instruct> <survey> <surveypage>

Remarks

Examples

The following displays the value of nextlabel in a text stimulus:

<text sometext>
/ items= ("nextlabel = <% surveypage.page3.nextlabel %>")
</text>

The following displays the value of nextlabel in an instruction page:

<page somepage>
nextlabel = <% survey.mysurvey.nextlabel %>
</page>


nextvalue property

The next-selected value of a standalone list item or a stimulus list.

Member of

<list> <picture> <port> <sound> <text> <video> <xid>

Remarks

A new value is selected according to the selectionrate setting. If the selectionrate is set to "always", for example, this property selects a new value from the list everytime it is accessed. If selectionrate is "trial", a new value is selected the first time the property is accessed on a given trial, and the same value is returned every subsequent time the property is accessed on that trial.

To retrieve the current value without causing a new value to be selected, see the currentvalue property.

This property is a synonym for the obselete "selectedvalue" property.

Examples

The following displays the value of nextvalue in a text stimulus:

<text sometext>
/ items= ("nextvalue = <% text.sometext.nextvalue %>")
</text>

The following displays the value of nextvalue in an instruction page:

<page somepage>
nextvalue = <% text.sometext.nextvalue %>
</page>


notinwindow property

Whether the last response occurred within the response window.

Member of

<block> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Remarks

A value of 1 indicates the response was in the window, 0 indicates it was not in the window.

Examples

The following displays the value of notinwindow in a text stimulus:

<text sometext>
/ items= ("notinwindow = <% block.bar.notinwindow %>")
</text>

The following displays the value of notinwindow in an instruction page:

<page somepage>
notinwindow = <% trial.foo.notinwindow %>
</page>


notinwindowcount property

The number of responses that did not occur within the response window.

Member of

<block> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Remarks

Examples

The following displays the value of notinwindowcount in a text stimulus:

<text sometext>
/ items= ("notinwindowcount = <% block.bar.notinwindowcount %>")
</text>

The following displays the value of notinwindowcount in an instruction page:

<page somepage>
notinwindowcount = <% trial.foo.notinwindowcount %>
</page>


notinwindowstreak property

The number of consecutive responses that did not occur within the response window.

Member of

<block> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Remarks

Examples

The following displays the value of notinwindowstreak in a text stimulus:

<text sometext>
/ items= ("notinwindowstreak = <% block.bar.notinwindowstreak %>")
</text>

The following displays the value of notinwindowstreak in an instruction page:

<page somepage>
notinwindowstreak = <% trial.foo.notinwindowstreak %>
</page>


numpoints property

Number of points on a likert scale.

Member of

<likert>

Remarks

Examples

The following displays the value of numpoints in a text stimulus:

<text sometext>
/ items= ("numpoints = <% likert.q1.numpoints.1 %>")
</text>

The following displays the value of numpoints in an instruction page:

<page somepage>
numpoints = <% likert.q1.numpoints.1 %>
</page>


option property

The collection of options in a multiple choice survey question.

Member of

<checkboxes> <dropdown> <listbox> <radiobuttons>

Remarks

This is a collection property.

Examples

The following displays the value of option in a text stimulus:

<text sometext>
/ items= ("option = <% checkboxes.foo.option.1 %>")
</text>

The following displays the value of option in an instruction page:

<page somepage>
option = <% listbox.bar.option.1 %>
</page>


optionvalue property

The collection of option values in a multiple choice survey question.

Member of

<checkboxes> <dropdown> <listbox> <radiobuttons>

Remarks

This is a collection property.

Examples

The following displays the value of optionvalue in a text stimulus:

<text sometext>
/ items= ("optionvalue = <% checkboxes.foo.optionvalue.1 %>")
</text>

The following displays the value of optionvalue in an instruction page:

<page somepage>
optionvalue = <% listbox.bar.optionvalue.1 %>
</page>


os property

The name of the operating system on the computer.

Member of

<computer>

Remarks

Examples

The following displays the ip address in a text stimulus:

<text sometext>
/ items= ("correct = <% computer.os %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% computer.os %>
</page>


osmajorversion property

The major version of the operating system on the computer.

Member of

<computer>

Remarks

Examples

The following displays the ip address in a text stimulus:

<text sometext>
/ items= ("correct = <% computer.osmajorversion %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% computer.osmajorversion %>
</page>


osminorversion property

The minor version of the operating system on the computer.

Member of

<computer>

Remarks

Examples

The following displays the ip address in a text stimulus:

<text sometext>
/ items= ("correct = <% computer.osminorversion %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% computer.osminorversion %>
</page>


pagefontheight property

The font height of the current survey page.

Member of

<survey>

Remarks

Examples

The following displays the value of pagefontheight in a text stimulus:

<text sometext>
/ items= ("pagefontheight = <% survey.interview.pagefontheight %>")
</text>

The following displays the value of pagefontheight in an instruction page:

<page somepage>
pagefontheight = <% survey.interview.pagefontheight %>
</page>


pan property

Whether sound is played to the left or right speaker.

Member of

<sound>

Remarks

Examples

The following displays the value of pan in a text stimulus:

<text sometext>
/ items= ("pan = <% sound.foo.pan %>")
</text>

The following displays the value of pan in an instruction page:

<page somepage>
pan = <% sound.city.pan %>
</page>


password property

The password used to login when saving a file to a protected location.

Member of

<data>

Remarks

Examples

The following displays the value of password in a text stimulus:

<text sometext>
/ items= ("password = <% data.password %>")
</text>

The following displays the value of password in an instruction page:

<page somepage>
password = <% data.password %>
</page>


percentcorrect property

The percent of correct responses for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of percentcorrect in a text stimulus:

<text sometext>
/ items= ("percentcorrect = <% trial.sometrial.percentcorrect %>")
</text>

The following displays the value of percentcorrect in an instruction page:

<page somepage>
percentcorrect = <% trial.sometrial.percentcorrect %>
</page>


percentcorrect property

The percent of correct responses the monkey should aim for.

Member of

<monkey>

Remarks

None.

Examples

The following displays the value of percentcorrect in a text stimulus:

<text sometext>
/ items= ("percentcorrect = <% monkey.percentcorrect %>")
</text>

The following displays the value of percentcorrect in an instruction page:

<page somepage>
percentcorrect = <% monkey.percentcorrect %>
</page>


percentinwindow property

The percent of responses inside the response window for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of percentinwindow in a text stimulus:

<text sometext>
/ items= ("percentinwindow = <% trial.sometrial.percentinwindow %>")
</text>

The following displays the value of percentinwindow in an instruction page:

<page somepage>
percentinwindow = <% trial.sometrial.percentinwindow %>
</page>


photocapture property

Indicates whether a snapshot from the built-in camera is taken at the start of the expt, block, or trial.

Member of

<block> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Remarks

A value of true or 1 indicates the photocapture will be saved, false or 0 indicates it will not.

Examples

The following displays the value of photocapture in a text stimulus:

<text sometext>
/ items= ("photocapture = <% trial.q1.photocapture %>")
</text>

The following displays the value of photocapture in an instruction page:

<page somepage>
photocapture = <% trial.q2.photocapture %>
</page>


platform property

The platform of the operating system on the computer.

Member of

<computer>

Remarks

This property returns "win" if running on Windows and "mac" if running on Mac OSX.

Examples

The following conditionally includes a script file when run on Windows:

<include>
/ precondition = [computer.platform=="win"]
/ file = "winvideos.iqx"]
</include>

The following conditionally includes a script file when run on Mac OSX:

<include>
/ precondition = [computer.platform=="mac"]
/ file = "macvideos.iqx"]
</include>


playthrough property

Whether a trial should play a video or sound stimulus to the end before moving to the next trial.

Member of

<sound> <video>

Remarks

A value of 1 indicates the media should be played in its entirety, 0 indicates it may be interrupted once the trial is complete.

Examples

The following displays the value of playthrough in a text stimulus:

<text sometext>
/ items= ("playthrough = <% text.sometext.playthrough %>")
</text>

The following displays the value of playthrough in an instruction page:

<page somepage>
playthrough = <% text.sometext.playthrough %>
</page>


plugin property

The name of the eyetracker plugin in use.

Member of

<eyetracker>

Remarks

Returns which eye tracker plugin is currently in use.

Examples

The following displays the value of plugin in a text stimulus:

<text sometext>
/ items= ("height = <% eyetracker.plugin %>")
</text>


poolitems property

Gets or sets an item in the selection pool.

Member of

<list>

Remarks

This is a collection property.

Examples

The following displays the value of the second item in the selection pool of a list:

<text sometext>
/ items = ("item = <% list.example.poolitems.2 %>")
</text>

The following displays the value of the first item in the selection pool of a list:

<item negative>
items = <% item.negativepoolitems.poolitems.1 %>
</page>

The following displays the value of the first item in a list:

<page rankedpreferences>
items = <% list.rankedpreferences.poolitems.1 %>
</page>


poolsize property

Gets or sets the size of the selection pool.

Member of

<list>

Remarks

The poolsize attribute creates a random selection pool of the specified size, adding items according to any itemprobabilities specified, or otherwise in proportion to their occurrence the items attribute. If poolsize is not specified, the size of the pool is equal to the number of items listed in the items attribute.

When setting poolsize in combination with itemprobabilities, choose a size for which each of specified probabilities results in a whole number of items in the pool. If the poolsize results in a fractional count of a given item, the count will be rounded to the nearest integer.

Examples

The following sets poolsize to 100 on a list:

<trial example>
/ ontrialbegin = [list.primenumbers.poolsize = 100;]
</trial>


portnumber property

The number of the serial or parallel port in use.

Member of

<port>

Remarks

Examples

The following displays the value of portnumber in a text stimulus:

<text sometext>
/ items= ("portnumber = <% port.someport.portnumber %>")
</text>

The following displays the value of portnumber in an instruction page:

<page somepage>
portnumber = <% port.aport.portnumber %>
</page>


posttrialpause property

The pause duration after a trial.

Member of

<block> <defaults> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Remarks

Examples

The following displays the value of posttrialpause in a text stimulus:

<text sometext>
/ items= ("posttrialpause = <% block.bar.posttrialpause %>")
</text>

The following displays the value of posttrialpause in an instruction page:

<page somepage>
posttrialpause = <% trial.bar.posttrialpause %>
</page>


pov property

A value indicating the current point of view on the joystick.

Member of

<joystick>

Remarks

This property indicates the state of direction controllers, such as point-of-view hats. The position is indicated in hundredths of a degree clockwise from north (away from the user). The center position is reported as -1. For indicators that have only five positions, the value for a controller is - 1, 0, 9,000, 18,000, or 27,000. This is a collection property with a maximum of 4 point of view controllers.

Examples

The following displays the value of a pov on the joystick:

<page somepage>
position of pov 2 = <% joystick.pov.2 %>
</page>


pretrialpause property

The pause duration before a trial.

Member of

<block> <defaults> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Remarks

Examples

The following displays the value of pretrialpause in a text stimulus:

<text sometext>
/ items= ("pretrialpause = <% block.bar.pretrialpause %>")
</text>

The following displays the value of pretrialpause in an instruction page:

<page somepage>
pretrialpause = <% trial.bar.pretrialpause %>
</page>


product property

The product code of the XID device.

Member of

<xid>

Remarks

The product property can be used to identify the particular make and model of an XID device.

Examples

The following displays the value of product in a text stimulus:

<text sometext>
/ items= ("height = <% xid.product %>")
</text>


recorddata property

Whether or not to record data.

Member of

<block> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Remarks

A value of 1 indicates that data for this element are recorded to the data file, 0 indicates no data is recorded for this element. This is useful for filtering out data from practice trials.

Examples

The following displays the value of recorddata in a text stimulus:

<text sometext>
/ items= ("recorddata = <% trial.practice.recorddata %>")
</text>

The following displays the value of recorddata in an instruction page:

<page somepage>
recorddata = <% trial.practice.recorddata %>
</page>


refreshinterval property

The current vertical refresh interval of the display system.

Member of

<display>

Remarks

This property reports the vertical refresh interval in milliseconds of the display system.

Examples

The following displays the value of refreshinterval in a text stimulus:

<text sometext>
/ items= ("refreshinterval = <% display.refreshinterval %>")
</text>

The following displays the value of refreshinterval in an instruction page:

<page somepage>
refreshinterval = <% display.refreshinterval %>
</page>


refreshrate property

The current vertical refresh rate of the display system.

Member of

<display>

Remarks

This property reports the vertical refresh rate in Hz of the display system.

Examples

The following displays the value of refreshrate in a text stimulus:

<text sometext>
/ items= ("refreshrate = <% display.refreshrate %>")
</text>

The following displays the value of refreshrate in an instruction page:

<page somepage>
refreshrate = <% display.refreshrate %>
</page>


releasedate property

The release date for the version of Inquisit running the script.

Member of

<inquisit>

Remarks

The releasedate property can be used in combination with the version property to track which version of Inquisit was used to collect a given set of data. The format of the time is mmddyy. For example, June 6th, 2011 would appear as "060611".

Examples

The following displays the value of releasedate in a text stimulus:

<text sometext>
/ items= ("releasedate = <% inquisit.releasedate %>")
</text>

The following saves the releasedate (among other values) to a summary data file:

<summarydata>
/ columns=[script.subjectid, script.startdate, script.starttime, inquisit.version, inquisit.releasedate, expressions.da, expressions.db, expressions.d]
/ file="iat_summary.iqdat"
</summarydata>


remainingtime property

The remaining time in milliseconds until the timeout is reached.

Member of

<block> <clock> <expt> <likert> <openended> <script> <slidertrial> <survey> <surveypage> <trial>

Remarks

The remainingtime property can be used with a clock in timer, stopwatch, or clock mode for which a timeout value has been set. If no timeout has been set for a clock, this property returns -1.

Examples

The following trial branches to a warning trial if the remaining time for a task is less than 5 seconds:

<trial sometrial>
/ branch = [if (clock.tasktimer.remainingtime < 5000) trial.dowarning;]
</trial>

The following adds a warning tone to a trials stimuli if the remaining time is less than 3 seconds:

<trial sometrial>
/ ontrialbegin= [if (clock.tasktimer.remainingtime < 3000) trial.sometrial.insertstimulusframe(1, sound.warning);]
</trial>

The following displays the value of remainingtime in a text stimulus:

<text sometext>
/ items= ("remainingtime = <% clock.surveytimer.remainingtime %>")
</text>

The following displays the value of remainingtime in an instruction page:

<page somepage>
remainingtime = <% clock.puzzletimer.remainingtime %>
</page>


replace property

Determines whether or not items are replaced into the selection pool after being randomly selected.

Member of

<list>

Remarks

This property use this property to turn replacement on or off.

Examples

The following turns on replacement on a list:

<trial example>
/ ontrialbegin = [list.mountainRanges.replace = true;]
</trial>


required property

Whether a response is mandatory for a survey item.

Member of

<caption> <checkboxes> <dropdown> <image> <listbox> <radiobuttons> <slider> <textbox>

Remarks

A value of 1 indicates a response must be given, 0 indicates a response is optional.

Examples

The following displays the value of required in a text stimulus:

<text sometext>
/ items= ("required = <% textbox.q1.required %>")
</text>

The following displays the value of required in an instruction page:

<page somepage>
required = <% checkboxes.q2.required %>
</page>


resetinterval property

The resetinterval attribute determines how many blocks should be run before a counter's randomly selection pool should be reset.

Member of

<counter> <defaults> <picture> <port> <sound> <text> <video> <xid>

Remarks

Resetting the counter causes all items that have been selected to be returned to the selection pool. For selection with replacement, resetting the counter has no effect. By default, Inquisit resets counters after each block. This attribute is useful in cases where an experiment performs random selection without replacement over more than one block.

Examples

The following trial presents a beep at 2000 hz.

<trial adjustinterval>
/ ontrialbegin = [text.target.resetinterval = 1]
/ stimulustimes = [1=systembeep]
/ validresponse = (anyresponse)
</trial>


resetrate property

The frequency with which a clock in stopwatch or timer mode is reset.

Member of

<clock>

Remarks

This property determines whether a clock in stopwatch or timer mode is reset after each trial, block, or experiment. It has no effect for the visible part of the clock while in clock mode, although it will affect the value of the elapsedtime property.

Examples

The following displays the value of resetrate in a text stimulus:

<text sometext>
/ items= ("resetrate = <% clock.surveytimer.resetrate %>")
</text>

The following displays the value of resetrate in an instruction page:

<page somepage>
resetrate = <% clock.sorttask.resetrate %>
</page>


response property

The last response given by the participant for the specified element.

Member of

<block> <checkboxes> <dropdown> <expt> <likert> <listbox> <openended> <radiobuttons> <slider> <slidertrial> <textbox> <trial>

Remarks

If the element is a block, this returns the response given on the most recent trial that was run within the block. If the element is a trial, this returns the response given the last time the trial was run.

Examples

The following displays the value of response in a text stimulus:

<text sometext>
/ items= ("response = <% trial.sometrial.response %>")
</text>

The following displays the value of response in an instruction page:

<page somepage>
response = <% trial.sometrial.response %>
</page>


responsefontheight property

The height of the font used for a survey items response options or text.

Member of

<caption> <checkboxes> <dropdown> <image> <listbox> <radiobuttons> <slider> <survey> <surveypage> <textbox>

Remarks

The amount can be specified in percentages, pixels, or points.

Examples

The following displays the value of responsefontheight in a text stimulus:

<text sometext>
/ items= ("responsefontheight = <% surveypage.page3.responsefontheight %>")
</text>

The following displays the value of responsefontheight in an instruction page:

<page somepage>
responsefontheight = <% survey.mysurvey.responsefontheight %>
</page>


responsemonitor property

The monitor the mouse cursor was on at the moment the last response was given by the participant for the specified trial or block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

If the element is a block, this returns the monitor from the most recent trial that was run within the block. If the element is a trial, this returns the monitor of the last time the trial was run. This returns -1 if the monitor is unknown.

Examples

The following displays the value of responsey in a text stimulus:

<text sometext>
/ items= ("mouse monitor = <% trial.sometrial.responsemonitor %>")
</text>

The following displays the value of responsey in an instruction page:

<page somepage>
mouse monitor = <% trial.sometrial.responsemonitor %>
</page>


responsetext property

The last responsetext given by the participant for the specified element.

Member of

<block> <checkboxes> <dropdown> <expt> <likert> <listbox> <openended> <radiobuttons> <slider> <slidertrial> <textbox> <trial>

Remarks

If the element is a block, this returns the responsetext given on the most recent trial that was run within the block. If the element is a trial, this returns the responsetext given the last time the trial was run.

Examples

The following displays the value of responsetext in a text stimulus:

<text sometext>
/ items= ("responsetext = <% trial.sometrial.responsetext %>")
</text>

The following displays the value of responsetext in an instruction page:

<page somepage>
responsetext = <% trial.sometrial.responsetext %>
</page>


responsex property

The horizontal coordinate of the mouse cursor at the moment the last response was given by the participant for the specified trial or block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

If the element is a block, this returns the x coordinate on the most recent trial that was run within the block. If the element is a trial, this returns the x coordinate the last time the trial was run. This returns -1 if the coordinate is unknown.

Examples

The following displays the value of responsex in a text stimulus:

<text sometext>
/ items= ("mouse x position = <% trial.sometrial.responsex %>")
</text>

The following displays the value of responsex in an instruction page:

<page somepage>
mouse x position = <% trial.sometrial.responsex %>
</page>


responsey property

The vertical coordinate of the mouse cursor at the moment the last response was given by the participant for the specified trial or block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

If the element is a block, this returns the y coordinate on the most recent trial that was run within the block. If the element is a trial, this returns the y coordinate the last time the trial was run. This returns -1 if the coordinate is unknown.

Examples

The following displays the value of responsey in a text stimulus:

<text sometext>
/ items= ("mouse y position = <% trial.sometrial.responsey %>")
</text>

The following displays the value of responsey in an instruction page:

<page somepage>
mouse y position = <% trial.sometrial.responsey %>
</page>


right property

The horizontal screen coordinate of the right of the stimulus.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

This property returns the right of the stimulus in screen pixels.

Examples

The following displays the value of right in a text stimulus:

<text sometext>
/ items= ("right = <% text.foo.right %>")
</text>

The following displays the value of right in an instruction page:

<page somepage>
right = <% defaults.right %>
</page>


rightmargin property

The amount of spacing for the right margin of a survey page.

Member of

<survey> <surveypage>

Remarks

The amount can be specified in percentages, pixels, or points.

Examples

The following displays the value of rightmargin in a text stimulus:

<text sometext>
/ items= ("rightmargin = <% surveypage.page3.rightmargin %>")
</text>

The following displays the value of rightmargin in an instruction page:

<page somepage>
rightmargin = <% survey.mysurvey.rightmargin %>
</page>


rightx property

The position of the right joystick along the x (left-right) axis.

Member of

<joystick>

Remarks

The value runs from -1.0 to 1.0, with 0 representing the joystick in the center position

Examples

The following displays the value of rightx the joystick:

<page somepage>
joystick rightx position = <% joystick.rightx %>
</page>


righty property

The position of the right joystick along the y (forward-back) axis.

Member of

<joystick>

Remarks

The value runs from -1.0 to 1.0, with 0 representing the joystick in the center position

Examples

The following displays the value of righty the joystick:

<page somepage>
joystick righty position = <% joystick.righty %>
</page>


rotation property

The angle of rotation in degrees with which to display stimulus.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

The default is 0 degrees. Positive numbers values the stimulus right. Negative values rotate the stimulus in left.

Examples

The following displays the degrees of rotation of a text stimulus:

<text sometext>
/ items = ("degrees = <% text.foo.rotation %>")
</text>

The following rotates a picture stimulus 20 degrees clockwise:

<picture targets>
/ items = targetitems
/onprepare = [picture.targets.rotation = 20;]
</picture>


rx property

The rotation of joystick along the x axis.

Member of

<joystick>

Remarks

The value runs from -1000 to 1000, with 0 representing the joystick in the center position

Examples

The following displays the value of rx the joystick:

<page somepage>
joystick rx position = <% joystick.rx %>
</page>


ry property

The rotation of joystick along the y axis.

Member of

<joystick>

Remarks

The value runs from -1000 to 1000, with 0 representing the joystick in the center position

Examples

The following displays the value of ry the joystick:

<page somepage>
joystick ry position = <% joystick.ry %>
</page>


rz property

The rotation of joystick along the z axis.

Member of

<joystick>

Remarks

The value runs from -1000 to 1000, with 0 representing the joystick in the center position

Examples

The following displays the value of rz the joystick:

<page somepage>
joystick rz position = <% joystick.rz %>
</page>


saccadethreshold property

The saccadethreshold property specifies the saccade angular velocity threshold in degrees per second used in determining when a fixation is completed.

Member of

<eyetracker> <eyetracker>

Remarks

If the eye moves faster than the threshold it indicates a potential saccade and the end of the current fixation.

Examples

The following displays the value of saccadethreshold in a text stimulus:

<text sometext>
/ items= ("saccadethreshold = <% eyetracker.saccadethreshold %>")
</text>


scale property

The scale factor to apply to the size of the stimulus.

Member of

<clock> <picture> <shape> <text> <video>

Remarks

The default is 1.0 scale. Values smaller than 1.0 reduce the size of the stimulus while values larger than 1.0 increase the size.

Examples

The following displays the scale of a text stimulus:

<text sometext>
/ items = ("scale = <% text.foo.scale %>")
</text>

The following scales a picture stimulus to 1.5 times it size:

<picture targets>
/ items = targetitems
/onprepare = [picture.targets.scale = 1.5;]
</picture>


scalewidth property

The width of the likert scale.

Member of

<likert>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the width of the anchors of a likert scale:

<text sometext>
/ items= ("correct = <% trial.somelikert.scalewidth %>")
</text>

The following displays width of the anchors of a likert scale:

<page somepage>
correct = <% trial.somelikert.scalewidth %>
</page>


screencapture property

Indicates whether a snapshot of the screen as it appears during the final frame of the trial should be saved to an image file.

Member of

<block> <expt> <trial>

Remarks

A value of 1 indicates the screencapture will be saved, 0 indicates it will not.

Examples

The following displays the value of screencapture in a text stimulus:

<text sometext>
/ items= ("screencapture = <% trial.q1.screencapture %>")
</text>

The following displays the value of screencapture in an instruction page:

<page somepage>
screencapture = <% trial.q2.screencapture %>
</page>


screencolor property

The color of the screen (background).

Member of

<block> <instruct>

Remarks

This property can be set to any named color value (e.g., white, blue, green, lightyellow, ...).

Examples

The following block randomly sets its background color to yellow or white:

<block someblock>
/ trials = [1-10=test]
/ ontrialbegin = [if(rand(1, 100) > 50) { block.someblock.screencolor = yellow; } else { block.someblock.screencolor = white; } ]
</block>


screencolorblue property

A value from 0 ot 255 specifying the intensity of the blue component of the screen color.

Member of

<block> <instruct>

Remarks

Higher values mean the color has more blue.

Examples

The following displays the value of screencolorblue in a text stimulus:

<text sometext>
/ items= ("screencolorblue = <% block.someblock.screencolorblue %>")
</text>

The following displays the value of screencolorblue in an instruction page:

<page somepage>
screencolorblue = <% block.ablock.screencolorblue %>
</page>


screencolorgreen property

A value from 0 ot 255 specifying the intensity of the green component of the screen color.

Member of

<block> <instruct>

Remarks

Higher values mean the color has more green.

Examples

The following displays the value of screencolorgreen in a text stimulus:

<text sometext>
/ items= ("screencolorgreen = <% block.someblock.screencolorgreen %>")
</text>

The following displays the value of screencolorgreen in an instruction page:

<page somepage>
screencolorgreen = <% block.ablock.screencolorgreen %>
</page>


screencolorred property

A value from 0 ot 255 specifying the intensity of the red component of the screen color.

Member of

<block> <instruct>

Remarks

Higher values mean the color has more red.

Examples

The following displays the value of screencolorred in a text stimulus:

<text sometext>
/ items= ("screencolorred = <% block.someblock.screencolorred %>")
</text>

The following displays the value of screencolorred in an instruction page:

<page somepage>
screencolorred = <% block.ablock.screencolorred %>
</page>


screenheight property

The height of the screen in pixels.

Member of

<display>

Remarks

The screenheight property returns the vertical resolution of the main screen.

Examples

The following records the value of screenwidth in the summary data file:

<summarydata>
/ columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, display.screenwidth, display.screenheight)
</summarydata>

The following displays the value of screenheight in an instruction page:

<page somepage>
screenheight = <% display.screenheight %>
</page>


screenwidth property

The width of the screen in pixels.

Member of

<display>

Remarks

The screenwidth property returns the horizontal pixel resolution of the main screen.

Examples

The following records the value of screenwidth in the summary data file:

<summarydata>
/ columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, display.screenwidth, display.screenheight)
</summarydata>

The following displays the value of screenwidth in an instruction page:

<page somepage>
screenwidth = <% display.screenwidth %>
</page>


sdlatency property

The standard deviation of response latencies for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of sdlatency in a text stimulus:

<text sometext>
/ items= ("sdlatency = <% trial.sometrial.sdlatency %>")
</text>

The following displays the value of sdlatency in an instruction page:

<page somepage>
sdlatency = <% trial.sometrial.sdlatency %>
</page>


sdlatency property

The standard deviation for monkey response latencies.

Member of

<monkey>

Remarks

None.

Examples

The following displays the value of sdlatency in a text stimulus:

<text sometext>
/ items= ("sdlatency = <% monkey.sdlatency %>")
</text>

The following displays the value of sdlatency in an instruction page:

<page somepage>
sdlatency = <% monkey.sdlatency %>
</page>


selected property

Indicates whether or not a given option in a multiple choice survey question was selected.

Member of

<checkboxes> <dropdown> <listbox> <radiobuttons>

Remarks

This property returns true if the option at the specified index was selected, or false if it was not selected.

Examples

The following displays whether the first item in a checkbox question was selected:

<text sometext>
/ items= ("selected = <% checkboxes.foo.selected.1 %>")
</text>

The following displays whether the second item in a listbox question was selected:

<page somepage>
selected = <% listbox.bar.selected.2 %>
</page>


selectedcaption property

The caption corresponding to the selected option on a multiple choice survey question.

Member of

<dropdown> <listbox> <radiobuttons>

Remarks

The selectedcaption property returns the caption of the selected option as defined by the <a href="../attributes/options.htm">options</a> attribute. If no option is selected, an empty string is returned.

Examples

The following displays the value of selected option in a text stimulus:

<text sometext>
/ items= ("selectedcaption = <% radiobuttons.foo.selectedcaption %>")
</text>

The following displays the value of option in an instruction page:

<page somepage>
selectedcaption = <% listbox.bar.selectedcaption %>
</page>


selectedcount property

The total number of stimulus items that have been selected without replacement.

Member of

<counter> <list> <picture> <port> <sound> <text> <video> <xid>

Remarks

None.

Examples

The following displays the value of selectedcount in a text stimulus:

<text sometext>
/ items= ("selectedcount = <% text.sometext.selectedcount %>")
</text>

The following displays the value of selectedcount in an instruction page:

<page somepage>
selectedcount = <% text.sometext.selectedcount %>
</page>


selectedcount property

The number of options selected on a multiple choice survey question.

Member of

<checkboxes> <dropdown> <listbox> <radiobuttons>

Remarks

The number of options selected on a multiple choice survey question. This is especially useful for checkbox questions which permit multiple options to be selected.

Examples

The following displays the number of selected checkbox options in a text stimulus:

<text sometext>
/ items= ("selectedcount = <% checkboxes.foo.selectedcount %>")
</text>

The following displays the number of selected listbox options in an instruction page:

<page somepage>
selectedcount = <% listbox.bar.selectedcount %>
</page>


selectedindex property

The index of the currently selected stimulus or counter item.

Member of

<counter> <picture> <port> <sound> <text> <video>

Remarks

None.

Examples

The following displays the value of selectedindex in a text stimulus:

<text sometext>
/ items= ("selectedindex = <% text.sometext.selectedindex %;>")
</text>

The following displays the value of selectedindex in an instruction page:

<page somepage>
selectedindex = <% text.sometext.selectedindex %;>
</page>


selectedvalue property

The value of the currently selected stimulus or counter item.

Member of

<counter> <picture> <port> <sound> <text> <video>

Remarks

None.

Examples

The following displays the value of selectedvalue in a text stimulus:

<text sometext>
/ items= ("selectedvalue = <% text.sometext.selectedvalue %>")
</text>

The following displays the value of selectedvalue in an instruction page:

<page somepage>
selectedvalue = <% text.sometext.selectedvalue %>
</page>


selectedvalue property

The value of a response given on a multiple choice survey question.

Member of

<dropdown> <listbox> <radiobuttons>

Remarks

If the <a href="../attributes/optionvalues.htm">optionvalues</a> attribute is defined, the selectedvalue property returns one the optionvalue corresponding to the selected option. If the optionvalues attribute is not defined, the caption of the selected option as defined by the <a href="../attributes/options.htm">options</a> attribute is returned. In either case, if no option is selected, an empty string is returned.

Examples

The following displays the value of selected option in a text stimulus:

<text sometext>
/ items= ("selectedvalue = <% radiobuttons.foo.selectedvalue %>")
</text>

The following displays the value of option in an instruction page:

<page somepage>
selectedvalue = <% listbox.bar.selectedvalue %>
</page>


selectionmode property

The method for selecting new items.

Member of

<counter>

Remarks

This property specifies how items are selected, for example randomly without replacement or in sequence.

Examples

The following displays the value of selectionmode in a text stimulus:

<text sometext>
/ items= ("selectionmode = <% counter.randomcounter.selectionmode %>")
</text>

The following displays the value of selectionmode in an instruction page:

<page somepage>
selectionmode = <% counter.sequencecounter.selectionmode %>
</page>


selectionmode property

The method for selecting new items.

Member of

<batch> <list>

Remarks

This property is an integer that determines the mode with which items are selected from a list. Random selection according to a normal distribution is 0, sequential is 1, uniform distribution is 2, and expression is 3.

Examples

The following sets selection mode to sequential:

<trial example>
/ ontrialbegin = [list.mountainRanges.selectionmode = 1;]
</trial>


selectionrate property

The frequency with which a counter new items are selected.

Member of

<counter> <list>

Remarks

This property indicates whether a new item is selected each trial, block, or experiment.

Examples

The following displays the value of selectionrate in a text stimulus:

<text sometext>
/ items= ("selectionrate = <% counter.randomcounter.selectionrate %>")
</text>

The following displays the value of selectionrate in an instruction page:

<page somepage>
selectionrate = <% counter.sequencecounter.selectionrate %>
</page>


sessionid property

The current session id.

Member of

<script>

Remarks

Examples

The following displays the value of sessionid in a text stimulus:

<text sometext>
/ items= ("sessionid = <% script.sessionid %>")
</text>

The following displays the value of sessionid in an instruction page:

<page somepage>
sessionid = <% script.sessionid %>
</page>


showbackbutton property

Whether to show the back button on a survey page.

Member of

<survey> <surveypage>

Remarks

A value of 1 indicates the button will be shown, 0 indicates it will not.

Examples

The following displays the value of showbackbutton in a text stimulus:

<text sometext>
/ items= ("showbackbutton = <% surveypage.page3.showbackbutton %>")
</text>

The following displays the value of showbackbutton in an instruction page:

<page somepage>
showbackbutton = <% survey.mysurvey.showbackbutton %>
</page>


showborders property

Whether to show a border surrounding an HTML page.

Member of

<html>

Remarks

A value of 1 indicates the button will be shown, 0 indicates it will not.

Examples

The following displays the value of showborders in a text stimulus:

<text sometext>
/ items= ("showborders = <% html.somehtml.showborders %>")
</text>


showmousecursor property

Indicates whether the mouse cursor should be visible on the screen during the experiment, block, or trial.

Member of

<block> <expt> <trial>

Remarks

A value of 1 indicates the mouse cursor will be shown, 0 indicates it will not.

Examples

The following displays the value of showmousecursor in a text stimulus:

<text sometext>
/ items= ("showmousecursor = <% trial.q1.showmousecursor %>")
</text>

The following displays the value of showmousecursor in an instruction page:

<page somepage>
showmousecursor = <% trial.q2.showmousecursor %>
</page>


shownextbutton property

Whether to show the next button on a survey page.

Member of

<survey> <surveypage>

Remarks

A value of 1 indicates the button will be shown, 0 indicates it will not.

Examples

The following displays the value of shownextbutton in a text stimulus:

<text sometext>
/ items= ("shownextbutton = <% surveypage.page3.shownextbutton %>")
</text>

The following displays the value of shownextbutton in an instruction page:

<page somepage>
shownextbutton = <% survey.mysurvey.shownextbutton %>
</page>


showpagenumbers property

Whether to show page numbers on a survey page.

Member of

<survey> <surveypage>

Remarks

A value of 1 indicates the button will be shown, 0 indicates it will not.

Examples

The following displays the value of showpagenumbers in a text stimulus:

<text sometext>
/ items= ("showpagenumbers = <% surveypage.page3.showpagenumbers %>")
</text>

The following displays the value of showpagenumbers in an instruction page:

<page somepage>
showpagenumbers = <% survey.mysurvey.showpagenumbers %>
</page>


showquestionnumbers property

Whether to show question numbers on a survey page.

Member of

<survey> <surveypage>

Remarks

A value of 1 indicates the button will be shown, 0 indicates it will not.

Examples

The following displays the value of showquestionnumbers in a text stimulus:

<text sometext>
/ items= ("showquestionnumbers = <% surveypage.page3.showquestionnumbers %>")
</text>

The following displays the value of showquestionnumbers in an instruction page:

<page somepage>
showquestionnumbers = <% survey.mysurvey.showquestionnumbers %>
</page>


showscrollbars property

Whether to show horizontal and vertical scrollbars for HTML page.

Member of

<html>

Remarks

A value of 1 indicates the button will be shown, 0 indicates it will not.

Examples

The following displays the value of showscrollbars in a text stimulus:

<text sometext>
/ items= ("showscrollbars = <% html.somehtml.showscrollbars %>")
</text>


showticks property

Whether to show tick marks on a slider survey item.

Member of

<slider> <slidertrial>

Remarks

A value of 1 indicates the button will be shown, 0 indicates it will not.

Examples

The following displays the value of showticks in a text stimulus:

<text sometext>
/ items= ("showticks = <% slider.q1.showticks %>")
</text>

The following displays the value of showticks in an instruction page:

<page somepage>
showticks = <% slider.q2.showticks %>
</page>


skip property

Determines whether or not the presentation of the given stimulus should be skipped.

Member of

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

Remarks

This property provides an easy way to remove stimuli from the stimulus presentation sequence. A value of true (or a nonzero number) indicates the stimulus will be not be presented, even if it is listed among the stimulusframes for the current trial. A value of false (or zero) it will be presented as usual. By default, skip is false for all stimuli.

Examples

The following displays the value of skip in a text stimulus:

<text sometext>
/ items= ("skip = <% text.sometext.skip %>")
</text>

The following displays the value of skip in an instruction page:

<page somepage>
skip = <% text.sometext.skip %>
</page>


slider property

The position of the slider on the joystick.

Member of

<joystick>

Remarks

The value runs from -1000 to 1000, with 0 representing the slider in the center position. This is a collection property with a maximum of 2 sliders.

Examples

The following displays the value of slider the joystick:

<page somepage>
position of slider 1 = <% joystick.slider.1 %>
</page>


sliderheight property

The height of the slider or dropdown used by survey item.

Member of

<slider>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the value of sliderheight in a text stimulus:

<text sometext>
/ items= ("sliderheight = <% slider.q1.sliderheight %>")
</text>

The following displays the value of sliderheight in an instruction page:

<page somepage>
sliderheight = <% slider.q1.sliderheight %>
</page>


sliderwidth property

The width of the slider or dropdown used by survey item.

Member of

<slider>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the value of sliderwidth in a text stimulus:

<text sometext>
/ items= ("sliderwidth = <% slider.q1.sliderwidth %>")
</text>

The following displays the value of sliderwidth in an instruction page:

<page somepage>
sliderwidth = <% slider.q1.sliderwidth %>
</page>


soundcapture property

Indicates whether a recording of audio is captured during the expt, block, or trial.

Member of

<block> <expt> <likert> <openended> <slidertrial> <survey> <surveypage> <trial>

Remarks

A value of true or 1 indicates the soundcapture will be saved, false or 0 indicates it will not. Changes to this property must be made before the expt, block, or trial runs.

Examples

The following displays the value of soundcapture in a text stimulus:

<text sometext>
/ items= ("soundcapture = <% trial.q1.soundcapture %>")
</text>

The following displays the value of soundcapture in an instruction page:

<page somepage>
soundcapture = <% trial.q2.soundcapture %>
</page>

The following enables recording if the subject was taking longer than expected in the last block:

<block myblock>
/ trials=[1-5=practicetrial; 6-10=testtrial)]
/ onblockbegin=[if (values.lastblockreponsetimes > 1000) block.myblock.soundcapture = true]
</block>


standarddeviation property

The standarddeviation of all values in the list.

Member of

<list>

Remarks

Evaluates every item in the list and calculates the standard deviation. Non-numeric values are assigned a value of 0. If no numeric items are in the list, the property returns 0.

Examples

The following displays the standarddeviation of the values in a list:

<page somepage>
file = <% list.ratings.standarddeviation %>
</page>


startdate property

The date at which this script session began.

Member of

<script>

Remarks

The format of the time is mmddyyyy. For example, June 6th, 2011 would appear as "06062011".

Examples

The following displays the value of starttime in a text stimulus:

<text sometext>
/ items= ("startdate = <% script.startdate %>")
</text>

The following saves the startdate (among other values) to a summary data file:

<summarydata>
/ columns=[script.subjectid, script.startdate, script.starttime, expressions.da, expressions.db, expressions.d]
/ file="iat_summary.iqdat"
</summarydata>


starttime property

The time at which this script session began.

Member of

<script>

Remarks

Time is retrieved from the local computer's clock and is reported in the local computer's time zone. The format of the time is hh:mm:ss where hours range from 1 to 24.

Examples

The following displays the value of starttime in a text stimulus:

<text sometext>
/ items= ("starttime = <% script.starttime %>")
</text>

The following displays the value of starttime in an instruction page:

<page somepage>
starttime = <% script.starttime %>
</page>


stimulusonset property

Returns onset time of the stimulus.

Member of

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

Remarks

The onset time is the point at which the stimulus is presented relative to the start of the trial. If a stimulus is presented multiple times in a trial, the onset times for each presentation can be obtained by treating property as a collection and specifying the index of the presentation to return.

Examples

The following displays the value of stimulusonset in a text stimulus:

<text sometext>
/ items = ("stimulusonset = <% text.sometext.stimulusonset.1 %>")
</text>

The following displays the value of stimulusonset in an instruction page:

<page somepage>
stimulusonset = <% stimulusonset.negativestimulusonsets.stimulusonset.1 %>
</page>


subcaption property

The text subcaption on a survey question.

Member of

<caption> <checkboxes> <dropdown> <image> <listbox> <radiobuttons> <slider> <surveypage> <surveypage> <textbox>

Remarks

Examples

The following displays the value of subcaption in a text stimulus:

<text sometext>
/ items= ("subcaption = <% listbox.q1.subcaption %>")
</text>

The following displays the value of subcaption in an instruction page:

<page somepage>
subcaption = <% checkboxes.q2.subcaption %>
</page>


subcaptionfontheight property

The height of the font used to print the subcaption on a survey question.

Member of

<caption> <checkboxes> <dropdown> <image> <listbox> <radiobuttons> <slider> <surveypage> <textbox>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the value of subcaptionfontheight in a text stimulus:

<text sometext>
/ items= ("subcaptionfontheight = <% listbox.q1.subcaptionfontheight %>")
</text>

The following displays the value of subcaptionfontheight in an instruction page:

<page somepage>
subcaptionfontheight = <% checkboxes.q2.subcaptionfontheight %>
</page>


subjectid property

The current subject id code.

Member of

<script>

Remarks

Examples

The following displays the value of subjectid in a text stimulus:

<text sometext>
/ items= ("subjectid = <% script.subjectid %>")
</text>

The following displays the value of subjectid in an instruction page:

<page somepage>
subjectid = <% script.subjectid %>
</page>


sumlatency property

The sum of all response latencies for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of sumlatency in a text stimulus:

<text sometext>
/ items= ("sumlatency = <% trial.sometrial.sumlatency %>")
</text>

The following displays the value of sumlatency in an instruction page:

<page somepage>
sumlatency = <% trial.sometrial.sumlatency %>
</page>


textbgcolor property

The background color of the bounding rectangle for text.

Member of

<clock> <text>

Remarks

Examples

The following trial sets the background color of feedback message based on whether or not the response to the previous trial was correct:

<trial feedback>
/ontrialbegin = [ if (trial.test.correct == true) text.feedback.textbgcolor = white; else text.feedback.textbgcolor = yellow; ]
/ stimulusframes = [1=feedback]
</trial>


textbgcolorblue property

The value (0 to 255) of the blue component of a text's background color.

Member of

<clock> <text>

Remarks

Examples

The following displays the value of textbgcolorblue in a text stimulus:

<text sometext>
/ items= ("textbgcolorblue = <% text.circle.textbgcolorblue %>")
</text>

The following displays the value of textbgcolorblue in an instruction page:

<page somepage>
textbgcolorblue = <% text.circle.textbgcolorblue %>
</page>


textbgcolorgreen property

The value (0 to 255) of the green component of a text's background color.

Member of

<clock> <text>

Remarks

Examples

The following displays the value of textbgcolorgreen in a text stimulus:

<text sometext>
/ items= ("textbgcolorgreen = <% text.bar.textbgcolorgreen %>")
</text>

The following displays the value of textbgcolorgreen in an instruction page:

<page somepage>
textbgcolorgreen = <% text.foo.textbgcolorgreen %>
</page>


textbgcolorred property

The value (0 to 255) of the red component of a text's background color.

Member of

<clock> <text>

Remarks

Examples

The following displays the value of textbgcolorred in a text stimulus:

<text sometext>
/ items= ("textbgcolorred = <% text.circle.textbgcolorred %>")
</text>

The following displays the value of textbgcolorred in an instruction page:

<page somepage>
textbgcolorred = <% text.circle.textbgcolorred %>
</page>


textboxheight property

The height of the textbox used by survey item.

Member of

<textbox>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the value of textboxheight in a text stimulus:

<text sometext>
/ items= ("textboxheight = <% textbox.q1.textboxheight %>")
</text>

The following displays the value of textboxheight in an instruction page:

<page somepage>
textboxheight = <% textbox.q1.textboxheight %>
</page>


textboxwidth property

The width of the textbox used by survey item.

Member of

<textbox>

Remarks

The value can be specified in percentages, pixels, or points.

Examples

The following displays the value of textboxwidth in a text stimulus:

<text sometext>
/ items= ("textboxwidth = <% textbox.q1.textboxwidth %>")
</text>

The following displays the value of textboxwidth in an instruction page:

<page somepage>
textboxwidth = <% textbox.q1.textboxwidth %>
</page>


textcolor property

The foreground color used for displaying text.

Member of

<clock> <text>

Remarks

Examples

The following trial sets the color of a feedback message based on whether or not the response to the previous trial was correct:

<trial feedback>
/ontrialbegin = [ if (trial.test.correct == true) text.feedback.textcolor = green; else text.feedback.textcolor = red; ]
/ stimulusframes = [1=feedback]
</trial>


textcolorblue property

The value (0 to 255) of the blue component of a text's color.

Member of

<clock> <text>

Remarks

Examples

The following displays the value of textcolorblue in a text stimulus:

<text sometext>
/ items= ("textcolorblue = <% text.bar.textcolorblue %>")
</text>

The following displays the value of textcolorblue in an instruction page:

<page somepage>
textcolorblue = <% text.foo.textcolorblue %>
</page>


textcolorgreen property

The value (0 to 255) of the green component of a text's color.

Member of

<clock> <text>

Remarks

Examples

The following displays the value of textcolorgreen in a text stimulus:

<text sometext>
/ items= ("textcolorgreen = <% text.bar.textcolorgreen %>")
</text>

The following displays the value of textcolorgreen in an instruction page:

<page somepage>
textcolorgreen = <% text.foo.textcolorgreen %>
</page>


textcolorred property

The value (0 to 255) of the red component of a text's color.

Member of

<clock> <text>

Remarks

Examples

The following displays the value of textcolorred in a text stimulus:

<text sometext>
/ items= ("textcolorred = <% text.bar.textcolorred %>")
</text>

The following displays the value of textcolorred in an instruction page:

<page somepage>
textcolorred = <% text.foo.textcolorred %>
</page>


timeout property

The point at which a trial, block, or other event terminates if no response was made.

Member of

<block> <clock> <expt> <instruct> <likert> <openended> <response> <slidertrial> <survey> <surveypage> <trial> <video>

Remarks

Examples

The following displays the timeout of a trial element in a text stimulus:

<text sometext>
/ items= ("timeout = <% trial.sometrial.timeout %>")
</text>

The following displays the timeout of a trial in an instruction page:

<page somepage>
timeout = <% trial.sometrial.timeout %>
</page>


timerresolution property

The resolution of the system's timer.

Member of

<computer>

Remarks

Examples

The following displays the ip address in a text stimulus:

<text sometext>
/ items= ("correct = <% computer.timerresolution %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
correct = <% computer.timerresolution %>
</page>


timestamp property

The number of milliseconds elapsed from the start of the script to the start of the expt, block, or trial, or the onset of a stimulus.

Member of

<block> <button> <clock> <expt> <html> <likert> <openended> <picture> <shape> <slidertrial> <sound> <survey> <surveypage> <text> <trial> <video> <xid>

Remarks

Examples

The following displays the timestamp of a trial element in a text stimulus:

<text sometext>
/ items= ("timestamp = <% trial.sometrial.timestamp %>")
</text>

The following displays the timestamp of a trial in an instruction page:

<page somepage>
timestamp = <% trial.sometrial.timestamp %>
</page>


top property

The horizontal screen coordinate of the top of the stimulus.

Member of

<button> <clock> <picture> <shape> <text> <video>

Remarks

This property returns the top of the stimulus in screen pixels.

Examples

The following displays the value of top in a text stimulus:

<text sometext>
/ items= ("top = <% text.foo.top %>")
</text>

The following displays the value of top in an instruction page:

<page somepage>
top = <% defaults.top %>
</page>


topmargin property

The amount of spacing for the top margin of a survey page.

Member of

<survey> <surveypage>

Remarks

The amount can be specified in percentages, pixels, or points.

Examples

The following displays the value of topmargin in a text stimulus:

<text sometext>
/ items= ("topmargin = <% surveypage.page3.topmargin %>")
</text>

The following displays the value of topmargin in an instruction page:

<page somepage>
topmargin = <% survey.mysurvey.topmargin %>
</page>


totalcorrectcount property

The number of correct responses for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalcorrectcount in a text stimulus:

<text sometext>
/ items= ("totalcorrectcount = <% trial.sometrial.totalcorrectcount %>")
</text>

The following displays the value of totalcorrectcount in an instruction page:

<page somepage>
totalcorrectcount = <% trial.sometrial.totalcorrectcount %>
</page>


totalcount property

The number of times the specified element was run over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalcount in a text stimulus:

<text sometext>
/ items= ("totalcount = <% trial.sometrial.totalcount %>")
</text>

The following displays the value of totalcount in an instruction page:

<page somepage>
totalcount = <% trial.sometrial.totalcount %>
</page>


totalerrorcount property

The number of incorrect responses for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalerrorcount in a text stimulus:

<text sometext>
/ items= ("totalerrorcount = <% trial.sometrial.totalerrorcount %>")
</text>

The following displays the value of totalerrorcount in an instruction page:

<page somepage>
totalerrorcount = <% trial.sometrial.totalerrorcount %>
</page>


totalmaxlatency property

The longest response latency for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalmaxlatency in a text stimulus:

<text sometext>
/ items= ("totalmaxlatency = <% trial.sometrial.totalmaxlatency %>")
</text>

The following displays the value of totalmaxlatency in an instruction page:

<page somepage>
totalmaxlatency = <% trial.sometrial.totalmaxlatency %>
</page>


totalmeanlatency property

The mean response latency for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalmeanlatency in a text stimulus:

<text sometext>
/ items= ("totalmeanlatency = <% trial.sometrial.totalmeanlatency %>")
</text>

The following displays the value of totalmeanlatency in an instruction page:

<page somepage>
totalmeanlatency = <% trial.sometrial.totalmeanlatency %>
</page>


totalmedianlatency property

The median response latency for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalmedianlatency in a text stimulus:

<text sometext>
/ items= ("totalmedianlatency = <% trial.sometrial.totalmedianlatency %>")
</text>

The following displays the value of totalmedianlatency in an instruction page:

<page somepage>
totalmedianlatency = <% trial.sometrial.totalmedianlatency %>
</page>


totalminlatency property

The shortest response latency for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalminlatency in a text stimulus:

<text sometext>
/ items= ("totalminlatency = <% trial.sometrial.totalminlatency %>")
</text>

The following displays the value of totalminlatency in an instruction page:

<page somepage>
totalminlatency = <% trial.sometrial.totalminlatency %>
</page>


totalnumcorrect property

The total number of correct responses given for this element.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalnumcorrect in a text stimulus:

<text sometext>
/ items= ("totalnumcorrect = <% trial.sometrial.totalnumcorrect %>")
</text>

The following displays the value of totalnumcorrect in an instruction page:

<page somepage>
totalnumcorrect = <% trial.sometrial.totalnumcorrect %>
</page>


totalnuminwindow property

The number of responses inside the response window for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalnuminwindow in a text stimulus:

<text sometext>
/ items= ("totalnuminwindow = <% trial.sometrial.totalnuminwindow %>")
</text>

The following displays the value of totalnuminwindow in an instruction page:

<page somepage>
totalnuminwindow = <% trial.sometrial.totalnuminwindow %>
</page>


totalpercentcorrect property

The percent of correct responses for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalpercentcorrect in a text stimulus:

<text sometext>
/ items= ("totalpercentcorrect = <% trial.sometrial.totalpercentcorrect %>")
</text>

The following displays the value of totalpercentcorrect in an instruction page:

<page somepage>
totalpercentcorrect = <% trial.sometrial.totalpercentcorrect %>
</page>


totalpercentinwindow property

The percent of responses inside the response window for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalpercentinwindow in a text stimulus:

<text sometext>
/ items= ("totalpercentinwindow = <% trial.sometrial.totalpercentinwindow %>")
</text>

The following displays the value of totalpercentinwindow in an instruction page:

<page somepage>
totalpercentinwindow = <% trial.sometrial.totalpercentinwindow %>
</page>


totalsdlatency property

The standard deviation of response latencies for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalsdlatency in a text stimulus:

<text sometext>
/ items= ("totalsdlatency = <% trial.sometrial.totalsdlatency %>")
</text>

The following displays the value of totalsdlatency in an instruction page:

<page somepage>
totalsdlatency = <% trial.sometrial.totalsdlatency %>
</page>


totalsumlatency property

The sum of all response latencies for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalsumlatency in a text stimulus:

<text sometext>
/ items= ("totalsumlatency = <% trial.sometrial.totalsumlatency %>")
</text>

The following displays the value of totalsumlatency in an instruction page:

<page somepage>
totalsumlatency = <% trial.sometrial.totalsumlatency %>
</page>


totaltrialcount property

The number of trials that have been run within the given element within the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totaltrialcount in a text stimulus:

<text sometext>
/ items= ("totaltrialcount = <% trial.sometrial.totaltrialcount %>")
</text>

The following displays the value of totaltrialcount in an instruction page:

<page somepage>
totaltrialcount = <% trial.sometrial.totaltrialcount %>
</page>


totalvarlatency property

The variance of response latencies for the specified element over the entire experiment.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of totalvarlatency in a text stimulus:

<text sometext>
/ items= ("totalvarlatency = <% trial.sometrial.totalvarlatency %>")
</text>

The following displays the value of totalvarlatency in an instruction page:

<page somepage>
totalvarlatency = <% trial.sometrial.totalvarlatency %>
</page>


touch property

This property reports whether the computer is a touch device.

Member of

<computer>

Remarks

Examples

The following displays the if we're on a touch device':

<text sometext>
/ items= ("touch = <% computer.touch %>")
</text>

The following displays the application mode in an instruction page:

<page somepage>
touch = <% computer.touch %>
</page>


trialcode property

The trialcode for the given trial.

Member of

<likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

None.

Examples

The following displays the value of trialcode in a text stimulus:

<text sometext>
/ items= ("trialcode = <% trial.sometrial.trialcode %>")
</text>

The following displays the value of trialcode in an instruction page:

<page somepage>
trialcode = <% trial.sometrial.trialcode %>
</page>


trialcount property

The number of trials that have been run within the given element within the current block.

Member of

<block> <expt> <likert> <openended> <script> <slidertrial> <trial>

Remarks

If the element is a block, this property returns the total number of trials run in the block regardless of trial type. If the element is a trial, this returns the number of times that type of trial was run within the block.

Examples

The following displays the value of trialcount in a text stimulus:

<text sometext>
/ items= ("trialcount = <% trial.sometrial.trialcount %>")
</text>

The following displays the value of trialcount in an instruction page:

<page somepage>
trialcount = <% trial.sometrial.trialcount %>
</page>


trialduration property

The trialduration for the given trial.

Member of

<likert> <openended> <slidertrial> <surveypage> <trial>

Remarks

None.

Examples

The following displays the value of trialduration in a text stimulus:

<text sometext>
/ items= ("trialduration = <% trial.sometrial.trialduration %>")
</text>

The following displays the value of trialduration in an instruction page:

<page somepage>
trialduration = <% trial.sometrial.trialduration %>
</page>


trialscount property

The number trials that a block will run.

Member of

<block> <survey>

Remarks

This property specifies the number of trials a block will run. (Note this is distinct from the trialcount property which keeps a running tabulation of the number of trials run.

Examples

The following displays the value of trialscount in a text stimulus:

<text sometext>
/ items= ("trialscount = <% block.someblock.trialscount %>")
</text>

The following displays the value of trialscount in an instruction page:

<page somepage>
trialscount = <% block.someblock.trialscount %>
</page>


typename property

The type name of the element.

Member of

<batch> <block> <button> <caption> <checkboxes> <clock> <counter> <data> <defaults> <dropdown> <expt> <htmlpage> <image> <include> <instruct> <item> <likert> <list> <listbox> <monkey> <openended> <page> <picture> <port> <radiobuttons> <response> <shape> <slider> <slidertrial> <sound> <text> <textbox> <trial> <video> <xid>

Remarks

The type name is the tag name of the element (e.g., "trial", "block", "expt", ...).

Examples

The following displays the type name of a trial element in a text stimulus:

<text sometext>
/ items= ("typename = <% trial.sometrial.typename %>")
</text>

The following displays the type name of a trial in an instruction page:

<page somepage>
typename = <% trial.sometrial.typename %>
</page>


unselectedcount property

The total number of stimulus items that have yet to be selected without replacement.

Member of

<counter> <list> <picture> <port> <sound> <text> <video> <xid>

Remarks

None.

Examples

The following displays the value of unselectedcount in a text stimulus:

<text sometext>
/ items= ("unselectedcount = <% text.sometext.unselectedcount %>")
</text>

The following displays the value of unselectedcount in an instruction page:

<page somepage>
unselectedcount = <% text.sometext.unselectedcount %>
</page>


userid property

The userid used to login when saving a file to a protected location.

Member of

<data>

Remarks

Examples

The following displays the value of userid in a text stimulus:

<text sometext>
/ items= ("userid = <% data.userid %>")
</text>

The following displays the value of userid in an instruction page:

<page somepage>
userid = <% data.userid %>
</page>


variance property

The variance of the values in the list.

Member of

<list>

Remarks

Evaluates every item in the list and calculates the variance. Non-numeric values are assigned a value of 0. If no numeric items are in the list, the property returns 0.

Examples

The following displays the variance of the values in a list:

<page somepage>
file = <% list.ratings.variance %>
</page>


varlatency property

The variance of response latencies for the specified element within the current block.

Member of

<block> <expt> <likert> <openended> <slidertrial> <trial>

Remarks

None.

Examples

The following displays the value of varlatency in a text stimulus:

<text sometext>
/ items= ("varlatency = <% trial.sometrial.varlatency %>")
</text>

The following displays the value of varlatency in an instruction page:

<page somepage>
varlatency = <% trial.sometrial.varlatency %>
</page>


version property

The current version number of Inquisit.

Member of

<inquisit>

Remarks

The version property can be used in combination with the releasedate property to track which version of Inquisit was used to collect a given set of data.

Examples

The following displays the value of version in a text stimulus:

<text sometext>
/ items= ("version = <% inquisit.version %>")
</text>

The following saves the version (among other values) to a summary data file:

<summarydata>
/ columns=[script.subjectid, script.startdate, script.starttime, inquisit.version, inquisit.releasedate, expressions.da, expressions.db, expressions.d]
/ file="iat_summary.iqdat"
</summarydata>


voiceover property

Determines whether or not instruction or text should be read aloud using the devices text-to-speech services (e.g., Siri on iPhones).

Member of

<html> <instruct> <text>

Remarks

The property returns a boolean value of true or false. The default is false.

Examples

The following trial asks the participant if whether to enable voice over, and sets the voiceover property to true if they select yes:

<trial voiceovercheck>
/ stimulusframes=[1=voiceover_question, yes, no]
/ validresponse = (yes, no)
/ ontrialend = [ if(trial.voiceovercheck.response == "yes") text.instructions.voiceover = true;]
</trial>


volume property

Controls the volume at which a sound is played.

Member of

<sound>

Remarks

Examples

The following displays the value of volume in a text stimulus:

<text sometext>
/ items= ("volume = <% sound.foo.volume %>")
</text>

The following displays the value of volume in an instruction page:

<page somepage>
volume = <% sound.city.volume %>
</page>


vposition property

The vertical position of the item on the canvase.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <likert> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

The vposition can be specified in percentages, pixels, or points.

Examples

The following displays the value of vposition in a text stimulus:

<text sometext>
/ items= ("vposition = <% text.foo.vposition %>")
</text>


wait property

The duration to wait before allowing the participant to advance to the next instruction page.

Member of

<instruct>

Remarks

Examples

The following displays the wait of wait in a text stimulus:

<text sometext>
/ items= ("wait = <% waits.wait %>")
</text>

The following displays the wait of wait in an instruction page:

<page somepage>
wait = <% waits.wait %>
</page>


width property

The display width of the item.

Member of

<button> <caption> <checkboxes> <clock> <display> <dropdown> <image> <instruct> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

The width can be specified in percentages, pixels, or points.

Examples

The following displays the value of width in a text stimulus:

<text sometext>
/ items= ("width = <% text.foo.width %>")
</text>

The following displays the value of width in an instruction page:

<page somepage>
width = <% defaults.width %>
</page>


widthpct property

The display width of the item as a percentage of the canvas width.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <instruct> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

Use the widthpx attribute to get the width in pixels.

Examples

The following displays the value of width in a text stimulus:

<text sometext>
/ items= ("width = <% text.foo.widthpct %>")
</text>

The following displays the value of width in an instruction page:

<page somepage>
width = <% defaults.widthpct %>
</page>


widthpx property

The display width of the item in pixels.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <instruct> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

Use the widthpx attribute to get the width in pixels.

Examples

The following displays the value of width in a text stimulus:

<text sometext>
/ items= ("width = <% text.foo.widthpx %>")
</text>

The following displays the value of width in an instruction page:

<page somepage>
width = <% defaults.widthpx %>
</page>


windowcenter property

The time marking the midpoint of the response window.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowcenter in a text stimulus:

<text sometext>
/ items= ("windowcenter = <% response.foo.windowcenter %>")
</text>

The following displays the value of windowcenter in an instruction page:

<page somepage>
windowcenter = <% response.bar.windowcenter %>
</page>


windowdecthreshold property

The amount of time by which to decrement to the response window.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowdecthreshold in a text stimulus:

<text sometext>
/ items= ("windowdecthreshold = <% response.foo.windowdecthreshold %>")
</text>

The following displays the value of windowdecthreshold in an instruction page:

<page somepage>
windowdecthreshold = <% response.bar.windowdecthreshold %>
</page>


windowdecunit property

The amount of time by which to decrement to the response window.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowdecunit in a text stimulus:

<text sometext>
/ items= ("windowdecunit = <% response.foo.windowdecunit %>")
</text>

The following displays the value of windowdecunit in an instruction page:

<page somepage>
windowdecunit = <% response.bar.windowdecunit %>
</page>


windowhitduration property

The amount of time to display the hit stimulus indicating the response was in the window.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowhitduration in a text stimulus:

<text sometext>
/ items= ("windowhitduration = <% response.foo.windowhitduration %>")
</text>

The following displays the value of windowhitduration in an instruction page:

<page somepage>
windowhitduration = <% response.bar.windowhitduration %>
</page>


windowincthreshold property

The amount of time by which to increment to the response window.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowincthreshold in a text stimulus:

<text sometext>
/ items= ("windowincthreshold = <% response.foo.windowincthreshold %>")
</text>

The following displays the value of windowincthreshold in an instruction page:

<page somepage>
windowincthreshold = <% response.bar.windowincthreshold %>
</page>


windowincunit property

The amount of time by which to increment to the response window.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowincunit in a text stimulus:

<text sometext>
/ items= ("windowincunit = <% response.foo.windowincunit %>")
</text>

The following displays the value of windowincunit in an instruction page:

<page somepage>
windowincunit = <% response.bar.windowincunit %>
</page>


windowmaxcenter property

The maximum time permitted for the midpoint of the response window.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowmaxcenter in a text stimulus:

<text sometext>
/ items= ("windowmaxcenter = <% response.foo.windowmaxcenter %>")
</text>

The following displays the value of windowmaxcenter in an instruction page:

<page somepage>
windowmaxcenter = <% response.bar.windowmaxcenter %>
</page>


windowmincenter property

The minimum time permitted for the midpoint of the response window.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowmincenter in a text stimulus:

<text sometext>
/ items= ("windowmincenter = <% response.foo.windowmincenter %>")
</text>

The following displays the value of windowmincenter in an instruction page:

<page somepage>
windowmincenter = <% response.bar.windowmincenter %>
</page>


windowoffset property

The time at which response window ends.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowoffset in a text stimulus:

<text sometext>
/ items= ("windowoffset = <% response.foo.windowoffset %>")
</text>

The following displays the value of windowoffset in an instruction page:

<page somepage>
windowoffset = <% response.bar.windowoffset %>
</page>


windowonset property

The time at which response window begins.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowonset in a text stimulus:

<text sometext>
/ items= ("windowonset = <% response.foo.windowonset %>")
</text>

The following displays the value of windowonset in an instruction page:

<page somepage>
windowonset = <% response.bar.windowonset %>
</page>


windowwidth property

The duration of the response window.

Member of

<block> <defaults> <expt> <likert> <openended> <response> <slidertrial> <trial>

Remarks

Examples

The following displays the value of windowwidth in a text stimulus:

<text sometext>
/ items= ("windowwidth = <% response.foo.windowwidth %>")
</text>

The following displays the value of windowwidth in an instruction page:

<page somepage>
windowwidth = <% response.bar.windowwidth %>
</page>


x property

The horizontal coordinate of the mouse cursor or joystick.

Member of

<joystick> <mouse>

Remarks

With the mouse, valid values run from 0 to the number of horizontal pixels, or -1 if the position is unknown. With the joystick the value runs from -1000 to 1000, with 0 representing the joystick in the center position

Examples

The following displays the value of x for the mouse:

<text sometext>
/ items= ("mouse x position = <% mouse.x %>")
</text>

The following displays the value of x for the joystick:

<page somepage>
joystick x position = <% joystick.x %>
</page>


xpct property

The horizontal position of the item relative to the canvas in pixels.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <likert> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

Use the xpct propert to get the position of the item as a percentage of the canvas width.

Examples

The following displays the value of xpct in a text stimulus:

<text sometext>
/ items= ("xpct = <% text.foo.xpct %>")
</text>


xpx property

The horizontal position of the item relative to the canvas in pixels.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <likert> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

Use the xpct propert to get the position of the item as a percentage of the canvas width.

Examples

The following displays the value of xpx in a text stimulus:

<text sometext>
/ items= ("xpx = <% text.foo.xpx %>")
</text>


y property

The vertical coordinate of the mouse cursor or joystick.

Member of

<joystick> <mouse>

Remarks

With the mouse, valid values run from 0 to the number of vertical pixels, or -1 if the position is unknown. With the joystick the value runs from -1000 to 1000, with 0 representing the joystick in the center position

Examples

The following displays the value of y in a text stimulus:

<text sometext>
/ items= ("mouse y position = <% mouse.y %>")
</text>

The following displays the value of y the joystick:

<page somepage>
joystick y position = <% joystick.y %>
</page>


ypct property

The vertical position of the item on the canvas in pixels.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <likert> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

The ypct can be specified in percentages, pixels, or points.

Examples

The following displays the value of ypct in a text stimulus:

<text sometext>
/ items= ("ypct = <% text.foo.ypct %>")
</text>


ypx property

The vertical position of the item on the canvas in pixels.

Member of

<button> <caption> <checkboxes> <clock> <dropdown> <image> <likert> <listbox> <openended> <picture> <radiobuttons> <shape> <slider> <slidertrial> <text> <textbox> <video>

Remarks

Use the xpct property to get the position as a percentage of the canvas height.

Examples

The following displays the value of ypx in a text stimulus:

<text sometext>
/ items= ("ypx = <% text.foo.ypx %>")
</text>


z property

The horizontal coordinate of the joystick.

Member of

<joystick>

Remarks

The value runs from -1000 to 1000, with 0 representing the joystick in the center position

Examples

The following displays the value of z the joystick:

<page somepage>
joystick z position = <% joystick.z %>
</page>


How to Run a Battery of Tests with a Batch Script

If your experiment uses more than one test, those tests can be combined into a battery using a batch script. When you run the batch script, it runs all the tests in the battery automatically, one after the other. Batch scripts can be run in Inquisit Lab and Web.

This tutorial demonstrates a) how to create a batch script that combines two IATs and a short demographic survey using Inquisit Lab, and b) how to run the batch script with Inquisit Web.

Create a project folder for all the test scripts and files

Create a folder for your project. Download the tests for your experiment into the project folder.

Open Inquisit Lab and create a new (empty) script file

This will be our batch script

Save the script file to your project folder

Here we name the batch file "batch.iqx" and save it in a folder we created for this project.

Add a <batch> element

The <batch> element lists the scripts to run in the order to run them. To randomize the order, you could add the following line of code to the batch element:
/selectionmode = random

Run the batch script

The tests will run in the order you specified.

Tip: if you don't want to run through the entire battery, you can press Ctrl+Q to terminate the current test, or Ctrl+Shift+Q to terminate the entire batch. All responses given prior to termination will be saved.

Change the batch to counterbalance the order of the IATs

To counterbalance the order of scripts, create a second <batch> element and add the /groups attribute to each to indicate which group should run which batch. Notice the order of the tests is different between the two <batch> elements. Participants are assigned to a given condition based on their assigned group number.

Batch elements can be used to vary more than just test order. You can define groups that run different sets of tests, or that present different treatment/control conditions. You can define as many different <batch> elements as the conditions of your experiment requires.

Run the batch script with group number 1, and then again with group number 2

The tests should run in the orders you specified.

The battery is now ready to upload to Inquisit Web.

Sign into your Millisecond account

Once signed in, go to the Online Experiments page.

Click the Register New Experiment button

This opens the experiment editor. Enter a name for your experiment and select which version of Inquisit to use.

Click the Browse Files... button to upload your experiment

Browse to your project folder, select all of the files in it, and click the Upload button.

When the upload is complete, your files are listed on the server.

Select your batch script as the start script

Your batch script will run all of the tests specified for the participant's group.

Specify the number of groups in your experiment

Click the Participant Ids tab, and enter 2 for the number of groups.

Save and Close your experiment

Click Save to save your changes, and Close to return to the experiments page.

Your new experiment should appear in the list. To run your experiment, click the Launch Page link.

Launch your experiment

Follow instructions on the Launch page for installing the Inquisit Player. Once the player is installed, you can click the green Start button to start.


How to Create a Simple Survey with Inquisit

This help topic demonstrates how to create a simple demographic survey using the Inquisit Lab development environment. The survey will include different types of responses, including radio buttons, sliders, checkboxes, textboxes, list boxes and dropdown elements.

The tutorial will further cover the use of simple hypertext markup language (HTML) to format survey questions.

Open Inquisit Lab and save your survey file in your survey project folder

  • Open the Inquisit Lab application
  • Click the New button to create a new script
  • Click Save to save the empty script
  • Save the script in a new folder for your project

Here we name our script file "simplesurvey.iqx".

Set up your script with some basic (optional) elements

We'll start by adding an optional <usermanual> section that we can use for general comments, instructions, and notes regarding the script.
We will also add a <defaults> element that specifies some important attributes such as the canvasaspectratio which helps to unify the appearance of the script across different monitors, and the minimumversion attribute, which indicates the minimum version of Inquisit required to run this script.

Create your <survey> element

The <survey> element specifies the sequence of surveypages containing question and response items. It is similar to a <block> element with the difference that it will always generate its own survey data file when run.
Below we add "Page1" to the survey, which we will create later.

Set the font styles for your survey

The survey element also defines the default appearance of the survey elements. For example, you can define the default font styles and font sizes used throughout your survey. Note that you can always overwrite these settings in the individual survey question elements.
To select a specific fontstyle, start typing "/ fontstyle" inside the <survey> element, and autocomplete list will appear. Select the "fontstyle" option.
Upon inserting the option, the autocomplete list will display a "Font..." option in the list. Choose this to launch the visual font picker. Choose your font settings and click OK, and Inquisit will insert the corresponding syntax into your script.
Add the "itemfontstyle" and "responsefontstyle" in the same manner. The "itemfontstyle" attribute specifies how the individual question captions will look. The "responsefontstyle" specifies how the response options are presented.

Create your <surveypage>

The <surveypage> element specifies the questions that appear in the survey.
Here we define a <surveypage> element with general instruction under the /caption attribute and one gender-question (which we will code in the next section)

Create a multiple-choice question using the <radiobuttons> element

Our first question will ask for our participants' gender. We will use the <radiobuttons> element to code it.
Our question should provide the options "Female", "Male", "I prefer not to answer this question" and a textbox (/other) where participants can add their own option. Note that <radiobuttons> elements allow participants to select only one of the provided options.

Test your script

Test your survey by clicking "Run" button in the Inquisit Lab toolbar.
You will be prompted to add a subject id, group id, and session number. Use with the defaults.
Inquisit will present your gender question on the screen, which should look like the following:

Click the Finish button without answering the question.

The survey won't let us skip the gender question. By default, all survey questions are required. If no answer is given, the question is printed in red and must be answered to proceed.
To make a question optional, add the command "/required = false" to the question.

Create the next question using the <dropdown> element.

This question will ask participants' age. We present this question in a dropdown menu and our participants can simply select the appropriate age category.
Our dropdown menu will offer 10 response options that we code under the '/option' attribute. Participants will only be able to select one of these options.
The '/optionvalues' attributes specifies the corresponding codes that will be stored in the data file. For example, if a participant selects the option '18-24 years old', the data file stores the value '3'.
Finally, we add the age question to surveypage "page1"
Finally, we add the age question to surveypage "page1"

Test the survy by running it

The survey should show both questions as follows:

Create the next question using the <checkboxes> element

Next we will code a question that asks our participants' race. For this question, we will use the <checkboxes> element that will allow our participants to check multiple response options as well as add an "other" possibility as an answer choice.
Notice that we included some HTML to format the response options. For example, the <b> tag is used to present the main categories in bold.
In Inquisit 6, we have the option to use HTML to format text in our survey. For example:
  • <b>word</b> presents word
  • <i>word</i> presents word
  • <u>word</u>presents word
  • <font color='green'>word</font> presents word
  • <br> will force a line break

Add the race question to the survey

You might also notice that the race question is too long to fit neatly on our first surveypage "page1". Thus, we will create a second <surveypage> and add it to our main <survey simplesurvey> element
If we run the survey, here's how the race question appears.

Create the next question using the <listbox> element

Our next question will ask participants' their education level. We will add this question to a third <surveypage page3> as a <listbox> element
This listbox-element will provide our participants with 9 different response options.
Don't forget to add "page3" to the survey "simplesurvey"!
If we run the survey, it should look as follows

Create the next question using the <slider> element

Our next question will assess our participants' interest in national politics. We will assess the interest on a sliding scale. In contrast to our previous questions, we will set this question to be "optional" (AKA 'not required' => /required = false).
Don't forget to add "page4" to the survey "simplesurvey"!
Now run your survey. The slider question should appear as follows:

Create the last question using the <textbox> element

The last question is a simple (optional) open-ended question to collect feedback from our participants. We will implement this question on our last surveypage (page5) as a <textbox> element.
The question will present a textbox of a specified size (/textboxsize), will allow input on more than one line (/multiline = true) and will be optional (/required = false).
We will override the default responsefontstyle that we set under the <survey> element. The response in our textbox is presented in "Courier New" rather than "Arial". Furthermore, to demonstrate one more question attribute, we added a defaultresponse (/defaultresponse), which can be added to any of the survey elements:
Don't forget to add "page5" to the survey "simplesurvey"!
Run the survey to view the <textbox> item. Enter some text. Notice the /responsefontstyle of this <textbox> overrides the default fault.

Test your survey

If you previously added the survey pages to your survey, it should list all five survey pages in the specified order, as in the following.
In Inquisit Lab you can use the "Test Monkey" to automatically run the survey and generate data. You can also generate screenshots of the surveypages.