﻿<?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  » run stimulus sequence from external file</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 23 Sep 2026 06:23:37 GMT</lastBuildDate><ttl>20</ttl><item><title>run stimulus sequence from external file</title><link>https://forums.millisecond.com/Topic20057.aspx</link><description>Hi all, I was wondering whether it is possible in Inquisit 4 control the stimulus sequence that should be shown via an external file (e.g., .txt, .csv)?&lt;br/&gt;</description><pubDate>Mon, 07 Nov 2016 09:13:13 GMT</pubDate><dc:creator>AnjaK</dc:creator></item><item><title>RE: run stimulus sequence from external file</title><link>https://forums.millisecond.com/Topic20059.aspx</link><description>&lt;div data-id="20057" class="if-quote-wrapper" unselectable="on" data-guid="1478538125824"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20057" 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="20057" 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="20057" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;AnjaK - Monday, November 07, 2016&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20057"&gt;&lt;div class="if-quote-message-margin"&gt;Hi all, I was wondering whether it is possible in Inquisit 4 control the stimulus sequence that should be shown via an external file (e.g., .txt, .csv)?&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20057"&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 use &amp;lt;include&amp;gt; to reference an external text file in an Inquisit script. The contents of that file need to be valid Inquisit syntax. Suppose you have four items A to D, and want to show them in two different sequential orders between-subjects. Let's say those orders are A-B-C-D and the reverse D-C-B-A for the sake of example.&lt;br/&gt;&lt;br/&gt;Your "main" script would look like:&lt;br/&gt;----&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-4 = mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ trialduration = 1000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("A", "B", "C", "D")&lt;br/&gt;&lt;strong&gt;/ select = list.myorder.nextvalue&lt;/strong&gt;&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;//odd group numbers receive 1st order&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;&lt;strong&gt;/ precondition = [mod(script.groupid, 2) == 1]&lt;br/&gt;/ file = "order1.txt"&lt;/strong&gt;&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;//even group numbers receive 2nd order&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;&lt;strong&gt;/ precondition = [mod(script.groupid, 2) == 0]&lt;br/&gt;/ file = "order2.txt"&lt;/strong&gt;&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;---&lt;br/&gt;&lt;br/&gt;order1.txt would contain the following:&lt;br/&gt;----&lt;br/&gt;//order 1&lt;br/&gt;&amp;lt;list myorder&amp;gt;&lt;br/&gt;/ items = (1,2,3,4)&lt;br/&gt;/ selectionmode = sequence&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;----&lt;br/&gt;&lt;br/&gt;order2.txt would contain the 2nd (reverse) order:&lt;br/&gt;----&lt;br/&gt;//order 2&lt;br/&gt;&amp;lt;list myorder&amp;gt;&lt;br/&gt;/ items = (4,3,2,1)&lt;br/&gt;/ selectionmode = sequence&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;----&lt;br/&gt;</description><pubDate>Mon, 07 Nov 2016 09:13:13 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>