The image needs to be called "D1.jpg" and located in the location as the script file. The result then is
as it should be. You need to make other modifications to the script to have it work with images, however.
/ ontrialend = [if (values.match && values.couple == "a_") {
picture.a_1.item.1 = "√"; text.a_2.item.1 = "√"}
obviously will not work with a <picture>. "
"√" is not an image. Again, see scripts like the CCT in the library as examples. I'd also recommend working through the tutorials in the Inquisit documentation if you haven't done so already
.
In short:
<values>
/ couple = ""
/ first = ""
/ second = ""
/ match = 0
/ matchcount = 0
</values>
<block myblock>
/ stop = [values.matchcount == 4]
/ trials = [1=select_1st]
/ timeout = 30000
</block>
<trial select_1st>
/ inputdevice = mouse
/ stimulusframes = [1=a_1,a_2,b_1,b_2,c_1,c_2,d_1,d_2]
/ validresponse = (a_1,a_2,b_1,b_2,c_1,c_2,d_1,d_2)
/ ontrialend = [values.first = trial.select_1st.response; values.couple = substring(values.first,0,2)]
/ branch = [trial.select_2nd]
</trial>
<trial select_2nd>
/ inputdevice = mouse
/ stimulusframes = [1=a_1,a_2,b_1,b_2,c_1,c_2,d_1,d_2]
/ validresponse = (a_1,a_2,b_1,b_2,c_1,c_2,d_1,d_2)
/ ontrialend = [values.second = trial.select_2nd.response]
/ ontrialend = [if(substring(values.first,0,2) == substring(values.second,0,2)) values.match = true else values.match = false]
/ ontrialend = [if (values.match && values.couple == "a_") {picture.a_1.item.1 = picture.checkmark.item.1; text.a_2.item.1 = "√"}
else if (values.match && values.couple == "b_") {text.b_1.item.1 = "√"; text.b_2.item.1 = "√"}
else if (values.match && values.couple == "c_") {text.c_1.item.1 = "√"; text.c_2.item.1 = "√"}
else if (values.match && values.couple == "d_") {text.d_1.item.1 = "√"; text.d_2.item.1 = "√"};]
/ branch = [trial.select_1st]
</trial>
<picture a_1>
/ items = ("D1.jpg")
/ position = (40%, 45%)
/ size = (10%,10%)
/ erase = false
</picture>
<text a_2>
/ items = ("A")
/ position = (80%, 55%)
/ erase = false
</text>
<text b_1>
/ items = ("B")
/ position = (60%, 45%)
/ erase = false
</text>
<text b_2>
/ items = ("B")
/ position = (80%, 45%)
/ erase = false
</text>
<text c_1>
/ items = ("C")
/ position = (20%, 45%)
/ erase = false
</text>
<text c_2>
/ items = ("C")
/ position = (20%, 55%)
/ erase = false
</text>
<text d_1>
/ items = ("D")
/ position = (40%, 55%)
/ erase = false
</text>
<text d_2>
/ items = ("D")
/ position = (60%, 55%)
/ erase = false
</text>
<picture checkmark>
/ items = ("checkmark.png")
</picture>