﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 5  » Simple script using a list, and giving feedback.</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 09 Apr 2026 07:18:41 GMT</lastBuildDate><ttl>20</ttl><item><title>Simple script using a list, and giving feedback.</title><link>https://forums.millisecond.com/Topic23932.aspx</link><description>Hi&lt;br/&gt;&lt;br/&gt;I'm trying to create a Minimal Worked Example for an experiment which involves conditional branching to give feedback. Code is below. I can get the items to display, and I can record the keypresses, but the conditional branching doesn't work. The aim is to give 'correct' and 'incorrect' feedback according to a series of values specified in a lis (called 'answer'). The problem is that the conditional statements (in wordTrial) do not succeed in calling further trials to give the feedback. This is either a problem with the way items from the list are selected, or with the conditional statements themselves. It all looks perfectly okay to me.&lt;br/&gt;&lt;br/&gt;Any feedback greatly welcomed&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text wordText&amp;gt;&lt;br/&gt;/ items = ("dog", "cat")&lt;br/&gt;/ select = sequence&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text questionText&amp;gt;&lt;br/&gt;/ items = ("Is this a dog?", "Is this a lizard?")&lt;br/&gt;/ vposition = 25%&lt;br/&gt;/ select = text.wordText.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctResponseText&amp;gt;&lt;br/&gt;/ items = ("Correct!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text incorrectResponseText&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list answer&amp;gt;&lt;br/&gt;/ items = ("y", "n")&lt;br/&gt;/ selectionmode = sequence&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial wordTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = wordText, questionText]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.correctResponse]&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.incorrectResponse]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial correctResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = correctResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incorrectResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = incorrectResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block wordBlock&amp;gt;&lt;br/&gt;/ trials = [1-2 = wordTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt exptBlock&amp;gt;&lt;br/&gt;/ blocks = [1 = wordBlock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 01 Mar 2018 23:43:21 GMT</pubDate><dc:creator>Nick Riches</dc:creator></item><item><title>RE: Simple script using a list, and giving feedback.</title><link>https://forums.millisecond.com/Topic23942.aspx</link><description>&lt;div data-id="23938" class="if-quote-wrapper" unselectable="on" data-guid="1519976599300"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23938" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23938" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23938" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, February 28, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23938"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23936" class="if-quote-wrapper" unselectable="on" data-guid="1519976599300"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23936" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23936" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23936" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Wednesday, February 28, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23936"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23933" class="if-quote-wrapper" unselectable="on" data-guid="1519976599300"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23933" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23933" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23933" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23933"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23932" class="if-quote-wrapper" unselectable="on" data-guid="1519976599300"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23932" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23932" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23932" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23932"&gt;&lt;div class="if-quote-message-margin"&gt;Hi&lt;br/&gt;&lt;br/&gt;I'm trying to create a Minimal Worked Example for an experiment which involves conditional branching to give feedback. Code is below. I can get the items to display, and I can record the keypresses, but the conditional branching doesn't work. The aim is to give 'correct' and 'incorrect' feedback according to a series of values specified in a lis (called 'answer'). The problem is that the conditional statements (in wordTrial) do not succeed in calling further trials to give the feedback. This is either a problem with the way items from the list are selected, or with the conditional statements themselves. It all looks perfectly okay to me.&lt;br/&gt;&lt;br/&gt;Any feedback greatly welcomed&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text wordText&amp;gt;&lt;br/&gt;/ items = ("dog", "cat")&lt;br/&gt;/ select = sequence&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text questionText&amp;gt;&lt;br/&gt;/ items = ("Is this a dog?", "Is this a lizard?")&lt;br/&gt;/ vposition = 25%&lt;br/&gt;/ select = text.wordText.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctResponseText&amp;gt;&lt;br/&gt;/ items = ("Correct!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text incorrectResponseText&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list answer&amp;gt;&lt;br/&gt;/ items = ("y", "n")&lt;br/&gt;/ selectionmode = sequence&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial wordTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = wordText, questionText]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.correctResponse]&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.incorrectResponse]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial correctResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = correctResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incorrectResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = incorrectResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block wordBlock&amp;gt;&lt;br/&gt;/ trials = [1-2 = wordTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt exptBlock&amp;gt;&lt;br/&gt;/ blocks = [1 = wordBlock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23932"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;You would set this up like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;text wordText&amp;gt;&lt;br/&gt;/ items = ("dog", "cat")&lt;br/&gt;/ select = sequence&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text questionText&amp;gt;&lt;br/&gt;/ items = ("Is this a dog?", "Is this a lizard?")&lt;br/&gt;/ vposition = 25%&lt;br/&gt;/ select = text.wordText.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctResponseText&amp;gt;&lt;br/&gt;/ items = ("Correct!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text incorrectResponseText&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;//pair the answer items to the displayed word item&lt;br/&gt;&amp;lt;list answer&amp;gt;&lt;br/&gt;/ items = ("y", "n")&lt;br/&gt;&lt;strong&gt;/ selectionmode = text.wordText.currentindex&lt;/strong&gt;&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;//check if the response given is equal to the scancode of the answer item encoded in the answer list&lt;br/&gt;&amp;lt;trial wordTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = wordText, questionText]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;&lt;strong&gt;/ iscorrectresponse = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trial.wordTrial.response == computer.chartoscancode(list.answer.nextvalue);&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;/ branch = [if (trial.wordTrial.&lt;strong&gt;correct&lt;/strong&gt;)trial.correctResponse]&lt;br/&gt;/ branch = [if (trial.wordTrial.&lt;strong&gt;error&lt;/strong&gt;)trial.incorrectResponse]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;// if correct, /branch to trial.correctresponse&lt;br/&gt;// if incorrect, /branch to trial.incorrectresponse&lt;br/&gt;&lt;br/&gt;&amp;lt;trial correctResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = correctResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incorrectResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = incorrectResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block wordBlock&amp;gt;&lt;br/&gt;/ trials = [1-2 = wordTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt exptBlock&amp;gt;&lt;br/&gt;/ blocks = [1 = wordBlock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23933"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Many thanks. That does the trick. I can see how the 'chartoscancode' method converts the list object to characters. What I'm not quite sure about is the 'nextvalue' parameter. The answer list is indexed to the current word item. So surely the current value should be correct?&lt;br/&gt;&lt;br/&gt;Best wishes&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23936"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;nextvalue is what actually causes a selection from the list. currentvalue wouldn't work because at this point no selection from the list has actually occurred before. But even if it were so, the list is configured to /selectionrate=trial by default, i.e. even repeated selections within the trial per nextvalue would always return the same, correct value.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23938"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Many thanks for that.&lt;br/&gt;</description><pubDate>Thu, 01 Mar 2018 23:43:21 GMT</pubDate><dc:creator>Nick Riches</dc:creator></item><item><title>RE: Simple script using a list, and giving feedback.</title><link>https://forums.millisecond.com/Topic23938.aspx</link><description>&lt;div data-id="23936" class="if-quote-wrapper" unselectable="on" data-guid="1519837798073"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23936" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23936" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23936" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Wednesday, February 28, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23936"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23933" class="if-quote-wrapper" unselectable="on" data-guid="1519837798073"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23933" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23933" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23933" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23933"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23932" class="if-quote-wrapper" unselectable="on" data-guid="1519837798073"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23932" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23932" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23932" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23932"&gt;&lt;div class="if-quote-message-margin"&gt;Hi&lt;br/&gt;&lt;br/&gt;I'm trying to create a Minimal Worked Example for an experiment which involves conditional branching to give feedback. Code is below. I can get the items to display, and I can record the keypresses, but the conditional branching doesn't work. The aim is to give 'correct' and 'incorrect' feedback according to a series of values specified in a lis (called 'answer'). The problem is that the conditional statements (in wordTrial) do not succeed in calling further trials to give the feedback. This is either a problem with the way items from the list are selected, or with the conditional statements themselves. It all looks perfectly okay to me.&lt;br/&gt;&lt;br/&gt;Any feedback greatly welcomed&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text wordText&amp;gt;&lt;br/&gt;/ items = ("dog", "cat")&lt;br/&gt;/ select = sequence&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text questionText&amp;gt;&lt;br/&gt;/ items = ("Is this a dog?", "Is this a lizard?")&lt;br/&gt;/ vposition = 25%&lt;br/&gt;/ select = text.wordText.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctResponseText&amp;gt;&lt;br/&gt;/ items = ("Correct!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text incorrectResponseText&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list answer&amp;gt;&lt;br/&gt;/ items = ("y", "n")&lt;br/&gt;/ selectionmode = sequence&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial wordTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = wordText, questionText]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.correctResponse]&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.incorrectResponse]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial correctResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = correctResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incorrectResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = incorrectResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block wordBlock&amp;gt;&lt;br/&gt;/ trials = [1-2 = wordTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt exptBlock&amp;gt;&lt;br/&gt;/ blocks = [1 = wordBlock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23932"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;You would set this up like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;text wordText&amp;gt;&lt;br/&gt;/ items = ("dog", "cat")&lt;br/&gt;/ select = sequence&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text questionText&amp;gt;&lt;br/&gt;/ items = ("Is this a dog?", "Is this a lizard?")&lt;br/&gt;/ vposition = 25%&lt;br/&gt;/ select = text.wordText.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctResponseText&amp;gt;&lt;br/&gt;/ items = ("Correct!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text incorrectResponseText&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;//pair the answer items to the displayed word item&lt;br/&gt;&amp;lt;list answer&amp;gt;&lt;br/&gt;/ items = ("y", "n")&lt;br/&gt;&lt;strong&gt;/ selectionmode = text.wordText.currentindex&lt;/strong&gt;&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;//check if the response given is equal to the scancode of the answer item encoded in the answer list&lt;br/&gt;&amp;lt;trial wordTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = wordText, questionText]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;&lt;strong&gt;/ iscorrectresponse = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trial.wordTrial.response == computer.chartoscancode(list.answer.nextvalue);&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;/ branch = [if (trial.wordTrial.&lt;strong&gt;correct&lt;/strong&gt;)trial.correctResponse]&lt;br/&gt;/ branch = [if (trial.wordTrial.&lt;strong&gt;error&lt;/strong&gt;)trial.incorrectResponse]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;// if correct, /branch to trial.correctresponse&lt;br/&gt;// if incorrect, /branch to trial.incorrectresponse&lt;br/&gt;&lt;br/&gt;&amp;lt;trial correctResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = correctResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incorrectResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = incorrectResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block wordBlock&amp;gt;&lt;br/&gt;/ trials = [1-2 = wordTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt exptBlock&amp;gt;&lt;br/&gt;/ blocks = [1 = wordBlock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23933"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Many thanks. That does the trick. I can see how the 'chartoscancode' method converts the list object to characters. What I'm not quite sure about is the 'nextvalue' parameter. The answer list is indexed to the current word item. So surely the current value should be correct?&lt;br/&gt;&lt;br/&gt;Best wishes&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23936"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;nextvalue is what actually causes a selection from the list. currentvalue wouldn't work because at this point no selection from the list has actually occurred before. But even if it were so, the list is configured to /selectionrate=trial by default, i.e. even repeated selections within the trial per nextvalue would always return the same, correct value.&lt;br/&gt;</description><pubDate>Wed, 28 Feb 2018 09:13:34 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Simple script using a list, and giving feedback.</title><link>https://forums.millisecond.com/Topic23936.aspx</link><description>&lt;div data-id="23933" class="if-quote-wrapper" unselectable="on" data-guid="1519831096362"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23933" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23933" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23933" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23933"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23932" class="if-quote-wrapper" unselectable="on" data-guid="1519831096362"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23932" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23932" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23932" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23932"&gt;&lt;div class="if-quote-message-margin"&gt;Hi&lt;br/&gt;&lt;br/&gt;I'm trying to create a Minimal Worked Example for an experiment which involves conditional branching to give feedback. Code is below. I can get the items to display, and I can record the keypresses, but the conditional branching doesn't work. The aim is to give 'correct' and 'incorrect' feedback according to a series of values specified in a lis (called 'answer'). The problem is that the conditional statements (in wordTrial) do not succeed in calling further trials to give the feedback. This is either a problem with the way items from the list are selected, or with the conditional statements themselves. It all looks perfectly okay to me.&lt;br/&gt;&lt;br/&gt;Any feedback greatly welcomed&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text wordText&amp;gt;&lt;br/&gt;/ items = ("dog", "cat")&lt;br/&gt;/ select = sequence&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text questionText&amp;gt;&lt;br/&gt;/ items = ("Is this a dog?", "Is this a lizard?")&lt;br/&gt;/ vposition = 25%&lt;br/&gt;/ select = text.wordText.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctResponseText&amp;gt;&lt;br/&gt;/ items = ("Correct!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text incorrectResponseText&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list answer&amp;gt;&lt;br/&gt;/ items = ("y", "n")&lt;br/&gt;/ selectionmode = sequence&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial wordTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = wordText, questionText]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.correctResponse]&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.incorrectResponse]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial correctResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = correctResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incorrectResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = incorrectResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block wordBlock&amp;gt;&lt;br/&gt;/ trials = [1-2 = wordTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt exptBlock&amp;gt;&lt;br/&gt;/ blocks = [1 = wordBlock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23932"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;You would set this up like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;text wordText&amp;gt;&lt;br/&gt;/ items = ("dog", "cat")&lt;br/&gt;/ select = sequence&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text questionText&amp;gt;&lt;br/&gt;/ items = ("Is this a dog?", "Is this a lizard?")&lt;br/&gt;/ vposition = 25%&lt;br/&gt;/ select = text.wordText.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctResponseText&amp;gt;&lt;br/&gt;/ items = ("Correct!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text incorrectResponseText&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;//pair the answer items to the displayed word item&lt;br/&gt;&amp;lt;list answer&amp;gt;&lt;br/&gt;/ items = ("y", "n")&lt;br/&gt;&lt;strong&gt;/ selectionmode = text.wordText.currentindex&lt;/strong&gt;&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;//check if the response given is equal to the scancode of the answer item encoded in the answer list&lt;br/&gt;&amp;lt;trial wordTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = wordText, questionText]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;&lt;strong&gt;/ iscorrectresponse = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trial.wordTrial.response == computer.chartoscancode(list.answer.nextvalue);&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;/ branch = [if (trial.wordTrial.&lt;strong&gt;correct&lt;/strong&gt;)trial.correctResponse]&lt;br/&gt;/ branch = [if (trial.wordTrial.&lt;strong&gt;error&lt;/strong&gt;)trial.incorrectResponse]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;// if correct, /branch to trial.correctresponse&lt;br/&gt;// if incorrect, /branch to trial.incorrectresponse&lt;br/&gt;&lt;br/&gt;&amp;lt;trial correctResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = correctResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incorrectResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = incorrectResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block wordBlock&amp;gt;&lt;br/&gt;/ trials = [1-2 = wordTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt exptBlock&amp;gt;&lt;br/&gt;/ blocks = [1 = wordBlock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23933"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Many thanks. That does the trick. I can see how the 'chartoscancode' method converts the list object to characters. What I'm not quite sure about is the 'nextvalue' parameter. The answer list is indexed to the current word item. So surely the current value should be correct?&lt;br/&gt;&lt;br/&gt;Best wishes&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;</description><pubDate>Wed, 28 Feb 2018 07:20:45 GMT</pubDate><dc:creator>Nick Riches</dc:creator></item><item><title>RE: Simple script using a list, and giving feedback.</title><link>https://forums.millisecond.com/Topic23933.aspx</link><description>&lt;div data-id="23932" class="if-quote-wrapper" unselectable="on" data-guid="1519767331613"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23932" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23932" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23932" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23932"&gt;&lt;div class="if-quote-message-margin"&gt;Hi&lt;br/&gt;&lt;br/&gt;I'm trying to create a Minimal Worked Example for an experiment which involves conditional branching to give feedback. Code is below. I can get the items to display, and I can record the keypresses, but the conditional branching doesn't work. The aim is to give 'correct' and 'incorrect' feedback according to a series of values specified in a lis (called 'answer'). The problem is that the conditional statements (in wordTrial) do not succeed in calling further trials to give the feedback. This is either a problem with the way items from the list are selected, or with the conditional statements themselves. It all looks perfectly okay to me.&lt;br/&gt;&lt;br/&gt;Any feedback greatly welcomed&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text wordText&amp;gt;&lt;br/&gt;/ items = ("dog", "cat")&lt;br/&gt;/ select = sequence&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text questionText&amp;gt;&lt;br/&gt;/ items = ("Is this a dog?", "Is this a lizard?")&lt;br/&gt;/ vposition = 25%&lt;br/&gt;/ select = text.wordText.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctResponseText&amp;gt;&lt;br/&gt;/ items = ("Correct!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text incorrectResponseText&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list answer&amp;gt;&lt;br/&gt;/ items = ("y", "n")&lt;br/&gt;/ selectionmode = sequence&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial wordTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = wordText, questionText]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.correctResponse]&lt;br/&gt;/ branch = [if (trial.wordTrial.response == list.answer.currentvalue)trial.incorrectResponse]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial correctResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = correctResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incorrectResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = incorrectResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block wordBlock&amp;gt;&lt;br/&gt;/ trials = [1-2 = wordTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt exptBlock&amp;gt;&lt;br/&gt;/ blocks = [1 = wordBlock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23932"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;You would set this up like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;text wordText&amp;gt;&lt;br/&gt;/ items = ("dog", "cat")&lt;br/&gt;/ select = sequence&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text questionText&amp;gt;&lt;br/&gt;/ items = ("Is this a dog?", "Is this a lizard?")&lt;br/&gt;/ vposition = 25%&lt;br/&gt;/ select = text.wordText.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctResponseText&amp;gt;&lt;br/&gt;/ items = ("Correct!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text incorrectResponseText&amp;gt;&lt;br/&gt;/ items = ("Incorrect!")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;//pair the answer items to the displayed word item&lt;br/&gt;&amp;lt;list answer&amp;gt;&lt;br/&gt;/ items = ("y", "n")&lt;br/&gt;&lt;strong&gt;/ selectionmode = text.wordText.currentindex&lt;/strong&gt;&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;//check if the response given is equal to the scancode of the answer item encoded in the answer list&lt;br/&gt;&amp;lt;trial wordTrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = wordText, questionText]&lt;br/&gt;/ validresponse = ("y", "n")&lt;br/&gt;&lt;strong&gt;/ iscorrectresponse = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trial.wordTrial.response == computer.chartoscancode(list.answer.nextvalue);&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;/ branch = [if (trial.wordTrial.&lt;strong&gt;correct&lt;/strong&gt;)trial.correctResponse]&lt;br/&gt;/ branch = [if (trial.wordTrial.&lt;strong&gt;error&lt;/strong&gt;)trial.incorrectResponse]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;// if correct, /branch to trial.correctresponse&lt;br/&gt;// if incorrect, /branch to trial.incorrectresponse&lt;br/&gt;&lt;br/&gt;&amp;lt;trial correctResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = correctResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incorrectResponse&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = incorrectResponseText]&lt;br/&gt;/ timeout = 6000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block wordBlock&amp;gt;&lt;br/&gt;/ trials = [1-2 = wordTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt exptBlock&amp;gt;&lt;br/&gt;/ blocks = [1 = wordBlock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;</description><pubDate>Tue, 27 Feb 2018 13:39:28 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>