﻿<?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  » I need script to automatically end after stimulus or a continue button appears after stimulus plays through</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 08 Apr 2026 09:05:10 GMT</lastBuildDate><ttl>20</ttl><item><title>I need script to automatically end after stimulus or a continue button appears after stimulus plays through</title><link>https://forums.millisecond.com/Topic25901.aspx</link><description>Hi,&lt;br/&gt;&lt;br/&gt;I want this script to automatically go to next script in batch at the end of the sound stimulus. Meanwhile I would like subjects to be able to quit at anytime during sound stimulus. I either want the script to automatically go to next script at end of sound or have a continue button appear only at the end of sound.&lt;br/&gt;&lt;br/&gt;&amp;lt;html meditate&amp;gt;&lt;br/&gt;/items = ("body scan during recording.html")&lt;br/&gt;/ size = (90%,85%)&lt;br/&gt;/ vposition = 40&lt;br/&gt;&amp;lt;/html&amp;gt;&lt;br/&gt;**************************************&lt;br/&gt;Response Buttons&lt;br/&gt;**************************************&lt;br/&gt;&amp;lt;text continue&amp;gt;&lt;br/&gt;/items = ("Continue")&lt;br/&gt;/ hposition = 84.5&lt;br/&gt;/ vposition = 91.5&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ txcolor = (white)&lt;br/&gt;/txbgcolor = (dodgerblue)&lt;br/&gt;/size = (30%, 15%)&lt;br/&gt;/ vjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text quit&amp;gt;&lt;br/&gt;/items = ("Quit")&lt;br/&gt;/ hposition = 15.5&lt;br/&gt;/ vposition = 91.5&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ txcolor = (white)&lt;br/&gt;/txbgcolor =(darkturquoise)&lt;br/&gt;/size = (30%, 15%)&lt;br/&gt;/vjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial Consent&amp;gt;&lt;br/&gt;/inputdevice = mouse&lt;br/&gt;/stimulusframes = [1 = meditate, continue, quit, hi,timer]&lt;br/&gt;/validresponse = (continue, quit)&lt;br/&gt;/monkeyresponse = ("continue")&lt;br/&gt;/ontrialend = [if (trial.Consent.response == "disagree") script.abort()]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;sound hi&amp;gt;&lt;br/&gt;/items= ("test.mp3")&lt;br/&gt;/ playthrough = false&lt;br/&gt;&amp;lt;/sound&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;clock timer&amp;gt;&lt;br/&gt;/ mode = timer&lt;br/&gt;/ resetrate = block&lt;br/&gt;/ erase = false&lt;br/&gt;/ txcolor = (black)&lt;br/&gt;/ txbgcolor = (white)&lt;br/&gt;/timeout=5000&lt;br/&gt;/ position = (50%,93%)&lt;br/&gt;/ format = "mm:ss"&lt;br/&gt;/ fontstyle = ("arial", 7%, false)&lt;br/&gt;&amp;lt;/clock&amp;gt;&lt;br/&gt;**************************************&lt;br/&gt;Consent Block&lt;br/&gt;**************************************&lt;br/&gt;&amp;lt;block Consent&amp;gt;&lt;br/&gt;/trials = [1 = Consent]&lt;br/&gt;</description><pubDate>Fri, 19 Oct 2018 12:49:02 GMT</pubDate><dc:creator>bkorsmo</dc:creator></item><item><title>RE: I need script to automatically end after stimulus or a continue button appears after stimulus plays through</title><link>https://forums.millisecond.com/Topic25902.aspx</link><description>&lt;div data-id="25901" class="if-quote-wrapper" unselectable="on" data-guid="1539977814643"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="25901" 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="25901" 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="25901" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;bkorsmo - Friday, October 19, 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-25901"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&lt;br/&gt;&lt;br/&gt;I want this script to automatically go to next script in batch at the end of the sound stimulus. Meanwhile I would like subjects to be able to quit at anytime during sound stimulus. I either want the script to automatically go to next script at end of sound or have a continue button appear only at the end of sound.&lt;br/&gt;&lt;br/&gt;&amp;lt;html meditate&amp;gt;&lt;br/&gt;/items = ("body scan during recording.html")&lt;br/&gt;/ size = (90%,85%)&lt;br/&gt;/ vposition = 40&lt;br/&gt;&amp;lt;/html&amp;gt;&lt;br/&gt;**************************************&lt;br/&gt;Response Buttons&lt;br/&gt;**************************************&lt;br/&gt;&amp;lt;text continue&amp;gt;&lt;br/&gt;/items = ("Continue")&lt;br/&gt;/ hposition = 84.5&lt;br/&gt;/ vposition = 91.5&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ txcolor = (white)&lt;br/&gt;/txbgcolor = (dodgerblue)&lt;br/&gt;/size = (30%, 15%)&lt;br/&gt;/ vjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text quit&amp;gt;&lt;br/&gt;/items = ("Quit")&lt;br/&gt;/ hposition = 15.5&lt;br/&gt;/ vposition = 91.5&lt;br/&gt;/ fontstyle = ("Arial", 5%, false, false, false, false, 5, 1)&lt;br/&gt;/ txcolor = (white)&lt;br/&gt;/txbgcolor =(darkturquoise)&lt;br/&gt;/size = (30%, 15%)&lt;br/&gt;/vjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial Consent&amp;gt;&lt;br/&gt;/inputdevice = mouse&lt;br/&gt;/stimulusframes = [1 = meditate, continue, quit, hi,timer]&lt;br/&gt;/validresponse = (continue, quit)&lt;br/&gt;/monkeyresponse = ("continue")&lt;br/&gt;/ontrialend = [if (trial.Consent.response == "disagree") script.abort()]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;sound hi&amp;gt;&lt;br/&gt;/items= ("test.mp3")&lt;br/&gt;/ playthrough = false&lt;br/&gt;&amp;lt;/sound&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;clock timer&amp;gt;&lt;br/&gt;/ mode = timer&lt;br/&gt;/ resetrate = block&lt;br/&gt;/ erase = false&lt;br/&gt;/ txcolor = (black)&lt;br/&gt;/ txbgcolor = (white)&lt;br/&gt;/timeout=5000&lt;br/&gt;/ position = (50%,93%)&lt;br/&gt;/ format = "mm:ss"&lt;br/&gt;/ fontstyle = ("arial", 7%, false)&lt;br/&gt;&amp;lt;/clock&amp;gt;&lt;br/&gt;**************************************&lt;br/&gt;Consent Block&lt;br/&gt;**************************************&lt;br/&gt;&amp;lt;block Consent&amp;gt;&lt;br/&gt;/trials = [1 = Consent]&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="25901"&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;#1: You need to use &amp;lt;video&amp;gt; -- not &amp;lt;sound&amp;gt; -- with MP3 files, otherwise your script won't work across platforms. Use &amp;lt;sound&amp;gt; exclusively with WAV files, nothing else.&lt;br/&gt;&lt;br/&gt;#2: If you want the script to automatically end after the audio is done playing, set the /playthrough attribute to true, set the &amp;lt;trial&amp;gt; to accept no response and give it a short /timeout.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial Consent&amp;gt;&lt;br/&gt;/stimulusframes = [1 = meditate, hi, timer]&lt;br/&gt;/ validresponse = (0)&lt;br/&gt;/ timeout = 1000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;video hi&amp;gt;&lt;br/&gt;/items= ("test.mp3")&lt;br/&gt;/ playthrough = true&lt;br/&gt;&amp;lt;/video&amp;gt;&lt;br/&gt;&lt;br/&gt;#3: If you want response options only to be displayed after the sound is done playing, use the trial's /stimulustimes to display the response options only at that time. I.e. if your audio is 30 seconds long, do&lt;br/&gt;&lt;br/&gt;&amp;lt;trial Consent&amp;gt;&lt;br/&gt;/inputdevice = mouse&lt;br/&gt;/stimulustimes = [0 = meditate, hi,timer; 30000= continue, quit]&lt;br/&gt;/validresponse = (continue, quit)&lt;br/&gt;/monkeyresponse = ("continue")&lt;br/&gt;/ontrialend = [if (trial.Consent.response == "disagree") script.abort()]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;#4: If you want subjects to *both* terminate the script at any time during the sound and allow continuation only after playthrough, display only the continue button at the end of the sound per /stimulustimes, but allow for the quit button from the start&lt;br/&gt;&lt;br/&gt;&amp;lt;trial Consent&amp;gt;&lt;br/&gt;/inputdevice = mouse&lt;br/&gt;/stimulustimes = [0 = meditate, hi,timer, quit; 30000= continue]&lt;br/&gt;/validresponse = (continue, quit)&lt;br/&gt;/ beginsresponsetime = 0&lt;br/&gt;/monkeyresponse = ("continue")&lt;br/&gt;/ontrialend = [if (trial.Consent.response == "disagree") script.abort()]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;video hi&amp;gt;&lt;br/&gt;/items= ("test.mp3")&lt;br/&gt;/ playthrough = false&lt;br/&gt;&amp;lt;/video&amp;gt;&lt;br/&gt;&lt;br/&gt;#5: If you want automatic continuation after playthrough of the sound, but only want to provide a quit option, set either the &amp;lt;trial&amp;gt;'s or&amp;nbsp; the &amp;lt;block&amp;gt;'s&amp;nbsp; /timeout to the duration of the audio and only allow for a quit response during the trial:&lt;br/&gt;&lt;br/&gt;&amp;lt;trial Consent&amp;gt;&lt;br/&gt;/inputdevice = mouse&lt;br/&gt;/stimulustimes = [0 = meditate, hi,timer, quit]&lt;br/&gt;/validresponse = (quit)&lt;br/&gt;/ beginsresponsetime = 0&lt;br/&gt;/ timeout = 30000&lt;br/&gt;/ontrialend = [if (trial.Consent.response == "disagree") script.abort()]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;video hi&amp;gt;&lt;br/&gt;/items= ("test.mp3")&lt;br/&gt;/ playthrough = false&lt;br/&gt;&amp;lt;/video&amp;gt;&lt;br/&gt;</description><pubDate>Fri, 19 Oct 2018 12:49:02 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>