﻿<?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 6  » Record response within a time window</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Mon, 08 Jun 2026 16:27:59 GMT</lastBuildDate><ttl>20</ttl><item><title>Record response within a time window</title><link>https://forums.millisecond.com/Topic32283.aspx</link><description>Hi,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I am using Inquisit 6 lab to code for a priming task. In a given trial, a fixation cross will be presented for 500ms. Then a prime word will be presented for 200ms, followed by a blank screen of 100ms. Then a target word will show up for 500ms. Participants' task is to categorize the target word as either positive or negative by pressing one of the two keys "a" or "l". The inter-trial interval will be jittered between 1500ms to 3500ms, during which a blank screen is presented.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;While the target word is only presented for 500ms, we want to continue to record their response as long as the response is made within 1000ms from the presentation of the target word. I wonder if the following way to code a single trial would work? Thank you for your suggestions!&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial POSOBJ_posBG_1&amp;gt;  &lt;br/&gt;/ validresponse = ("a", "l")&lt;br/&gt;/ correctresponse = ("l")&lt;br/&gt;/ stimulustimes = [0 = fixation; 500=noreplace (POSOBJ); &lt;br/&gt;700 = blanks; &lt;br/&gt;800 = goodtarget;&lt;br/&gt;1300=blanks]&lt;br/&gt;/ trialdata = [POSOBJ goodtarget]&lt;br/&gt;/ responsetrial = ("a", lefterr)&lt;br/&gt;/ responsetrial = ("l", rightcor)&lt;br/&gt;/posttrialpause = noreplace(1000,1500,2000,2500,3000)&lt;br/&gt;/ timeout=1800&lt;br/&gt;&amp;lt;/trial&amp;gt;</description><pubDate>Thu, 07 Oct 2021 19:34:35 GMT</pubDate><dc:creator>Libra</dc:creator></item><item><title>RE: Record response within a time window</title><link>https://forums.millisecond.com/Topic32294.aspx</link><description>&lt;blockquote data-id="32293" class="if-quote-wrapper" unselectable="on" data-guid="1633634452618" id="if_insertedNode_1633634451559" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="32293" 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="32293" 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="32293" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Libra - 10/7/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-32293"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi Dave,&amp;nbsp;&lt;br/&gt;I wonder if it is possible to achieve a more complicated jittering of the inter-trial interval (ITI). We want to use pseudo-exponential jittering. Specifically, we hope that the ITI will be set so that&amp;nbsp;50% of trials have a 4s ITI, 25% have a 5s ITI, 12% have a 6s ITI, 7% with a 7s ITI, and 6% with an 8s ITI. Is there any simple code to specify the "posttrialpause" so that we could achieve this? Thank you!&lt;br/&gt;Minghui&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="32293"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;You can put the ITI values in the proportions you want into a &amp;lt;list&amp;gt; and sample from that list for the /posttrialpause. Suppose you have 100 trials, then this amounts to&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ iti = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list itis&amp;gt;&lt;br/&gt;/ items = (4000, 5000, 6000, 7000, 8000)&lt;br/&gt;/ itemprobabilities = (.50, .25, .12, .07, .06)&lt;br/&gt;/ poolsize = 100&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block exampleblock&amp;gt;&lt;br/&gt;/ trials = [1-100 = exampletrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial exampletrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.iti = list.itis.nextvalue;&lt;br/&gt;]&lt;br/&gt;/ timeout = 0&lt;br/&gt;/ posttrialpause = values.iti&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;</description><pubDate>Thu, 07 Oct 2021 19:34:35 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Record response within a time window</title><link>https://forums.millisecond.com/Topic32293.aspx</link><description>Hi Dave,&amp;nbsp;&lt;br/&gt;I wonder if it is possible to achieve a more complicated jittering of the inter-trial interval (ITI). We want to use pseudo-exponential jittering. Specifically, we hope that the ITI will be set so that&amp;nbsp;50% of trials have a 4s ITI, 25% have a 5s ITI, 12% have a 6s ITI, 7% with a 7s ITI, and 6% with an 8s ITI. Is there any simple code to specify the "posttrialpause" so that we could achieve this? Thank you!&lt;br/&gt;Minghui&lt;br/&gt;</description><pubDate>Thu, 07 Oct 2021 18:39:37 GMT</pubDate><dc:creator>Libra</dc:creator></item><item><title>RE: Record response within a time window</title><link>https://forums.millisecond.com/Topic32284.aspx</link><description>&lt;blockquote data-id="32283" class="if-quote-wrapper" unselectable="on" data-guid="1633542511426" id="if_insertedNode_1633542510535" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="32283" 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="32283" 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="32283" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Libra - 10/6/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-32283"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I am using Inquisit 6 lab to code for a priming task. In a given trial, a fixation cross will be presented for 500ms. Then a prime word will be presented for 200ms, followed by a blank screen of 100ms. Then a target word will show up for 500ms. Participants' task is to categorize the target word as either positive or negative by pressing one of the two keys "a" or "l". The inter-trial interval will be jittered between 1500ms to 3500ms, during which a blank screen is presented.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;While the target word is only presented for 500ms, we want to continue to record their response as long as the response is made within 1000ms from the presentation of the target word. I wonder if the following way to code a single trial would work? Thank you for your suggestions!&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial POSOBJ_posBG_1&amp;gt;  &lt;br/&gt;/ validresponse = ("a", "l")&lt;br/&gt;/ correctresponse = ("l")&lt;br/&gt;/ stimulustimes = [0 = fixation; 500=noreplace (POSOBJ); &lt;br/&gt;700 = blanks; &lt;br/&gt;800 = goodtarget;&lt;br/&gt;1300=blanks]&lt;br/&gt;/ trialdata = [POSOBJ goodtarget]&lt;br/&gt;/ responsetrial = ("a", lefterr)&lt;br/&gt;/ responsetrial = ("l", rightcor)&lt;br/&gt;/posttrialpause = noreplace(1000,1500,2000,2500,3000)&lt;br/&gt;/ timeout=1800&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="32283"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;You'll want a few additions:&lt;br/&gt;(1) /beginresponsetime set to 800 to have the trial accept responses starting with the onset of the target at 800ms into the trial.&lt;br/&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/beginresponsetime.htm"&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/beginresponsetime.htm"&gt;https://www.millisecond.com/support/docs/v6/html/language/attributes/beginresponsetime.htm&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/responsetiming.htm"&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/responsetiming.htm"&gt;https://www.millisecond.com/support/docs/v6/html/language/responsetiming.htm&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;(2) /responseinterrupt set to frames in order to have the "blanks" stimulus at 1300ms still show up even if response occurs before the onset of said stimulus.&lt;br/&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/responseinterrupt.htm"&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/responseinterrupt.htm"&gt;https://www.millisecond.com/support/docs/v6/html/language/attributes/responseinterrupt.htm&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;trial POSOBJ_posBG_1&amp;gt;&lt;br/&gt;/ validresponse = ("a", "l")&lt;br/&gt;/ correctresponse = ("l")&lt;br/&gt;/ stimulustimes = [0 = fixation; 500=noreplace (POSOBJ);&lt;br/&gt;700 = blanks;&lt;br/&gt;800 = goodtarget;&lt;br/&gt;1300=blanks]&lt;br/&gt;/ trialdata = [POSOBJ goodtarget]&lt;br/&gt;/ responsetrial = ("a", lefterr)&lt;br/&gt;/ responsetrial = ("l", rightcor)&lt;br/&gt;/posttrialpause = noreplace(1000,1500,2000,2500,3000)&lt;br/&gt;/ timeout=1800&lt;br/&gt;/ beginresponsetime = 800 // start accepting responses with onset of target stimulus at 800ms&lt;br/&gt;/ responseinterrupt = frames // do not terminate stimulus presentation sequence immediately upon detecting response, but complete presentation of all frames&lt;br/&gt;&amp;lt;/trial&amp;gt;[/code]&lt;br/&gt;</description><pubDate>Wed, 06 Oct 2021 18:05:40 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Record response within a time window</title><link>https://forums.millisecond.com/Topic32285.aspx</link><description>Thank you, Dave!&amp;nbsp;&lt;br/&gt;Best,&amp;nbsp;&lt;br/&gt;Minghui&lt;br/&gt;</description><pubDate>Wed, 06 Oct 2021 18:00:32 GMT</pubDate><dc:creator>Libra</dc:creator></item></channel></rss>