The ERTS Scripting Language is available within Cognition Lab in form of a predefined test paradigm. “ERTS Script”. When you open the configuration screen of this paradigm, you will see an text editor with syntax highlighting to author ERTS Scripts online. After saving your script, you can immediately preview the new test paradigm in the preview window since Cognition Lab interprets the text-based script directly without creating intermediate source code or binary.
The ERTS Script language offers a variety of different data types to define the stimulus material of your experiment:
PICTURE Visual stimulus material (including instructions) is defined with the PICTURE data type. This data type supports a variety of different flavors like text, graphics, and video (mp4, webm, ogg). Pictures can be displayed on multiple screen location in different alignments and rotations.
POSITION The POSITION data type defines screen locations on which a picture will be displayed. ERTS uses a logical coordinate system in millimeters which may be adjusted to individual monitor dimensions.
A position definition may consist of multiple screen coordinates to form circles, grids, or lines. A position definition may also serve as a set of screen locations which may be filled with random pictures or chosen at random.
TONE The tone data type is used to define all types of auditory stimuli. ERTS supports the definition of sine wave tone (CHROME only) and external sound files (mp3, wav, ogg).
COLOR The color data type is used for defining foreground and background colors. Colors can be defined in RGB or HSV color space.
FONT. This data type defines fonts for text pictures. What font is exactly available depends on the OS and browser.
SET. The set data type is used to group data objects into sets that an be used for random processes. A set definition may consist of a list of data objects like pictures, positions, tones, colors, or fonts. During the experiment you can then randomly draw from a set to realize randomization that goes beyond the permutation of trials.
All standard key names of the PC keyboard are predefined, but they can be grouped and referenced explicitly to activate certain keys and define key sequences:
KEY This data type is used to define the response keys that will be used in an experiment. All standard key names of the PC keyboard are predefined. Adding a ‘^’-symbol to the key name refers to the release event instead of the press event.
Procedural commands are used to define the event sequence of an experiment. The ERTS script language supports three levels to define the event flow.
Trial A trial definition consists of several trial commands that define the actual events as experienced by the test participant. A trial definition with one or more variable command arguments is called a trial schema. In this case the final values for the trial commands will be defined later at the block level.
Block A block definition lists the trials which should be executed within this block either in fixed or random order. If trials have variable arguments, they must be specified at the block level. The values of a trial specification are captured in the result file to document the independent variables for each trial.
Session A session definition defines the overall structure of an experiment. This structure is a composition of trials and blocks that are executed in the order as defined.