defaults element

The defaults element specifies global default values for attributes in the script.

Syntax

<defaults>
/ blockfeedback = (metric, metric, metric, ...)
/ 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)
/ displaymode = (width, height, refreshrate, bitsperpixel)
/ endlock = true("message") or false
/ 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"
/ position = (x expression, y expression)
/ posttrialpause = integer expression
/ pretrialpause = integer expression
/ quitcommand = (command key + scancode)
/ resetinterval = integer
/ screencolor = (red expression, green expression, blue expression)
/ txbgcolor = (red expression, green expression, blue expression) or (transparent)
/ txcolor = (red expression, green expression, blue expression)
/ validresponse = ("character", "character",...) or (scancode, scancode, ...) or (stimulusname, stimulusname, ...) or (mouseevent, mouseevent, ...) or (joystickevent, joystickevent, ...) or ("word, word, ...") or (keyword)
/ valign = alignment
/ windowsize = (width expression, height expression)
</defaults>

Properties

defaults.fontheight
defaults.hposition
defaults.name
defaults.posttrialpause
defaults.pretrialpause
defaults.typename
defaults.vposition
defaults.windowcenter
defaults.windowdecunit
defaults.windowhitduration
defaults.windowincunit
defaults.windowmaxcenter
defaults.windowmincenter
defaults.windowoffset
defaults.windowonset
defaults.windowwidth

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>


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