up Inquisit Language Reference

monkeyresponse attribute

The monkeyResponse attribute specifies the set of responses that the monkey should choose from when performing a given trial.

Member of

<checkboxes> <dropdown> <image> <listbox> <radiobuttons> <slider> <textbox> <trial> <likert> <openended> <slidertrial>

Syntax

/ monkeyresponse = (character, character,...)

or

/ monkeyresponse = (scancode, scancode, ...)

or

/ monkeyresponse = (anyResponse, noResponse, ...)

or

/ monkeyresponse = (stimulusname, stimulusname, ...)

or

/ monkeyresponse = (mouseevent, mouseevent, ...)

or

/ monkeyresponse = (gamepadevent, gamepadevent, ...)

or

/ monkeyresponse = (joystickevent, joystickevent, ...)

or

/ monkeyresponse = (word, word, ...)

or

/ monkeyresponse = (keyword)

or

/ monkeyresponse = (expression, expression, ...)

Parameters

Name Type Description
character string A character indicating a valid keyboard response.
scancode integer An integer specifying the scancode of a valid keyboard response. To determine the scancode of a given key, use the "Keyboard Scancode..." command on Inquisit's Tools menu, or see the scancodes table for corresponding key value assignments.
mouseevent mouseeventenum
ValueDescription
dragDropDragging and dropping a stimulus
lButtonDblClkLeft button double-click.
lButtonDownLeft button press.
lButtonUpLeft button release.
mButtonDblClkMiddle button double-click.
mButtonDownMiddle button press.
mButtonUpMiddle button release.
mouseMoveMoving the mouse
mouseWheelMoving the mouse wheel
rButtonDblClkRight button double-click.
rButtonDownRight button press.
rButtonUpRight button release.
xButton1DblClk
xButton1Down
xButton1Up
xButton2DblClk
xButton2Down
xButton2Up
xButtonNDblClk
xButtonNDown
xButtonNUp
gamepadevent gamepadeventenum
ValueDescription
buttonAButton a.
buttonBButton b.
buttonCenterCenter button.
buttonDownDown button.
buttonGuideGuide button.
buttonL1Button 1.
buttonL2Button 2.
buttonL3Button 3.
buttonLeftLeft direction button.
buttonR1Right shoulder button.
buttonR2Right trigger button.
buttonR3Right stick button.
buttonRightRight direction button.
buttonSelectSelection button.
buttonStartStart button.
buttonUpUp direction button.
buttonXX button.
buttonYY button.
changeAny change in the gamepad controls.
leftThumbstickBackLeft thumbstick back value.
leftThumbstickForwardLeft thumbstick forward value.
leftThumbstickLeftLeft thumbstick left value.
leftThumbstickRightLeft thumbstick right value.
rightThumbstickBackRight thumbstick back value.
rightThumbstickForwardRight thumbstick forward value.
rightThumbstickLeftRight thumbstick left value.
rightThumbstickRightRight thumbstick right value.
joystickevent joystickeventenum
ValueDescription
backJoystick moved back.
button1Button 1 was pressed.
button10Button 10 was pressed.
button11Button 11 was pressed.
button12Button 12 was pressed.
button13Button 13 was pressed.
button14Button 14 was pressed.
button15Button 15 was pressed.
button16Button 16 was pressed.
button17Button 17 was pressed.
button18Button 18 was pressed.
button19Button 19 was pressed.
button2Button 2 was pressed.
button20Button 20 was pressed.
button21Button 21 was pressed.
button22Button 22 was pressed.
button23Button 23 was pressed.
button24Button 24 was pressed.
button25Button 25 was pressed.
button26Button 26 was pressed.
button27Button 27 was pressed.
button28Button 28 was pressed.
button29Button 29 was pressed.
button3Button 3 was pressed.
button30Button 30 was pressed.
button31Button 31 was pressed.
button32Button 32 was pressed.
button4Button 4 was pressed.
button5Button 5 was pressed.
button6Button 6 was pressed.
button7Button 7 was pressed.
button8Button 8 was pressed.
button9Button 9 was pressed.
changeThe state of a button, slider, or joystick changed.
downJoystick moved down.
forwardJoystick moved forward.
leftJoystick moved left.
pov1BackPoint of view 1 moved back.
pov1ForwardPoint of view 1 moved forward.
pov1LeftPoint of view 1 moved left.
pov1RightPoint of view 1 moved right.
pov2BackPoint of view 2 moved back.
pov2ForwardPoint of view 2 moved forward.
pov2LeftPoint of view 2 moved left.
pov2RightPoint of view 2 moved right.
pov3BackPoint of view 3 moved back.
pov3ForwardPoint of view 3 moved forward.
pov3LeftPoint of view 3 moved left.
pov3RightPoint of view 3 moved right.
pov4BackPoint of view 4 moved back.
pov4ForwardPoint of view 4 moved forward.
pov4LeftPoint of view 4 moved left.
pov4RightPoint of view 4 moved right.
rBackRotate back.
rDownRotate down.
rForwardRotate forward.
rightJoystick moved right.
rLeftRotate left.
rRightRotate right.
rUpRotate up.
slider1LeftSlider 1 moved left.
slider1RightSlider 1 moved right.
slider2LeftSlider 2 moved left.
slider2RightSlider 2 moved right.
upJoystick moved up.
response responseenum
ValueDescription
anyResponseAny response.
noResponseNo response.
stimulusname visualstimulus The name of a stimulus element defined elsewhere in the script.
word string A string (in quotes) indicating a valid spoken or openended response.
keyword responseenum
ValueDescription
anyResponseAny response.
noResponseNo response.
expression value A dynamic expression that resolves to response value.

Remarks

This attribute specifies a set of responses considered valid for the test monkey when performing this trial. The set can consist of any valid expression, including numbers, strings, and properties. When the test monkey is run and Inquisit encounters this attribute on a given trial, it will randomly select from the responses listed in the attribute. Controlling the monkey's response is useful for testing scripts that behave very differently depending on responding, or that allow the participant to abort the experiment with a particular response. For example, if a script includes an informed consent trial, the monkeyresponse attribute can be used to make sure that the monkey always gives consent.

Examples

The following trial makes sure the monkey always consents to participate:

<trial consent>
/ stimulusTimes=[0=consentform, agreeButton, disagreeButton]
/ inputDevice=mouse
/ validResponse=(agreeButton, disagreeButton)
/ monkeyResponse=("agreeButton")
/ onTrialEnd=[if (trial.consent.response == "disagreeButton") script.abort()]
</trial>

The following trial makes sure the monkey always consents to participate:

<trial example>
/ stimulusTimes=[0=target]
/ inputDevice=keyboard
/ validResponse=("e", "i")
/ monkeyResponse=(values.monkeyresponse)
</trial>

Copyright Millisecond Software, LLC. All rights reserved.