﻿<?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 3  » repeat trial with certain response</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 23 Apr 2026 02:40:20 GMT</lastBuildDate><ttl>20</ttl><item><title>repeat trial with certain response</title><link>https://forums.millisecond.com/Topic3629.aspx</link><description>&lt;p&gt;
&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;I would like my subjects to have the possibility to repeat a trial when hitting a certain key like "space".&lt;/p&gt;
&lt;p&gt;The branch command that i have built in below does not work. Can anyone help?&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;
&lt;p&gt;&amp;lt;trial a1&amp;gt;&lt;/p&gt;
&lt;p&gt;/ trialcode = "a1"&amp;nbsp;&lt;/p&gt;
&lt;p&gt;/ stimulustimes = [1=start; 801=blank; 1051=square1]&lt;/p&gt;
&lt;p&gt;/ branch = [if (trial.a1.response = 57) trial.a1]&lt;/p&gt;
&lt;p&gt;/ validresponse = (42,54,57)&lt;/p&gt;
&lt;p&gt;/ correctresponse = (42)&lt;/p&gt;
&lt;p&gt;&amp;lt;/trial&amp;gt;&lt;/p&gt;
&lt;/p&gt;</description><pubDate>Wed, 19 Jun 2019 12:14:03 GMT</pubDate><dc:creator>Jerri</dc:creator></item><item><title>RE: repeat trial with certain response</title><link>https://forums.millisecond.com/Topic27310.aspx</link><description>&lt;div data-id="27309" class="if-quote-wrapper" unselectable="on" data-guid="1560971152505"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="27309" 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="27309" 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="27309" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;S F - 6/19/2019&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-27309"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="3634" class="if-quote-wrapper" unselectable="on" data-guid="1560971152505"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="3634" 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="3634" 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="3634" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 12/9/2009&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-3634"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;p&gt;The error message is informative. For starters set:&lt;/p&gt;&lt;p&gt;/ branch = [if (trial.a1.response &lt;span style="color: #ff0000;"&gt;&lt;strong&gt;==&lt;/strong&gt;&lt;/span&gt; 57) trial.a1]&lt;/p&gt;&lt;p&gt;The '=' is an assignment operator, while '==' is a comparison operator.&amp;nbsp; That should fix the error message and make the branch functional. However, if any of the stims (i.e. start, blank, square1) has more than one item, the repeated trial will display a different item than its first instance (unless you've taken precautions against this).&lt;/p&gt;&lt;p&gt;~Dave&lt;/p&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="3634"&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;Hi Dave, thanks so much for this answer. I was wondering about the last thing you said- how would we take precautions against the stim loading different items? I'd like to repeat an item if subjects get it wrong, but after showing an error message.&lt;a class="if-quote-goto quote-link" href="#" data-id="27309"&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'll have to do something like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ exampleitem = 1&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block exampleblock&amp;gt;&lt;br/&gt;/ trials = [1-4 = example]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial example&amp;gt;&lt;br/&gt;/ ontrialbegin = [if (trial.example.trialcount &amp;lt; 1 || trial.example.correct) values.exampleitem = list.items.nextindex]&lt;br/&gt;/ stimulusframes = [1=examplestimulus]&lt;br/&gt;/ validresponse = ("E", "I")&lt;br/&gt;/ correctresponse = ("E")&lt;br/&gt;/ errormessage = true(errormsg, 1000)&lt;br/&gt;/ branch = [if (trial.example.error) trial.example]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list items&amp;gt;&lt;br/&gt;/ poolsize = 4&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text examplestimulus&amp;gt;&lt;br/&gt;/ items = exampleitems&lt;br/&gt;/ select = values.exampleitem&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item exampleitems&amp;gt;&lt;br/&gt;/ 1 = "Example A"&lt;br/&gt;/ 2 = "Example B"&lt;br/&gt;/ 3 = "Example C"&lt;br/&gt;/ 4 = "Example D"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text errormsg&amp;gt;&lt;br/&gt;/ items = ("X")&lt;br/&gt;/ txcolor = red&lt;br/&gt;/ position = (50%, 75%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;I.e. only select a new item number if the response given in the previous instance of the trial was correct.&lt;br/&gt;</description><pubDate>Wed, 19 Jun 2019 12:14:03 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: repeat trial with certain response</title><link>https://forums.millisecond.com/Topic27309.aspx</link><description>&lt;div data-id="3634" class="if-quote-wrapper" unselectable="on" data-guid="1560968422985"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="3634" 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="3634" 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="3634" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 12/9/2009&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-3634"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;p&gt;The error message is informative. For starters set:&lt;/p&gt;&lt;p&gt;/ branch = [if (trial.a1.response &lt;span style="color: #ff0000;"&gt;&lt;strong&gt;==&lt;/strong&gt;&lt;/span&gt; 57) trial.a1]&lt;/p&gt;&lt;p&gt;The '=' is an assignment operator, while '==' is a comparison operator.&amp;nbsp; That should fix the error message and make the branch functional. However, if any of the stims (i.e. start, blank, square1) has more than one item, the repeated trial will display a different item than its first instance (unless you've taken precautions against this).&lt;/p&gt;&lt;p&gt;~Dave&lt;/p&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="3634"&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;Hi Dave, thanks so much for this answer. I was wondering about the last thing you said- how would we take precautions against the stim loading different items? I'd like to repeat an item if subjects get it wrong, but after showing an error message.</description><pubDate>Wed, 19 Jun 2019 11:21:11 GMT</pubDate><dc:creator>S F</dc:creator></item><item><title>RE: repeat trial with certain response</title><link>https://forums.millisecond.com/Topic3635.aspx</link><description>&lt;p&gt;It works!&lt;/p&gt;
&lt;p&gt;Thank you very very much!&lt;/p&gt;</description><pubDate>Wed, 09 Dec 2009 07:10:17 GMT</pubDate><dc:creator>Jerri</dc:creator></item><item><title>RE: repeat trial with certain response</title><link>https://forums.millisecond.com/Topic3634.aspx</link><description>&lt;p&gt;The error message is informative. For starters set:&lt;/p&gt;
&lt;p&gt;/ branch = [if (trial.a1.response &lt;span style="color: #ff0000;"&gt;&lt;b&gt;==&lt;/b&gt;&lt;/span&gt; 57) trial.a1]&lt;/p&gt;
&lt;p&gt;The '=' is an assignment operator, while '==' is a comparison operator.&amp;nbsp; That should fix the error message and make the branch functional. However, if any of the stims (i.e. start, blank, square1) has more than one item, the repeated trial will display a different item than its first instance (unless you've taken precautions against this).&lt;/p&gt;
&lt;p&gt;~Dave&lt;/p&gt;</description><pubDate>Wed, 09 Dec 2009 06:56:44 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: repeat trial with certain response</title><link>https://forums.millisecond.com/Topic3633.aspx</link><description>&lt;p&gt;Ok, well what i want to do is to give the subjects the opportunity to repeat the trial if they feel like they have not understood the text that is presented within the trial. so what i wish to happen is that if the subjects press one of the shift keys, those responses should be logged as a response in the data file. however, if they press the space bar, the trial should start again from the beginning.&lt;/p&gt;
&lt;p&gt;with the branch command i have built in, this does not work, inquisit tells me this: "&amp;nbsp;Expression 'trial.a1.response' is invalid. The expression attempts to set the value of read-only property."&lt;/p&gt;
&lt;p&gt;So what i am guessing is that the command for "when subject hits "57" " that i put in is wrong.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I hope that makes the problem clearer!&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;
</description><pubDate>Wed, 09 Dec 2009 06:46:00 GMT</pubDate><dc:creator>Jerri</dc:creator></item><item><title>RE: repeat trial with certain response</title><link>https://forums.millisecond.com/Topic3632.aspx</link><description>&lt;p&gt;Well, how do you come to the conclusion that it doesn't work? I think you'll have to share a more detailed overview of the procedure you're trying to implement.&lt;/p&gt;
&lt;p&gt;~Dave&lt;/p&gt;</description><pubDate>Wed, 09 Dec 2009 04:19:19 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>