The block element defines a sequence of trials and instruction pages to be run.
<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>
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
None.
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.
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>