up Inquisit Language Reference

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)
/ pretrialpause = integer expression
/ pretrialsignal = (modality, signal)
/ 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, ...)]
/ timeout = integer expression
/ trialcode = "string"
/ 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.numinwindow
trial.trialname.percentcorrect
trial.trialname.percentinwindow
trial.trialname.posttrialpause
trial.trialname.pretrialpause
trial.trialname.response
trial.trialname.responsemonitor
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>

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