Hi Dave,
I'm sorry, but I don't understand how to use values and expressions. I have no experience with coding language or scripting so this is very difficult to understand. Following on from
http://www.millisecond.com/support/docs/v4/html/language/express.htm and
http://www.millisecond.com/support/docs/v4/html/language/expressions/functions.htm I ended up with something like this, but it doesn't work.
practice block with true keyed to left
<block compatiblepractice>
/ bgstim = (trueleft, falseright)
/ trials = [1 = instructions; 2 = practice; 3 =instructions1; 4 =instructionsleft; 5-24 = noreplace(aaleft, aaleft2, bbleft, bbleft2)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
/ onblockend = [meanlatency(block.compatiblepractice);percentcorrect(block.compatiblepractice)]
</block>
practice block with true keyed to right
<block compatiblepracticeswitch>
/ bgstim = (trueright, falseleft)
/ trials = [1 = instructionsright; 2-41 = noreplace(aaright, aaright2, bbright, bbright2)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
/ onblockend = [meanlatency(block.compatiblepracticeswitch);percentcorrect(block.compatiblepracticeswitch)]
</block>
INCOMPATIBLE PRACTICE
practice block with true keyed to left
<block incompatiblepractice>
/ bgstim = (trueleft, falseright)
/ trials = [1 = instructions2; 2 = instructionsleft; 3-22 = noreplace(ableft, ableft2, baleft, baleft2)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
/ onblockend = [meanlatency(block.incompatiblepractice); percentcorrect(block.incompatiblepractice)]
</block>
practice block with true keyed to right
<block incompatiblepracticeswitch>
/ bgstim = (trueright, falseleft)
/ trials = [1 = instructionsright; 2-41 = noreplace(abright, abright2, baright, baright2)]
/ errormessage = true(error,200)
/ responsemode = correct
/ recorddata = false
/ onblockend = [meanlatency(block.incompatiblepracticeswitch);percentcorrect(block.incompatiblepracticeswitch)]
/ postinstructions = (feedback)
</block>
<values practice>
/ totalmeanlatency = totalmeanlatency(block.compatiblepractice, block.compatiblepracticeswitch, block.incompatiblepractice, block.incompatiblepracticeswitch)
/ totalpercentcorrect = totalpercentcorrect(block.compatiblepractice, block.compatiblepracticeswitch, block.incompatiblepractice, block.incompatiblepracticeswitch)
</values>
<instruct>
/ txcolor = (0, 0, 0)
/ screencolor = (255, 255, 255)
/ nextkey = (" ")
/ nextlabel = "Press space bar to continue"
</instruct>
<page feedback>
Your average response time was <%round(values.totalmeanlatency)%>
^^Your average accuracy rate was <%round(values.totalpercentcorrect)%>
</page>
Could you please explain how to use values and expressions?
Thank you.