Pictures freeze in approach-avoidance task: Direct2D Warning: 0x8899000c


Author
Message
KatrinL
KatrinL
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 8, Visits: 48
Dear Dave,

I am currently preparing an inquisit web study with multiple tests combined: IAT, Stroop, Approach-Avoidance-Task and others. Everything works fine so far and the combined file is also startable. The problem occurs in the Approach-Avoidance Task (with mouseinput) after the practice trial and the intruction of the main trial: Somtimes the first picture freezes, sometimes the second and I am getting this error message:

"Direct2D Warning: 0x8899000c A presentation error has occured that may be recoverable. The caller needs to re-create the render target then attempt to render the frame again. Line 779, File win\Direct2DGraphics.cpp"

I already searchin in the forum and found some tips. I made updates, I created a "dummypictoforcedownload"-element. But still the problem occurs. Now I don't know what to do! Can you help me?

Thank you in advance!

Katrin

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
No idea offhand.

#1: Is your Inquisit version up to date? If not, install the latest available at https://www.millisecond.com/download/
#2: What changes have you made to the script? In particular, post the syntax for the <trial> element that seemingly "freeze" / lead to the error message.

Thanks.

KatrinL
KatrinL
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 8, Visits: 48
Hello,

I updated my Inquisit version but the problem still persists.

I made the following changes to the script provided at the Inquisit Website:
- I changed alcohol stimuli to food stimuli
- I changed the instruction "react on pictures turned to the left with push and pictures turned to the right" with the instruction "push when the picture shows a square plate" and "pull when the picture shows a round plate"
- I did not use the "other positive" and "other negative" categories, so I deleted these trials

Everything was working well, until I added the script with the include-element to another script to use these  tests in an inquisit web experiment. Following the help from inquisit tutorials (http://www.millisecond.com/support/docs/v4/html/howto/multiplescripts.htm) I added "AAT" to all element names to prevent double definitions in the combined scripts. After this, the problem occured.

Herunder you can find the script containing the trials. The problem occurs after the practice.

Thank you!
Katrin

Script:

*************************
Practice Trials
*************************
NOTE: practice trials report error feedback to participant.


Note: trial.practicestarta/trial.practicestartb
* makes sure the mouse cursor is in the middle of the screen by asking participants
to click on a center stimulus (here:X)
<trial practicestartAAAT>
/inputdevice = mouse
/stimulusframes = [1 = centerAAT]
/validresponse = (centerAAT)
/ontrialend = [values.mouse_y = trial.practicestartAAAT.responsey]
/recorddata = false
/branch = [trial.practicetrial_aAAT]
</trial>

/stimulusframes = [1 = instructtext, centerAAT]
/stimulusframes = [1 = centerAAT]

<trial practicestartBAAT>
/inputdevice = mouse
/stimulusframes = [1 = instructionsAAT, centerAAT]
/validresponse = (centerAAT)
/ontrialend = [values.mouse_y = trial.practicestartBAAT.responsey]
/recorddata = false
/branch = [trial.practicetrial_bAAT]
</trial>

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_AAAT>
/inputdevice = mouse
/ontrialbegin = [values.trialcode = "practicetrial_AAAT"]
/ontrialbegin = [values.targetformat = "l"]
/ ontrialbegin = [values.selectpracticepicture = 1]
/ ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [picture.practicetargetAAT.height = values.startheight_A]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = practicetargetAAT]
/ validresponse = (mousemove)
/isvalidresponse = [(trial.practicetrial_aAAT.responsey > (values.mouse_y + values.pixeltolerance)) ||
                    (trial.practicetrial_aAAT.responsey < (values.mouse_y - values.pixeltolerance)) ]

/ iscorrectresponse = [(values.expcondition == 1 && trial.practicetrial_aAAT.responsey < values.mouse_y)]
/ errormessage = true(errorAAT,0)


/ontrialend = [if (trial.practicetrial_aAAT.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.practicetrial_aAAT.responsey)]
/ ontrialend = [values.mouse_y = trial.practicetrial_aAAT.responsey]

/ontrialend = [values.RT = trial.practicetrial_AAAT.latency]
/ontrialend = [values.correct = trial.practicetrial_AAAT.correct]
/ontrialend = [values.stimulus = picture.practicetargetAAT.currentitem]
/ontrialend = [if (values.response == 1) values.initialresponse = "PUSH"
                        else values.initialresponse = "PULL"]

/ branch = [if (values.response == 1) trial.practicedecreaseAAT else trial.practiceincreaseAAT]
/ recorddata = false

</trial>
correctmessage=true(richtig, 0)
/ iscorrectresponse = [(values.expcondition == 1 && trial.practicetrial_a.responsey < values.mouse_y) ||
                        (values.expcondition == 2 && trial.practicetrial_a.responsey > values.mouse_y)]

*trial.practicetrial_B displays the stimulus of format B (here: portrait) by setting
values.selectpracticepicture = 2
*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_BAAT>
/inputdevice = mouse
/ontrialend = [values.trialcode = "practicetrial_B"]
/ontrialbegin = [values.targetformat = "p"]
/ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [values.repeat = 0]
/ ontrialbegin = [values.selectpracticepicture = 2]
/ ontrialbegin = [picture.practicetargetAAT.height = values.startheight_B]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = practicetargetAAT]
/ validresponse = (mousemove)
/isvalidresponse = [(trial.practicetrial_bAAT.responsey > (values.mouse_y + values.pixeltolerance)) ||
                    (trial.practicetrial_bAAT.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.practicetrial_bAAT.responsey > values.mouse_y)]



/ontrialend = [if (trial.practicetrial_bAAT.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.practicetrial_bAAT.responsey)]
/ ontrialend = [values.mouse_y = trial.practicetrial_bAAT.responsey]

/ontrialend = [values.RT = trial.practicetrial_bAAT.latency]
/ontrialend = [values.correct = trial.practicetrial_bAAT.correct]
/ontrialend = [values.stimulus = picture.practicetargetAAT.currentitem]
/ontrialend = [if (values.response == 1) values.initialresponse = "PULL"
                        else values.initialresponse = "PUSH"]

/ branch = [if (values.response == 1) trial.practicedecreaseAAT else trial.practiceincreaseAAT]
/ recorddata = false
/ errormessage = true(errorAAT,0)

</trial>
correctmessage=true(richtig, 0)
/ iscorrectresponse = [(values.expcondition == 1 && trial.practicetrial_b.responsey > values.mouse_y) ||
                        (values.expcondition == 2 && trial.practicetrial_b.responsey < values.mouse_y)]

*********ZOOM FEATURE: trial  increase/decrease the size of the rectangles depending on participant's response*********

<trial practicedecreaseAAT>
/inputdevice = mouse
/ontrialbegin = [if (values.expcondition == 1 && values.targetformat == "p") trial.practicedecreaseAAT.insertstimulustime(text.errorAAT, 0)]

/ ontrialbegin = [picture.practicetargetAAT.height = picture.practicetargetAAT.height - values.mouse_change/expressions.ratio_mousechangePerAssignedpixel]
/ stimulusframes = [1 = eraserAAT, practicetargetAAT]
/validresponse = (mousemove)

/ontrialend = [values.mouse_change = abs(values.mouse_y - trial.practicedecreaseAAT.responsey)]

/ontrialend = [trial.practicedecreaseAAT.resetstimulusframes()]


/branch = [if (script.subjectid == "monkey") {values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.intertrialintervalAAT}]

/branch = [if (trial.practicedecreaseAAT.responsey <= 0)
                {values.mouse_y = trial.practicedecreaseAAT.responsey; values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.enddecrease_practiceAAT}]
/branch = [if (trial.practicedecreaseAAT.responsey <= values.mouse_y)
                {values.mouse_y = trial.practicedecreaseAAT.responsey; trial.practicedecreaseAAT}]
/branch = [if (trial.practicedecreaseAAT.responsey > values.mouse_y)
                {values.mouse_y = trial.practicedecreaseAAT.responsey; values.changedirection += 1; trial.practiceincreaseAAT}]

/ recorddata = false
</trial>
/ontrialbegin = [if (values.expcondition == 2 && values.targetformat == "p") trial.practicedecrease.insertstimulustime(text.error, 0)]


<trial practiceincreaseAAT>
/inputdevice = mouse
/ontrialbegin = [if (values.expcondition == 1 && values.targetformat == "l") trial.practiceincreaseAAT.insertstimulustime(text.errorAAT, 0)]

/ ontrialbegin = [picture.practicetargetAAT.height = picture.practicetargetAAT.height + values.mouse_change/expressions.ratio_mousechangePerAssignedpixel]
/ stimulusframes = [1 =  practicetargetAAT]
/validresponse = (mousemove)
/ontrialend = [values.mouse_change = abs(values.mouse_y - trial.practiceincreaseAAT.responsey)]

/ontrialend = [trial.practiceincreaseAAT.resetstimulusframes()]

/branch = [if (script.subjectid == "monkey") {values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.intertrialintervalAAT}]
/branch = [if (trial.practiceincreaseAAT.responsey >= display.height-1)
                {values.mouse_y = trial.practiceincreaseAAT.responsey; values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.endincrease_practiceAAT}]
/branch = [if (trial.practiceincreaseAAT.responsey >= values.mouse_y)
                {values.mouse_y = trial.practiceincreaseAAT.responsey; trial.practiceincreaseAAT}]
/branch = [if (trial.practiceincreaseAAT.responsey < values.mouse_y)
                {values.mouse_y = trial.practiceincreaseAAT.responsey; values.changedirection += 1; trial.practicedecreaseAAT}]
/recorddata = false
</trial>

/ontrialbegin = [if (values.expcondition == 2 && values.targetformat == "l") trial.practiceincrease.insertstimulustime(text.error, 0)]


Note: trials show the last size of the picture
<trial endincrease_practiceAAT>
/ ontrialbegin = [picture.practicetargetAAT.height = picture.practicetargetAAT.height + values.mouse_change/expressions.ratio_mousechangePerAssignedpixel]
/stimulusframes = [1 = practicetargetAAT]
/timeout = 0
/branch = [trial.intertrialintervalAAT]
/recorddata = false
</trial>

<trial enddecrease_practiceAAT>
/ontrialbegin = [picture.practicetargetAAT.height = picture.practicetargetAAT.height - values.mouse_change/expressions.ratio_mousechangePerAssignedpixel]
/stimulusframes = [1 = eraserAAT, practicetargetAAT]
/timeout = 0
/branch = [trial.intertrialintervalAAT]
/recorddata = false
</trial>
*************************
Practice Block
*************************
NOTE:
block.practice_AAT presents 10 practice trials randomly (without replacement) selecting
from format A (landscape) (N=5) and format B (portrait) stimuli (N=5)
<block practice_AAT>
/preinstructions = (introAAT, practiceAAT)
/ trials = [1-20 = noreplace(practicestartAAAT, practicestartBAAT)]
</block>

**************************************************************************************************************
**************************************************************************************************************
AAT EXPERIMENTAL TRIALS
**************************************************************************************************************
**************************************************************************************************************
Trial Sequence for each targetstimulus:
trial.AAT_start -> (e.g.) trial.AAT_1 -> (e.g. depending on response) trial.decrease ->....-> trial.decrease (until a set amount of trial.decrease have run)
                                                                                   
**********************************************************************
trial that selects the next targetstimulus category (1-8)
**********************************************************************
Debug:
<text nextstimulusAAT>
/ items = ("<%values.nextstimulus%>")
/ position = (50%, 60%)
/ fontstyle = ("Arial", 2.33%, false, false, false, false, 5, 0)
</text>


NOTE:
trial.AAT_start is only necessary if a preestablished sequence of target categories is used
(either generated at the beginning of the experiment or by selecting from a
pool of pregenerated sequences). The trial determines the next target
category via values.nextstimulus and calls the corresponding trial for that category (e.g. trial.AAT_1).

<trial AAT_start>
/ ontrialbegin = [values.nextstimulus = substring(values.sequence, values.index, 1);
                        values.index += 1]
/ ontrialbegin = [values.repeat = 0]
/ timeout = 0
/ branch = [if (values.nextstimulus == 1) trial.AAT_1_start]
/ branch = [if (values.nextstimulus == 2) trial.AAT_2_start]
/ branch = [if (values.nextstimulus == 3) trial.AAT_3_start]
/ branch = [if (values.nextstimulus == 4) trial.AAT_4_start]
 /recorddata = false
</trial>

************************************************
Start trials:

* make sure the mouse cursor is in the middle of the screen by asking participants
to click on a center stimulus (here:X)
************************************************
<trial AAT_1_start>
/inputdevice = mouse
/stimulusframes = [1 = instructionsAAT, centerAAT]
/validresponse = (centerAAT)
/ontrialend = [values.mouse_y = trial.AAT_1_start.responsey]
/recorddata = false
/branch = [trial.AAT_1]
</trial>

<trial AAT_2_start>
/inputdevice = mouse
/stimulusframes = [1 = instructionsAAT, centerAAT]
/validresponse = (centerAAT)
/ontrialend = [values.mouse_y = trial.AAT_2_start.responsey]
/recorddata = false
/branch = [trial.AAT_2]
</trial>

<trial AAT_3_start>
/inputdevice = mouse
/stimulusframes = [1 = instructionsAAT, centerAAT]
/validresponse = (centerAAT)
/ontrialend = [values.mouse_y = trial.AAT_3_start.responsey]
/recorddata = false
/branch = [trial.AAT_3]
</trial>

<trial AAT_4_start>
/inputdevice = mouse
/stimulusframes = [1 = instructionsAAT, centerAAT]
/validresponse = (centerAAT)
/ontrialend = [values.mouse_y = trial.AAT_4_start.responsey]
/recorddata = false
/branch = [trial.AAT_4]
</trial>

**********************************************************************
trials that select targetstimuli via list.categoryX
and take in initial response (move mouse away vs. mouse mouse closer)

Note: if error feedback should be given, include
/ errormessage = true(error,0) in each of the following trials
**********************************************************************

<trial AAT_1>
/inputdevice = mouse
/ ontrialbegin = [values.trialcode = "AAT_1"]
/ ontrialbegin = [values.selectstimulus = list.category1AAT.nextvalue]
/ ontrialbegin = [values.targetcategory = 1; values.targetformat = "l"]
/ ontrialbegin = [picture.targetstimulusAAT.height = values.startheight_A]

/ ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = targetstimulusAAT]
/ validresponse = (mousemove)
/isvalidresponse = [(trial.AAT_1.responsey > (values.mouse_y + values.pixeltolerance)) ||
                    (trial.AAT_1.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_1.responsey < values.mouse_y)]

/ ontrialend = [if (trial.AAT_1.correct) values.sumRTcorrect_1 += trial.AAT_1.latency]
/ ontrialend = [values.sumRT_1 += trial.AAT_1.latency]

/ontrialend = [if (trial.AAT_1.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_1.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_1.responsey]

/ ontrialend = [values.RT = trial.AAT_1.latency]
/ ontrialend = [values.correct = trial.AAT_1.correct]
/ ontrialend = [values.stimulus = picture.targetstimulusAAT.currentitem]

/ontrialend = [if (values.response == 1) values.initialresponse = "PUSH"
                        else values.initialresponse = "PULL"]
/ branch = [if (values.response == 1) trial.decreaseAAT else trial.increaseAAT]
/recorddata = false
</trial>
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_1.responsey < values.mouse_y) ||
                        (values.expcondition == 2 && trial.AAT_1.responsey < values.mouse_y)]

<trial AAT_2>
/inputdevice = mouse
/ ontrialbegin = [values.selectstimulus = list.category2AAT.nextvalue]
/ ontrialbegin = [values.targetcategory = 2; values.targetformat = "p"]
/ ontrialbegin = [picture.targetstimulusAAT.height = values.startheight_B]

/ ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = targetstimulusAAT]
/ validresponse = (mousemove)
/isvalidresponse = [(trial.AAT_2.responsey > (values.mouse_y + values.pixeltolerance)) ||
                    (trial.AAT_2.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_2.responsey > values.mouse_y)]

/ontrialend = [if (trial.AAT_2.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_2.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_2.responsey]

/ ontrialend = [if (trial.AAT_2.correct) values.sumRTcorrect_2 += trial.AAT_2.latency]
/ ontrialend = [values.sumRT_2 += trial.AAT_2.latency]

/ ontrialend = [values.trialcode = "AAT_2"]
/ ontrialend = [values.RT = trial.AAT_2.latency]
/ ontrialend = [values.correct = trial.AAT_2.correct]
/ ontrialend = [values.stimulus = picture.targetstimulusAAT.currentitem]

/ontrialend = [if (values.response == 1) values.initialresponse = "PULL"
                        else values.initialresponse = "PUSH"]

/ branch = [if (values.response == 1) trial.decreaseAAT else trial.increaseAAT]
/recorddata = false
</trial>

/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_2.responsey > values.mouse_y) ||
                        (values.expcondition == 2 && trial.AAT_2.responsey > values.mouse_y)]


<trial AAT_3>
/inputdevice = mouse
/ ontrialbegin = [values.trialcode = "AAT_3"]
/ ontrialbegin = [values.selectstimulus = list.category3AAT.nextvalue]
/ ontrialbegin = [values.targetcategory = 3; values.targetformat = "l"]
/ ontrialbegin = [picture.targetstimulusAAT.height = values.startheight_A]

/ ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = targetstimulusAAT]
/ validresponse = (mousemove)
/isvalidresponse = [(trial.AAT_3.responsey > (values.mouse_y + values.pixeltolerance)) ||
                    (trial.AAT_3.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_3.responsey < values.mouse_y)]

/ ontrialend = [if (trial.AAT_3.correct) values.sumRTcorrect_3 += trial.AAT_3.latency]
/ ontrialend = [values.sumRT_3 += trial.AAT_3.latency]

/ontrialend = [if (trial.AAT_3.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_3.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_3.responsey]

/ ontrialend = [values.RT = trial.AAT_3.latency]
/ ontrialend = [values.correct = trial.AAT_3.correct]
/ ontrialend = [values.stimulus = picture.targetstimulusAAT.currentitem]

/ontrialend = [if (values.response == 1) values.initialresponse = "PUSH"
                        else values.initialresponse = "PULL"]
/ branch = [if (values.response == 1) trial.decreaseAAT else trial.increaseAAT]
/recorddata = false
</trial>

/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_3.responsey < values.mouse_y) ||
                        (values.expcondition == 2 && trial.AAT_3.responsey < values.mouse_y)]

<trial AAT_4>
/inputdevice = mouse
/ ontrialbegin = [values.selectstimulus = list.category4AAT.nextvalue]
/ ontrialbegin = [values.targetcategory = 4; values.targetformat = "p"]
/ ontrialbegin = [picture.targetstimulusAAT.height = values.startheight_B]

/ ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0]
/ ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""]

/ stimulusframes = [1 = targetstimulusAAT]
/ validresponse = (mousemove)
/isvalidresponse = [(trial.AAT_4.responsey > (values.mouse_y + values.pixeltolerance)) ||
                    (trial.AAT_4.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_4.responsey > values.mouse_y)]

/ontrialend = [if (trial.AAT_4.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_4.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_4.responsey]

/ ontrialend = [if (trial.AAT_4.correct) values.sumRTcorrect_4 += trial.AAT_4.latency]
/ ontrialend = [values.sumRT_4 += trial.AAT_4.latency]

/ ontrialend = [values.trialcode = "AAT_4"]
/ ontrialend = [values.RT = trial.AAT_4.latency]
/ ontrialend = [values.correct = trial.AAT_4.correct]
/ ontrialend = [values.stimulus = picture.targetstimulusAAT.currentitem]

/ontrialend = [if (values.response == 1) values.initialresponse = "PULL"
                        else values.initialresponse = "PUSH"]

/ branch = [if (values.response == 1) trial.decreaseAAT else trial.increaseAAT]
/recorddata = false
</trial>
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_4.responsey > values.mouse_y) ||
                        (values.expcondition == 2 && trial.AAT_4.responsey > values.mouse_y)]


**********************************************************************
ZOOM trials that control the size changes of the target stimuli
as dictated by response; zoom trials come to an end when the
mouse cursor has reached either end of the monitor height
**********************************************************************

<trial decreaseAAT>
/inputdevice = mouse
/ ontrialbegin = [picture.targetstimulusAAT.height = picture.targetstimulusAAT.height - values.mouse_change/expressions.ratio_mousechangePerAssignedpixel]

/ stimulusframes = [1 = eraserAAT, targetstimulusAAT]
/validresponse = (mousemove)
/ontrialend = [values.mouse_change = abs(values.mouse_y - trial.decreaseAAT.responsey)]

/ontrialend = [trial.decreaseAAT.resetstimulusframes()]

/branch = [if (script.subjectid == "monkey") {values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.intertrialintervalAAT}]

/branch = [if (trial.decreaseAAT.responsey <= 1)
                {values.mouse_y = trial.decreaseAAT.responsey; values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.enddecreaseAAT}]
/branch = [if (trial.decreaseAAT.responsey <= values.mouse_y)
                {values.mouse_y = trial.decreaseAAT.responsey; trial.decreaseAAT}]
/branch = [if (trial.decreaseAAT.responsey > values.mouse_y)
                {values.mouse_y = trial.decreaseAAT.responsey; values.changedirection += 1; trial.increaseAAT}]

/ recorddata = false
</trial>


<trial increaseAAT>
/ ontrialbegin = [picture.targetstimulusAAT.height = picture.targetstimulusAAT.height + values.mouse_change/expressions.ratio_mousechangePerAssignedpixel]
/ stimulusframes = [1 = targetstimulusAAT]
/validresponse = (mousemove)
/ontrialend = [values.mouse_change = abs(values.mouse_y - trial.increaseAAT.responsey)]

/ontrialend = [trial.increaseAAT.resetstimulusframes()]

/branch = [if (script.subjectid == "monkey") {values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.intertrialintervalAAT}]

/branch = [if (trial.increaseAAT.responsey >= display.height-1)
                {values.mouse_y = trial.increaseAAT.responsey; values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.endincreaseAAT}]
/branch = [if (trial.increaseAAT.responsey >= values.mouse_y)
                {values.mouse_y = trial.increaseAAT.responsey; trial.increaseAAT}]
/branch = [if (trial.increaseAAT.responsey < values.mouse_y)
                {values.mouse_y = trial.increaseAAT.responsey; values.changedirection += 1; trial.decreaseAAT}]
/recorddata = false
</trial>

Note: trials show the last size of the picture
<trial endincreaseAAT>
/ ontrialbegin = [picture.targetstimulusAAT.height = picture.targetstimulusAAT.height + values.mouse_change/expressions.ratio_mousechangePerAssignedpixel]
/stimulusframes = [1 = targetstimulusAAT]
/timeout = 0
/branch = [trial.intertrialintervalAAT]
/recorddata = false
</trial>

<trial enddecreaseAAT>
/ontrialbegin = [picture.targetstimulusAAT.height = picture.targetstimulusAAT.height - values.mouse_change/expressions.ratio_mousechangePerAssignedpixel]
/stimulusframes = [1 = eraserAAT, targetstimulusAAT]
/timeout = 0
/branch = [trial.intertrialintervalAAT]
/recorddata = false
</trial>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
> Everything was working well, until I added the script with the include-element to another script [...] added "AAT" to all element
> names to prevent double definitions in the combined scripts. After this, the problem occured.

This suggest that some mistake was introduced during the process. Where that mistake is, is impossible to say since you only provided part of the code.

> The problem occurs after the practice.

It's unclear from the excerpt you provided what that means. The excerpt only contains one <block> -- the practice block -- so if the problem only occurs after that block, potentially relevant parts are missing.

> Herunder you can find the script containing the trials.

Please do not paste lengthy code excerpts into a message's body. Use the forum's file attachment facilities instead, please. Put the entire script(s) and associated files in a ZIP archive and attach it to your post by clicking +Insert -> Add File.

KatrinL
KatrinL
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 8, Visits: 48
Dear Dave,

sorry that I posted so much script here, from now on I will upload it in a file! In the meantime I found out (while searching in this forum), that I can also use the "batch" element to combine scripts in inquisit web (Earlier I thought that this would work ony for inquisit lab). The batch element is much easier to use and the tests work fine, and the pictures in the AAT do not freeze anymore! But another problem with the AAT occured:

When I pull the mouse towards me (when the plates are angular), the zoom-effect makes the picutures appear closer to me, but the picture does not reach its final fullscreen size and therefore reports "error", because the correct final movement is not made.

Interestingly, this problem does not occur on my PC but on my colleages PCs.

Thank you for your help!

Katrin




Attachments
AATforum.exp (994 views, 64.00 KB)
KatrinL
KatrinL
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 8, Visits: 48
I  found out now, that it has to do with the resultion of the computer screen. On a computer with a resolution of 1680x1050 or higher, the AAT works fine. On computers with a lower resolution it doesn't. But what should I do now to make it work for every computer?

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
I am unable to reproduce this on my test machines, so I can only speculate.

The script tracks the mouse coordinates to determine whether a stimulus has been fully zoomed in or out and ends the trial accordingly. Various /branch attributes take care of that, e.g.

<trial decrease>
.../branch = [if (trial.decrease.responsey <= 1)
                {values.mouse_y = trial.decrease.responsey; values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.enddecrease}]
---
</trial>

<trial increase>
...
/branch = [if (trial.increase.responsey >= display.height-1)
                {values.mouse_y = trial.increase.responsey; values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.endincrease}]
...
</trial>

i.e., has the mouse reached the top vs. bottom of the given display.

For debugging purposes, you should (1) set /recorddata=true for all <trial> elements and (2) log values.mouse_y, trial.increase.responsey, trial.decrease.responsey and display.height to the data file via the <data> element's /columns element. Then run the script on the affected machine and examine the logged coordinates. It is likely that something on that machine is throwing those coordinates off (e.g. a 2nd attached display), such that the coordinate that triggers the end of the trial is never reached. Report back with the results and we'll take it from there. You can also try to relax the triggering condition a little bit, by e.g. doing:

<trial increase>
...
/branch = [if (trial.increase.responsey >= display.height-2)
                {values.mouse_y = trial.increase.responsey; values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.endincrease}]
...
</trial>
KatrinL
KatrinL
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 8, Visits: 48
Now the logs told me that the pciture size is too big. When I changed the size of the picture, there were no complaints about the size in the logs anymore. However, the problem persisted: The pictures reach the full width before the full height, and therefore cannot touch the bottom of the screen. Is it possible that it has to do with ratio? Or Canvasspectratio? If yes, how should I change it?

<values>
/ratioA = 0.4
/ratioB = 0.5
/MinHeight = 0.1
/intertrialinterval = 300
/pixeltolerance = 10
</values>       

<defaults >
/canvasaspectratio = (4,3)
/minimumversion = "4.0.2.0"
/ inputdevice = mouse
</defaults>

Note: My pictures are all in landscape format.

KatrinL
KatrinL
Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)Esteemed Member (1.9K reputation)
Group: Forum Members
Posts: 8, Visits: 48
btw. I also changed trial.practiceincrease.responsey >= display.height-2 as you suggested.
trial.increase.responsey >= display.height-2)
trial.increase.responsey >= display.height-2)

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
> The pictures reach the full width before the full height, and therefore cannot touch the bottom of the screen.

That should not prevent the images from being zoomed further until the bottom is hit (the width should just extend beyond the screen boundaries). I'd still be interested in learning the actual mouse coordinates returned.

Without know the specifics of the display (resolution and aspect ratio) on the affected machine it is hard to tell what's going on. It is possible that canvasheight != displayheight. Try replacing all instances of display.height with display.canvasheight and re-check the coordinates / script behavior.

Since you set the aspectration to 4:3 you should make sure that the images are using conform to that ratio as well (Inquisit will not stretch or otherwise distort the image's original dimensions / aspect ratio).

You can also experiment with other aspect ratios and/or fine-tune the various values you mentioned:

/ratioA:                        sets the original size of the landscape pictures (default ratio: 0.4)
/ratioB:                        sets the original size of the portrait pictures (default ratio: 0.5)
/MinHeight:                       h sets the the min picture height (default: 0.1 => 10% of MaxHeight)


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search