By bcludius - 8/3/2015
We are using the script of the AAT Mouse Version from the Millisecond Test library. An error message is showing once the participant has started to move the mouse in the wrong direction. We would like to change it, so the error message does not occur until the participant has moved the mouse all the way to the top or bottom of the screen (of course only when it is moved in the wrong direction).
It would be great, if someone could tell me how to change the script.
Thank you!!
Barbara
NOTE: *trial.practicetrial_A displays the stimulus of format A (here: landscape) by setting values.selectpracticepicture = 1 *if a push movement is detected (=mouse is pushed away from body)-> decrease picture *if a pull movement is detected (=mouse is pulled towards body)-> increase picture <trial practicetrial_A> /inputdevice = mouse /ontrialbegin = [values.trialcode = "practicetrial_A"] /ontrialbegin = [values.targetformat = "l"] / ontrialbegin = [values.selectpracticepicture = 1] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [picture.practicetarget.height = values.startheight_A] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]
/ stimulusframes = [1 = practicetarget] / validresponse = (mousemove) /isvalidresponse = [(trial.practicetrial_a.responsey > (values.mouse_y + values.pixeltolerance)) || (trial.practicetrial_a.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.practicetrial_a.responsey < values.mouse_y) || (values.expcondition == 2 && trial.practicetrial_a.responsey > values.mouse_y)] / errormessage = true(error,0)
/ontrialend = [if (trial.practicetrial_a.responsey < values.mouse_y) values.response = 1 else values.response = 2] / ontrialend = [values.mouse_change = abs(values.mouse_y - trial.practicetrial_a.responsey)] / ontrialend = [values.mouse_y = trial.practicetrial_a.responsey]
/ontrialend = [values.RT = trial.practicetrial_A.latency] /ontrialend = [values.correct = trial.practicetrial_A.correct] /ontrialend = [values.stimulus = picture.practicetarget.currentitem] /ontrialend = [if (values.response == 1) values.initialresponse = "PUSH" else values.initialresponse = "PULL"]
/ branch = [if (values.response == 1) trial.practicedecrease else trial.practiceincrease] / recorddata = false </trial>
|
By Dave - 8/3/2015
There is some logic in the "increase" and "decrease" <trial> elements' /ontrialbegin or /ontrialend attributes that injects the "error" stimulus. You need to remove that logic. The specific lines of code in question are
<trial practiceincrease> /inputdevice = mouse /ontrialbegin = [if (values.expcondition == 1 && values.targetformat == "l") trial.practiceincrease.insertstimulustime(text.error, 0)] /ontrialbegin = [if (values.expcondition == 2 && values.targetformat == "p") trial.practiceincrease.insertstimulustime(text.error, 0)] ... </trial>
and
<trial practicedecrease> /inputdevice = mouse /ontrialbegin = [if (values.expcondition == 1 && values.targetformat == "p") trial.practicedecrease.insertstimulustime(text.error, 0)] /ontrialbegin = [if (values.expcondition == 2 && values.targetformat == "l") trial.practicedecrease.insertstimulustime(text.error, 0)] ... </trial>
respectively.
|
|