
<defaults>
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ posttrialpause = 500
</defaults>

************************** stimuli *****************************

<text pleasanttop>
/ items = pleasant
/ position = (50%, 45%)
</text>

<text pleasantbottom>
/ items = pleasant
/ position = (50%, 55%)
</text>

<item pleasant>
/1 = "Marvelous"
/2 = "Superb"
/3 = "Pleasure"
/4 = "Beautiful"
/5 = "Joyful"
/6 = "Glorious"
/7 = "Lovely"
/8 = "Wonderful"
</item>

<text unpleasanttop>
/ items = unpleasant
/ position = (50%, 45%)
</text>

<text unpleasantbottom>
/ items = unpleasant
/ position = (50%, 55%)
</text>

<item unpleasant>
/1 = "Tragic"
/2 = "Horrible"
/3 = "Agony"
/4 = "Painful"
/5 = "Terrible"
/6 = "Awful"
/7 = "Humiliate"
/8 = "Nasty"
</item>

<shape probetop>
/ shape = circle
/ size = (.66%, 1%)
/ color = (200, 200, 200)
/ position = (50%, 45%)
</shape>

<shape probebottom>
/ shape = circle
/ size = (.66%, 1%)
/ color = (200, 200, 200)
/ position = (50%, 55%)
</shape>

<text fixation>
/ items = ("+")
</text>

<text erasefixation>
/ items = ("+")
/ txcolor = (255, 255, 255)
</text>

<text errormessage>
/ items = ("error")
/ txcolor = (255, 0, 0)
</text>

<shape erasewords>
/ color = (255, 255, 255)
/ size = (30%, 20%)
</shape>

*************************** Instructions *******************
<instruct>
/ nextlabel = "Press the spacebard to proceed"
/ lastlabel = "Press the spacebard to proceed"
/ nextkey = (" ")
/ fontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
</instruct>

<page begin>
Dot Probe Demo
^^This sample demonstrates a simple dot probe task. On each trial, a fixation point '+' is presented for 500 ms, followed by two words, one pleasant and the other unpleasant, presented above and below the fixation point for 1000 ms. Both words are erased from the screen, and one is replaced with a gray dot. 
^^If the dot is in the upper position, press the 'i' key on the keyboard.
^^If the dot is in the lower position, press the 'e' key on the keyboard.
^^Respond as quickly and accurately as possible.
</page>

<page practice>
^^The next 20 trials are practice trials so you can learn the task. An error message will be shown if you respond incorrectly. 
^^ As a reminder:
^^If the dot is in the upper position, press the 'i' key on the keyboard.
^^If the dot is in the lower position, press the 'e' key on the keyboard.
</page>

<page test>
^^The next 40 trials are test trials. Please respond as quickly and accurately as possible. The error message will no longer be displayed after an incorrect response. 
^^ As a reminder:
^^If the dot is in the upper position, press the 'i' key on the keyboard.
^^If the dot is in the lower position, press the 'e' key on the keyboard.
</page>


<page summary>
^^Performance summary:
^^The following are average reaction times for 4 different conditions of the experiment:
^^Dot replaces pleasant word on top: <% trial.pleasanttop.meanlatency %> milliseconds.
^Dot replaces unpleasant word on top: <% trial.unpleasanttop.meanlatency %> milliseconds.
^Dot replaces pleasant word on bottom: <% trial.pleasantbottom.meanlatency %> milliseconds.
^Dot replaces unpleasant word on bottom: <% trial.unpleasantbottom.meanlatency %> milliseconds.
^^Responses are typically faster on unpleasant trials because the unpleasant stimuli draw attention.
</page>

<page end>
^^^Demo complete!
</page>


*************************** trials **********************

<trial pleasanttop>
/ correctresponse = ("i")
/ validresponse = ("e", "i")
/ stimulustimes = [0=fixation; 500=erasefixation, pleasanttop, unpleasantbottom; 1500=erasewords, probetop]
</trial>

<trial pleasantbottom>
/ correctresponse = ("e")
/ validresponse = ("e", "i")
/ stimulustimes = [0=fixation; 500=erasefixation, pleasantbottom, unpleasanttop; 1500=erasewords, probebottom]
</trial>

<trial unpleasantbottom>
/ correctresponse = ("e")
/ validresponse = ("e", "i")
/ stimulustimes = [0=fixation; 500=erasefixation, unpleasantbottom, pleasanttop; 1500=erasewords, probebottom]
</trial>

<trial unpleasanttop>
/ correctresponse = ("i")
/ validresponse = ("e", "i")
/ stimulustimes = [0=fixation; 500=erasefixation, pleasantbottom, unpleasanttop; 1500=erasewords, probetop]
</trial>

********************** blocks ***************************

<block practice>
/ preinstructions = (practice)
/ trials = [1-20=noreplace(pleasanttop, pleasantbottom, unpleasanttop, unpleasantbottom)]
/ errormessage = (errormessage, 300)
/ recorddata = false
</block>

<block test>
/ preinstructions = (test)
/ trials = [1-40=noreplace(pleasanttop, pleasantbottom, unpleasanttop, unpleasantbottom)]
</block>


************************** experiment************************

<expt>
/ preinstructions = (begin)
/ blocks = [1=practice; 2=test]
/ postinstructions = (summary, end)
</expt>


