﻿<?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 4  » how to stop a trial conditional on participants' response</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 16 Sep 2026 16:42:29 GMT</lastBuildDate><ttl>20</ttl><item><title>how to stop a trial conditional on participants' response</title><link>https://forums.millisecond.com/Topic20597.aspx</link><description>Hi all,&lt;br/&gt;&lt;br/&gt;I am trying to create a trial where participants enter codes - followed by pressing 'next' for each code. When they want to stop entering codes, they should press 'stop'.&lt;br/&gt;&lt;br/&gt;This means I need to have page that shows them a place where they can enter the codes, and below a button that says 'next' and a button that says 'stop' &lt;br/&gt;The script with only a button for next, works fine. But I cannot figure out how to create two buttons and how to create a command that stops the trial when they press 'stop'.&lt;br/&gt;&lt;br/&gt;Here's what I have so far:&lt;br/&gt;&lt;br/&gt;&amp;lt;openended codes&amp;gt;&lt;br/&gt;/stimulusframes=[1=codes,input]&lt;br/&gt;/position = (50%, 50%)&lt;br/&gt;/linelength = 40&lt;br/&gt;/numlines = 1&lt;br/&gt;/skip = [values.time &amp;gt; 600000]&lt;br/&gt;/ontrialend = [values.time = values.time + openended.codes.latency]&lt;br/&gt;/ontrialend = [values.input = values.input + 1]&lt;br/&gt;/buttonlabel = "next"&lt;br/&gt;&amp;lt;/openended&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be highly appreciated!&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 30 Jan 2017 08:35:29 GMT</pubDate><dc:creator>jell8ie</dc:creator></item><item><title>RE: how to stop a trial conditional on participants' response</title><link>https://forums.millisecond.com/Topic20601.aspx</link><description>&lt;div data-id="20599" class="if-quote-wrapper" unselectable="on" data-guid="1485794019933"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20599" 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="20599" 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="20599" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jell8ie - Monday, January 30, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20599"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="20598" class="if-quote-wrapper" unselectable="on" data-guid="1485794019933"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20598" 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="20598" 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="20598" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, January 30, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20598"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="20597" class="if-quote-wrapper" unselectable="on" data-guid="1485794019933"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20597" 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="20597" 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="20597" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jell8ie - Monday, January 30, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20597"&gt;&lt;div class="if-quote-message-margin"&gt;Hi all,&lt;br/&gt;&lt;br/&gt;I am trying to create a trial where participants enter codes - followed by pressing 'next' for each code. When they want to stop entering codes, they should press 'stop'.&lt;br/&gt;&lt;br/&gt;This means I need to have page that shows them a place where they can enter the codes, and below a button that says 'next' and a button that says 'stop' &lt;br/&gt;The script with only a button for next, works fine. But I cannot figure out how to create two buttons and how to create a command that stops the trial when they press 'stop'.&lt;br/&gt;&lt;br/&gt;Here's what I have so far:&lt;br/&gt;&lt;br/&gt;&amp;lt;openended codes&amp;gt;&lt;br/&gt;/stimulusframes=[1=codes,input]&lt;br/&gt;/position = (50%, 50%)&lt;br/&gt;/linelength = 40&lt;br/&gt;/numlines = 1&lt;br/&gt;/skip = [values.time &amp;gt; 600000]&lt;br/&gt;/ontrialend = [values.time = values.time + openended.codes.latency]&lt;br/&gt;/ontrialend = [values.input = values.input + 1]&lt;br/&gt;/buttonlabel = "next"&lt;br/&gt;&amp;lt;/openended&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be highly appreciated!&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20597"&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 cannot add and additional button to an &amp;lt;openended&amp;gt; element. What you can do is instruct the participant to e.g. simply type "stop" into the &amp;lt;openended&amp;gt;'s text box and then /stop the block based on that response.&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1 = myopenended]&lt;br/&gt;/ stop = [openended.myopenended.response == "stop"]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;openended myopenended&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ branch = [openended.myopenended]&lt;br/&gt;&amp;lt;/openended&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Enter something. To quit, type ~"stop~" into the textbox")&lt;br/&gt;/ position = (50%, 40%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20598"&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;thanks a lot! good to know its not possible. I previously used to instruct them to type 'stop' - but I work with kids and this turns out too difficult when they have to work independently. Any ideas on other options? &lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20599"&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 can run a separate &amp;lt;trial&amp;gt; after each &amp;lt;openended&amp;gt;. That trial could display two response options (clickable &amp;lt;text&amp;gt; elements): One for "next" which would continue the script as usual, one for "stop" which would terminate the &amp;lt;block&amp;gt;. That's about the only alternative I can think of.&lt;br/&gt;</description><pubDate>Mon, 30 Jan 2017 08:35:29 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: how to stop a trial conditional on participants' response</title><link>https://forums.millisecond.com/Topic20599.aspx</link><description>&lt;div data-id="20598" class="if-quote-wrapper" unselectable="on" data-guid="1485790152901"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20598" 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="20598" 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="20598" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, January 30, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20598"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="20597" class="if-quote-wrapper" unselectable="on" data-guid="1485790152901"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20597" 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="20597" 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="20597" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jell8ie - Monday, January 30, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20597"&gt;&lt;div class="if-quote-message-margin"&gt;Hi all,&lt;br/&gt;&lt;br/&gt;I am trying to create a trial where participants enter codes - followed by pressing 'next' for each code. When they want to stop entering codes, they should press 'stop'.&lt;br/&gt;&lt;br/&gt;This means I need to have page that shows them a place where they can enter the codes, and below a button that says 'next' and a button that says 'stop' &lt;br/&gt;The script with only a button for next, works fine. But I cannot figure out how to create two buttons and how to create a command that stops the trial when they press 'stop'.&lt;br/&gt;&lt;br/&gt;Here's what I have so far:&lt;br/&gt;&lt;br/&gt;&amp;lt;openended codes&amp;gt;&lt;br/&gt;/stimulusframes=[1=codes,input]&lt;br/&gt;/position = (50%, 50%)&lt;br/&gt;/linelength = 40&lt;br/&gt;/numlines = 1&lt;br/&gt;/skip = [values.time &amp;gt; 600000]&lt;br/&gt;/ontrialend = [values.time = values.time + openended.codes.latency]&lt;br/&gt;/ontrialend = [values.input = values.input + 1]&lt;br/&gt;/buttonlabel = "next"&lt;br/&gt;&amp;lt;/openended&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be highly appreciated!&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20597"&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 cannot add and additional button to an &amp;lt;openended&amp;gt; element. What you can do is instruct the participant to e.g. simply type "stop" into the &amp;lt;openended&amp;gt;'s text box and then /stop the block based on that response.&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1 = myopenended]&lt;br/&gt;/ stop = [openended.myopenended.response == "stop"]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;openended myopenended&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ branch = [openended.myopenended]&lt;br/&gt;&amp;lt;/openended&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Enter something. To quit, type ~"stop~" into the textbox")&lt;br/&gt;/ position = (50%, 40%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20598"&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;thanks a lot! good to know its not possible. I previously used to instruct them to type 'stop' - but I work with kids and this turns out too difficult when they have to work independently. Any ideas on other options? &lt;br/&gt;</description><pubDate>Mon, 30 Jan 2017 07:31:03 GMT</pubDate><dc:creator>jell8ie</dc:creator></item><item><title>RE: how to stop a trial conditional on participants' response</title><link>https://forums.millisecond.com/Topic20598.aspx</link><description>&lt;div data-id="20597" class="if-quote-wrapper" unselectable="on" data-guid="1485788342564"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20597" 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="20597" 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="20597" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jell8ie - Monday, January 30, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20597"&gt;&lt;div class="if-quote-message-margin"&gt;Hi all,&lt;br/&gt;&lt;br/&gt;I am trying to create a trial where participants enter codes - followed by pressing 'next' for each code. When they want to stop entering codes, they should press 'stop'.&lt;br/&gt;&lt;br/&gt;This means I need to have page that shows them a place where they can enter the codes, and below a button that says 'next' and a button that says 'stop' &lt;br/&gt;The script with only a button for next, works fine. But I cannot figure out how to create two buttons and how to create a command that stops the trial when they press 'stop'.&lt;br/&gt;&lt;br/&gt;Here's what I have so far:&lt;br/&gt;&lt;br/&gt;&amp;lt;openended codes&amp;gt;&lt;br/&gt;/stimulusframes=[1=codes,input]&lt;br/&gt;/position = (50%, 50%)&lt;br/&gt;/linelength = 40&lt;br/&gt;/numlines = 1&lt;br/&gt;/skip = [values.time &amp;gt; 600000]&lt;br/&gt;/ontrialend = [values.time = values.time + openended.codes.latency]&lt;br/&gt;/ontrialend = [values.input = values.input + 1]&lt;br/&gt;/buttonlabel = "next"&lt;br/&gt;&amp;lt;/openended&amp;gt;&lt;br/&gt;&lt;br/&gt;Any help would be highly appreciated!&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20597"&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 cannot add and additional button to an &amp;lt;openended&amp;gt; element. What you can do is instruct the participant to e.g. simply type "stop" into the &amp;lt;openended&amp;gt;'s text box and then /stop the block based on that response.&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1 = myopenended]&lt;br/&gt;/ stop = [openended.myopenended.response == "stop"]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;openended myopenended&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ branch = [openended.myopenended]&lt;br/&gt;&amp;lt;/openended&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Enter something. To quit, type ~"stop~" into the textbox")&lt;br/&gt;/ position = (50%, 40%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 30 Jan 2017 07:00:20 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>