Parameters (Questionnaire Files)

QuickInfo

This is about as difficult as MediaLab gets. Parameters supply additional information for the presentation of certain Questionnaire File items. Most are optional but a few are required for certain item types. Parameters can be given in any order, must be separated by commas, and the entire set must be enclosed in a single set of parentheses. Note that parameters also can be set for Background, Backsound, and Backvideo fields following the same rules except that their parameters are entered after the filename rather than in the Parameter(s) field.

Parameters

$

quickstyle

@

time stamp

c

command line arguments

d

duration for timed items

h

height

k

key

l

left position

m

mask

n

number of thoughts to take

o

question wording onset

p

number of scale points (1-12)

q

target question for thought rating

r

range

s

spacing

t

top position

ttl

send ttl signal

w

width

x

password required to continue

Parameters for Different Item Types – Required parameters are in bold CAPS

All Items

$quickstyle, @time stamp, ttlsignal, command, -key

Custom

none

DirectRT

none

Essay

duration, top, left, width, height, key

Executable

command line arguments

Fill-in-the-Blank

duration, top, left, width, height, mask, range, key

HTML

duration

Image File

top, left, width, height, duration

Inquisit Session

none

Instructions

duration, password, onset, top, left

Movie

top, left, width

Multiple Response

Points, top, spacing, onset, range

On-Line Rating

Points

PowerPoint Show

none

Ranking

Points, spacing, width

Recall List  

Number, duration, onset

Scale Response

Points, top, left, spacing, onset, width

Sound File

duration

Thought Listing

Number, duration, onset, width, left

Thought Rating

Question, Points, top, left, spacing, onset, width

Voice Response

duration

WebTracker

none

Word Document

duration

WordPerfect Doc

duration

Details

Note: (optional) indicates the parameter is NEVER a required parameter of ANY item type.

$ quickstyle (optional)

To apply custom color and font settings to a questionnaire item, you can create a QuickStyle file from the Preferences menu. To apply it to a questionnaire item you can enter the name of the QuickStyle file precede by a $. For example, to use a QuickStyle file named "mystyle" wit an item, type

($mystyle)

in the Parameter(s) field. The style will remain in effect until you apply different style file on a subsequent item or enter

($off)

in the Parameter(s) field of a subsequent item.

@ time stamp (optional)

By entering @ as a parameter for any item in a questionnaire, you can have MediaLab write a time stamp at the onset of that item in order to keep track of events in real time. When you do this, a time stamp will be appended to a file called "timestamps.csv" located in the Data folder. Each time stamp will include the Subject ID, the variable name, the time at which the item started (e.g., 12:33:22), the milliseconds elapsed from the beginning of the experiment and the number of milliseconds passed since the last timestamp. The timestamp function can be used with all item types.

command-line arguments (optional)

For executables that allow for command line arguments, you can specify the arguments you want to send with the c parameter. Just type in the arguments preceded by a c in the Parameter(s) field, like this

(c/myargument).

Follow any arguments in the Parameter(s) field with max and the application will be run in a maximized window, like this

(cmax)

or

(c/myarguments max)

For other item types, an executable file may be launched at the start of the item by adding a "c" parameter followed by the file name. For example, typing

(p7,cmyprog.exe)

in the Parameter(s) field would cause myprog.exe to launch at the start of a 7pt scale response. This is especially useful for programs that should run silently in the background as MediaLab will not attempt to keep the program visually in the foreground unless it is launched via the regular Executable item type.

duration for timed items (optional)

The default for many item types (e.g., instructions, essays, Word documents, fill-in-the-blank, thought and recall lists, image files) is to click on Continue to proceed. Optionally, you can set a duration parameter d followed by a number to display these items for a set amount of time and then automatically proceed to the next available item. For example, if you wanted an instruction or an image to be displayed for 30 seconds and then automatically continue, type

(d30)

into the Parameter(s) field. An integer value greater than or equal to 1 is required. Only integer values can be used with the duration parameter

Instruction items also offer a special option you can use to create a minimum exposure time. On any instruction item, use of a negative duration value will make the ‘Continue’ button not appear until that many seconds have passed. For example, to delay the appearance of the 'Continue' button for 10 seconds, type

(d-10)

in the Parameter(s) field of the Instruction item. You can use this option to ensure that subjects are exposed to some information for a minimum amount of time, after which they may proceed when ready. Remember that you can always embed images & html, sound and video in an instruction item by using BackGround, BackSound, or BackVideo fields, respectively.

key

Open Ended Response Times: By default, response times for fill-in-the-blank and essay questions are taken at the time the subject continues to the next item. You can optionally get it for the first key stroke instead by typing

(k1)

in the Parameter(s) field.

Disable the Spacebar: HTML pages that require input may have a subject pressing the space bar as a part of that input. Since the space bar is also used in MediaLab to continue with the next item, this can cause a conflict. If this applicable to your HTML file, you can type

(k-1)

in the Parameter(s) to disable the space bar as a means to proceed to next item.

Track Key Presses: When used with an essay item, this parameter allows you to record every time a given key is pressed over a given time period. Simply add the key parameter to indicate that you want to track a key press response over the duration of the essay. You need to tell MediaLab what key you want by giving it a code. For example, type

(k57)

in the Parameter(s) field to have MediaLab track the 9 key. There is a utility included in the Utilities folder called keycodes.exe. It will quickly tell you the code for any key on the keyboard including function and non-character keys. Just double click the keycodes.exe program and hit any key to get its code. These codes are NOT the same as the more extensive set of DirectRT key codes!

Here's an example. You want to track every time the subject hits the 9 key over a 30 second interval. Run keypress.exe and hit the 9 key. You will see that its code is 57. Using an essay item, enter the parameters (d30,k57). This means the item will be displayed for 30 seconds and track every time the user hits the 9 key. Medialab will write the key tracking data to a file called the same thing as the essay variable name file but with "keypress.csv" added to it. You can open the data file in Excel or similar spreadsheet program. It will indicate the subject and condition IDs and give you the time in milliseconds from the start of the essay for each time the key was hit.

left position, top position (optional)

These parameters allow you to place an image, text or video exactly where you want it by specifying the top left corner of its position relative to the top left corner of the MediaLab window. For example, type

(t150,l200)

in the Parameter(s) field to display an item 150 pixels down from and 200 pixels from the left of the top left corner of the screen.

You can also express location and size parameters as a percentage of the screen.  use percentages, simply use a value less than 1 and greater than 0. For example, type

(l.3,t.25)

to display an item 30 percent across the screen from the left of and 25 percent down from the top left corner of the screen. To To determine values appropriate for your display, select "Showing Location Points" under the main MediaLab Help menu.

The left and top parameters can also specify the left and top position of the essay, fill-in-the-blank, and thought listing text boxes as well as the text presented in instruction items. You can also use the top parameter to specify the location of the first button when using scale responses, multiple responses and thought ratings (e.g., when you need more room for question wording).

mask (optional)

You can use the mask parameter to specify the number of characters allowed in a fill-in-the-blank item as well as whether each is fixed or free. For example, type

(m*****)

in the Parametner(s) field to provide five blanks that are free to be filled by any character.

Type

(m***ck)

in the Parameter(s) field to offer three free blanks preceeded by "m" and followed by "ck". Fixing characters in this way allows subjects to offer partial responses such as in a word completion task.

You can also combine the mask and range parameters. For example, type

(m*********, r100000000-999999999)

in the Parameters(s) to prompt the subject for a valid, nine-digit social security number.

number of scale points (1-12)

For scale responses, multiple responses, thought ratings, and on-line rating items you need to specify the number of scale points you would like MediaLab to display. When you enter this parameter, MediaLab will then allow you to enter the labels for the number of points you specify. You can have from 1 to 12 points. For example,type

(p5)

in the Parameter(s) field to create five answer options.

Note that when MediaLab runs your experiment, the number keys (1-9) will work only for a scale of up to 9 points. However, MediaLab will also take input from the function keys (F1 to F12) so that you can conveniently collect data from a 12 point scale and still assess reaction time. This does not apply to on-line rating items because input is taken through the arrow keys or joystick.

onset of question wording (optional)

For items that take the onset parameter, you can delay the appearance of the question wording for a specified number of milliseconds. For example, type

(p7,o750)

in the Parameter(s) field to reveal the seven response options immediately, but delay the question wording for 750ms.

maximum number of thoughts or recall items to take

For thought listing and recall list items, you need to specify the number of separate responses you would like to record. For example,type

(n4)

in the Parameter(s) field if you wanted the subject to list four thoughts in a thought listing item. If you wanted to them to list up to 4, you can set a time limit using the duration parameter.

password (x) (optional)

Sometimes you may want the subjects to wait for you to allow them to continue to the next phase of the experiment. You may also want to prevent the subject from seeing the MediaLab screen when the experiment is finished. To do this, insert an instruction item and use the x parameter followed by the password you want to use. For example, if you wanted to use the password ‘monkey’, then type

(xmonkey)

as a parameter value for the instruction item. Presumably, the experimenter will have to enter this password or tell subjects what it is at the appropriate time. The characters will be masked (e.g., ******), so that subjects will not see the password as it is entered. Pressing <Enter> after entering the correct password will cause MediaLab to continue.

range (optional)

You can now limit a fill-in-the-blank item response to a numerical range by using the range parameter. For example, to accept only a valid age, you might type

(r16-125)

in the Parameter(s) field, which would require a response between 16 and 125. The user will be prompted to enter a number within that range if they fail to do so. You can optionally combine this with the mask parameter to provide the appropriate number of spaces for the number.

You can also add a range parameter to multiple response items to specify a minimum and/or maximum number of responses to take. For example, typing

(p5,r1-3)

in the Parameter(s) field would require that the subject choose at least 1 and no more than 3 of the 5 options.

spacing (optional)

For items that use response buttons (i.e., scale responses, multiple responses and thought ratings) you can use the spacing parameter to create more space for options with lots of text or if you’re using an html file for your labels. For example, if you want to double-space your response optoins type

(s2)

in the Parameter(s) field.

If you want to triple space your response options, type

(s3)

in the Parameter(s) field.

If you want to add an extra half-space between your response options, type

(s1.5)

in the Parameter(s) field.

Values from 1 to 5, including decimals, are permitted. This will produce evenly spaced response options with as many extra lines per item as you need. Importantly you can do this on an item by item basis--the default of course is single space if you don't specify the space parameter.

For fill-in-the-blank items, you can use the Space parameter to tell MediaLab how many lines of text you want to allow. For example, type

(s3)

in the Parameter(s) field to provide three lines of text instead of the default value of one space. Note that if you specify more than one line, the Enter key will not send the subject to the next item but rather to the next line in the text box. The Escape key may be used as an alternative to the Enter key in such cases.

target question for thought rating (q)

MediaLab allows you to have subjects rate their own open-ended responses from thought listing or recall list items on any dimension you like. The thought rating item works much like a scale response but feeds back to subjects their responses from an earlier thought or recall list item. To do this, you need to specify the variable name you gave to the thought or recall list item from which MediaLab is to supply the responses in combination with the q parameter. For example, say participants listed their thoughts earlier in a variable with the item name ‘tlist.’ To have subjects later rate these thoughts using a thought rating item (for example how positive or negative each thought was), type

(qtlist)

in the Parameter(s) field of your though rating item. Note that for thought ratings, you must also specify the number of scale points parameter.

ttl signal (optional)

To communicate with external computers or hardware you can send out a signal from MediaLab at the onset of any item. The signal can be a byte value (any integer from 1-255). You can send the signal to any port address you like. Make sure you use the decimal value of the port—not the hex value. For example, the port address of the parallel port on most systems is 888 (or 378 in Hex). Finally, you can send the signal for any duration you like before it resets to 0. Specify these three variables in the parameters field like so:

<value:location:duration>

For example, say you present an image item for 5 seconds and at its onset you want to send a signal of 255 to port 888 for 10ms. To present it for 5 seconds, you would use parameter value of (d5). To add the TTL signal at its onset, you would add:

(d5,<255:888:10>)

Note that there is a TTL I/O test utility in the Utilities folder. You can use IOTest.exe to test whether your external hardware can send and/or receive TTL signals from any given port. See also Serial Data

width, height (optional)

You can specify the width and height of the essay and fill-in-the-blank text boxes using the width and height parameters to allow for additional room for question wording or for background images/html, For example, typing

(h150,w400).

in the Parameter(s) field of an essay item would create a response box 150 pixels high and 400 pixels wide. To determine values appropriate for your display, select "Showing Location Points" under the main MediaLab Help menu.

You can also use the height and width parameters to specify the display size of images. Note that if you size an image using the height and width parameters you need to also specify the top and left parameters otherwise it will appear in the top left corner by default.

By default, videos appear in their original size. However, you can set the exact size of the video using the width parameter. The height will automatically be set in proportion to the width you specify. For example, if you specify

(w200)

in the Parameter(s) field for a video that is normally 320x240, it will appear as 200x150.

You can express location and size parameters for ANY item type as a percentage of the screen. To use percentages, simply use a value less than 1 and greater than 0. For example, typing

(w.3,h.25)

would create a rectangle 30 percent of the screen’s width and 25 percent of its height.

You can also use the following shortcuts rather than specifying an exact width (e.g., w-1, w2, etc.)

none or (w0) = Default Size

(w-1) = Full Screen

(w-2) = Half Screen

(w-3) = One Fourth Screen

(w-4) = One Sixteenth Screen

(w1) = Double Size

(w2) = Half Size

(w10) and higher = specified width & proportional height

Examples

Scale Response. To set the number of response options for a scale response to 5, type (p5) in the Parameter(s) field

Image. To set the top left corner of an image to the center of a 640x480 resolution screen: type (l320,t240) or (l.5,t.5) in the Parameter(s) field

Instructions. To require that password be entered before the subject can continue (e.g., at the end of the experiment, between phases of the experiment), specify a password preceded by an x like (xmonkey) in the Parameter(s) field.

Movie. To play a video file at full screen: (w-1)

Thought listing. To have subjects list up to 8 thoughts, or until 120 seconds have passed, which ever comes first: (n8,d120).

Background. For backgrounds, backsounds and backvideos, the parameters are always entered in parentheses after the filename and are always optional. E.g., For a background image to be displayed with the top left corner located at the top left corner of the MediaLab window, specify the background file as: myimage.bmp (t1,l1)