up Inquisit Language Reference

dropTargets attribute

The dropTargets attribute lists stimuli on the screen where dragged items can be dropped.

Member of

<trial> <likert> <openended> <sliderTrial> <surveyPage>

Syntax

/ dropTargets = (stimulus, stimulus, expression, expression, ...)

Parameters

Name Type Description
stimulus visualstimulus The name of a visual stimulus being presented on this trial.
expression value An expression that resolves to a visual stimulus being presented on this trial.

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 dropTargets 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)
/ dropTargets=("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")
/ dropTargets=(values.dropTargets)
</trial>

Copyright Millisecond Software, LLC. All rights reserved.