Hello,
I'm currently making a version of a Stroop task that present a single coloured letter on each trial instead of a coloured word. In this task, I need to change the letters and their colours
for each participant. Yesterday I was successfully able to load the .html file using the <include> attribute as listed in this post:
https://forums.millisecond.com/Topic19045.aspx#19046However I made some changes to the script and now I can't seem to get it to work anymore.
Here is my script,
<parameters>
/keycolour1 = "A"
/keycolour2 = "S"
/keycolour3 = "K"
/keycolour4 = "L"
</parameters>
<include>
/ file = "testsyncon.html"
</include>
<block myblock>
/ trials = [1 = mytrial1; 2 = mytrial1; 3 = mytrial3; 4 = mytrial4]
</block>
<trial mytrial1>
/ stimulusframes = [1 = mytext1]
/ validresponse = ("A", "S", "K", "L")
</trial>
<trial mytrial2>
/ stimulusframes = [1 = mytext2]
/ validresponse = ("A", "S", "K", "L")
</trial>
<trial mytrial3>
/ stimulusframes = [1 = mytext3]
/ validresponse = ("A", "S", "K", "L")
</trial>
<trial mytrial4>
/ stimulusframes = [1 = mytext4]
/ validresponse = ("A", "S", "K", "L")
</trial>
<text mytext1>
/ items = myitems1
/ select = sequence
</text>
<text mytext2>
/ items = myitems2
/ select = sequence
</text>
<text mytext3>
/ items = myitems3
/ select = sequence
</text>
<text mytext4>
/ items = myitems4
/ select = sequence
</text>
<expt>
/ blocks = [
1 = myblock;
]
</expt>
And here is what is in my .html file named testsyncon.html,
<item myitems1>
/1 = "A"
</item>
<item myitems2>
/1 = "B"
</item>
<text myitems3>
/ items = ("A")
/ txcolor = (255, 33, 103)
</text>
<text myitems4>
/ items = ("S")
/ txcolor = (33, 131, 33)
</text>
The problem that comes up when I try to run the script is
Message: "Could not locate item 'myitems3';
Element: text.mytext3
Attribute: items
Message: "Could not locate item 'myitems4';
Element: text.mytext4
Attribute: items
It can locate the <item myitems1> from .html file fine, but it seems when I change it to a text element (like myitems3 and 4) so I can specify the colour, it gets unhappy. I can't remember for the life of me what I changed in the script so that it could read the text, and I would really appreciate it if someone could help out with what I need to change in the script. I definitely know it's possible to get it to work but I can't seem to recover the original successful script. (I don't actually need the <item> stimuli in the .html, this was just to show that it works for <item> but not <text>).
Thanks very much!