﻿<?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  » Why doesn't this script loop?</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 09 Sep 2026 14:01:53 GMT</lastBuildDate><ttl>20</ttl><item><title>Why doesn't this script loop?</title><link>https://forums.millisecond.com/Topic22902.aspx</link><description>Hi&lt;br/&gt;&lt;br/&gt;I have a very basic query. My script doesn't loop through items. Below is a very simple Minimal Worked Example. It should loop through the sentences, but only displays 1. Thanks&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item sentences&amp;gt;&lt;br/&gt;/ 1 = "A dog is a canine"&lt;br/&gt;/ 2 = "A cat is a feline"&lt;br/&gt;/ 3 = "A bear is ursine"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item questions&amp;gt;&lt;br/&gt;/ 1 = ""&lt;br/&gt;/ 2 = "Did this sentence mention a cat?"&lt;br/&gt;/ 3 = ""&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text sentence&amp;gt;&lt;br/&gt;/ items  = sentences&lt;br/&gt;/ select = text.question.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text question&amp;gt;&lt;br/&gt;/ items = questions&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trial&amp;gt;&lt;br/&gt;/ stimulusframes = [1-3 = noreplace(sentence)]&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block block&amp;gt;&lt;br/&gt;/ trials = [1 = trial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt expt&amp;gt;&lt;br/&gt;/ blocks = [1 = block]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 20 Nov 2017 10:29:13 GMT</pubDate><dc:creator>Nick Riches</dc:creator></item><item><title>RE: Why doesn't this script loop?</title><link>https://forums.millisecond.com/Topic22906.aspx</link><description>&lt;div data-id="22905" class="if-quote-wrapper" unselectable="on" data-guid="1511202495676"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22905" 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="22905" 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="22905" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, November 20, 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-22905"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22904" class="if-quote-wrapper" unselectable="on" data-guid="1511202495676"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22904" 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="22904" 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="22904" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Monday, November 20, 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-22904"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22903" class="if-quote-wrapper" unselectable="on" data-guid="1511202495676"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22903" 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="22903" 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="22903" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, November 20, 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-22903"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22902" class="if-quote-wrapper" unselectable="on" data-guid="1511202495676"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22902" 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="22902" 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="22902" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Monday, November 20, 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-22902"&gt;&lt;div class="if-quote-message-margin"&gt;Hi&lt;br/&gt;&lt;br/&gt;I have a very basic query. My script doesn't loop through items. Below is a very simple Minimal Worked Example. It should loop through the sentences, but only displays 1. Thanks&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item sentences&amp;gt;&lt;br/&gt;/ 1 = "A dog is a canine"&lt;br/&gt;/ 2 = "A cat is a feline"&lt;br/&gt;/ 3 = "A bear is ursine"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item questions&amp;gt;&lt;br/&gt;/ 1 = ""&lt;br/&gt;/ 2 = "Did this sentence mention a cat?"&lt;br/&gt;/ 3 = ""&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text sentence&amp;gt;&lt;br/&gt;/ items  = sentences&lt;br/&gt;/ select = text.question.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text question&amp;gt;&lt;br/&gt;/ items = questions&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trial&amp;gt;&lt;br/&gt;/ stimulusframes = [1-3 = noreplace(sentence)]&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block block&amp;gt;&lt;br/&gt;/ trials = [1 = trial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt expt&amp;gt;&lt;br/&gt;/ blocks = [1 = block]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22902"&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;&amp;lt;trial trial&amp;gt;&lt;br/&gt;&lt;strong&gt;/ stimulusframes = [1-3 = noreplace(sentence)]&lt;/strong&gt;&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;is not supposed to "loop" through sentences. A given stimulus object like &amp;lt;text sentence&amp;gt; will select one and only one item per trial, displaying the element repeatedly during the trial will not lead to a new selection. If you wish to display three different items during a trial, you need three different stimulus objects -- e.g. &amp;lt;text sentence_a&amp;gt; to &amp;lt;text sentence_c&amp;gt; -- and have your trial display all three.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22903"&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. I'm afraid I don't understand. This is identical to one of the walk-through examples: the IAT script (snippets shown below). A series of items are defined and these are plugged into the text object. Then a trial object is created, in which the property 'items' references the text object. This successfully loops through the items. As far as I can see, my example has exactly the same structure as this, but it doesn't loop. There must be something wrong which causes it not to loop.&lt;br/&gt;&lt;pre&gt;&amp;lt;text pleasant&amp;gt;&lt;br/&gt;/ items = pleasant&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;pre&gt;&amp;lt;item pleasant&amp;gt;&lt;br/&gt;/ 1 = "&amp;nbsp;&amp;nbsp;  HONOR&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 2 = "&amp;nbsp;&amp;nbsp;  LUCKY&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 3 = "&amp;nbsp;&amp;nbsp; DIAMOND&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 4 = "&amp;nbsp;&amp;nbsp;  LOYAL&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 5 = "&amp;nbsp;&amp;nbsp; FREEDOM&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 6 = "&amp;nbsp;&amp;nbsp; RAINBOW&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 7 = "&amp;nbsp;&amp;nbsp;&amp;nbsp;LOVE&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 8 = "&amp;nbsp;&amp;nbsp;  HONEST&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 9 = "&amp;nbsp;&amp;nbsp;  PEACE&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/10 = "&amp;nbsp;&amp;nbsp;  HEAVEN&amp;nbsp;&amp;nbsp; "&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;(see &lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingstimuli.htm)"&gt;&lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingstimuli.htm)"&gt;http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingstimuli.htm)&lt;/a&gt;&lt;/a&gt;&lt;/pre&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre&gt;&amp;lt;trial pleasant&amp;gt; &lt;br/&gt;/ stimulusframes = [1=pleasant]&lt;br/&gt;/ validresponse = ("a", "5")&lt;br/&gt;/ correctresponse = ("5")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;(see &lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingtrials.htm)"&gt;&lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingtrials.htm)"&gt;http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingtrials.htm)&lt;/a&gt;&lt;/a&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22904"&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;No, &lt;br/&gt;&lt;br/&gt;&lt;pre&gt;&amp;lt;trial pleasant&amp;gt; &lt;br/&gt;/ stimulusframes = [1=pleasant]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;is supposed to display the stimulus "pleasant" -- a single item will be shown per trial.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trial&amp;gt;&lt;br/&gt;&lt;strong&gt;/ stimulusframes = [&lt;/strong&gt;1-3 = noreplace(sentence)&lt;strong&gt;]&lt;/strong&gt;&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;But you seem to expect the above to display "sentence" three times, each time showing a different item. &lt;br/&gt;That is not the case, as I explained above.&lt;br/&gt;&lt;br/&gt;If you were to run &amp;lt;trial trial&amp;gt; three times in a row, you would get three different items -- one per instance of the trial.&lt;br/&gt;&lt;/pre&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22905"&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;Okay. I see now. The series needs to be specified for the block object, not the trial object. The following code works...&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item sentences&amp;gt;&lt;br/&gt;/ 1 = "A dog is a canine"&lt;br/&gt;/ 2 = "A cat is a feline"&lt;br/&gt;/ 3 = "A bear is ursine"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item questions&amp;gt;&lt;br/&gt;/ 1 = ""&lt;br/&gt;/ 2 = "Did this sentence mention a cat?" &lt;br/&gt;/ 3 = ""&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text sentence&amp;gt;&lt;br/&gt;/ items  = sentences&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text question&amp;gt;&lt;br/&gt;/ items = questions&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = sentence]&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block block&amp;gt;&lt;br/&gt;/ trials = [1-3 = trial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 20 Nov 2017 10:29:13 GMT</pubDate><dc:creator>Nick Riches</dc:creator></item><item><title>RE: Why doesn't this script loop?</title><link>https://forums.millisecond.com/Topic22905.aspx</link><description>&lt;div data-id="22904" class="if-quote-wrapper" unselectable="on" data-guid="1511199819519"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22904" 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="22904" 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="22904" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Monday, November 20, 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-22904"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22903" class="if-quote-wrapper" unselectable="on" data-guid="1511199819519"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22903" 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="22903" 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="22903" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, November 20, 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-22903"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22902" class="if-quote-wrapper" unselectable="on" data-guid="1511199819519"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22902" 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="22902" 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="22902" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Monday, November 20, 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-22902"&gt;&lt;div class="if-quote-message-margin"&gt;Hi&lt;br/&gt;&lt;br/&gt;I have a very basic query. My script doesn't loop through items. Below is a very simple Minimal Worked Example. It should loop through the sentences, but only displays 1. Thanks&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item sentences&amp;gt;&lt;br/&gt;/ 1 = "A dog is a canine"&lt;br/&gt;/ 2 = "A cat is a feline"&lt;br/&gt;/ 3 = "A bear is ursine"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item questions&amp;gt;&lt;br/&gt;/ 1 = ""&lt;br/&gt;/ 2 = "Did this sentence mention a cat?"&lt;br/&gt;/ 3 = ""&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text sentence&amp;gt;&lt;br/&gt;/ items  = sentences&lt;br/&gt;/ select = text.question.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text question&amp;gt;&lt;br/&gt;/ items = questions&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trial&amp;gt;&lt;br/&gt;/ stimulusframes = [1-3 = noreplace(sentence)]&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block block&amp;gt;&lt;br/&gt;/ trials = [1 = trial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt expt&amp;gt;&lt;br/&gt;/ blocks = [1 = block]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22902"&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;&amp;lt;trial trial&amp;gt;&lt;br/&gt;&lt;strong&gt;/ stimulusframes = [1-3 = noreplace(sentence)]&lt;/strong&gt;&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;is not supposed to "loop" through sentences. A given stimulus object like &amp;lt;text sentence&amp;gt; will select one and only one item per trial, displaying the element repeatedly during the trial will not lead to a new selection. If you wish to display three different items during a trial, you need three different stimulus objects -- e.g. &amp;lt;text sentence_a&amp;gt; to &amp;lt;text sentence_c&amp;gt; -- and have your trial display all three.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22903"&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. I'm afraid I don't understand. This is identical to one of the walk-through examples: the IAT script (snippets shown below). A series of items are defined and these are plugged into the text object. Then a trial object is created, in which the property 'items' references the text object. This successfully loops through the items. As far as I can see, my example has exactly the same structure as this, but it doesn't loop. There must be something wrong which causes it not to loop.&lt;br/&gt;&lt;pre&gt;&amp;lt;text pleasant&amp;gt;&lt;br/&gt;/ items = pleasant&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;pre&gt;&amp;lt;item pleasant&amp;gt;&lt;br/&gt;/ 1 = "&amp;nbsp;&amp;nbsp;  HONOR&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 2 = "&amp;nbsp;&amp;nbsp;  LUCKY&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 3 = "&amp;nbsp;&amp;nbsp; DIAMOND&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 4 = "&amp;nbsp;&amp;nbsp;  LOYAL&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 5 = "&amp;nbsp;&amp;nbsp; FREEDOM&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 6 = "&amp;nbsp;&amp;nbsp; RAINBOW&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 7 = "&amp;nbsp;&amp;nbsp;&amp;nbsp;LOVE&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 8 = "&amp;nbsp;&amp;nbsp;  HONEST&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 9 = "&amp;nbsp;&amp;nbsp;  PEACE&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/10 = "&amp;nbsp;&amp;nbsp;  HEAVEN&amp;nbsp;&amp;nbsp; "&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;(see &lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingstimuli.htm)"&gt;&lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingstimuli.htm)"&gt;http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingstimuli.htm)&lt;/a&gt;&lt;/a&gt;&lt;/pre&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre&gt;&amp;lt;trial pleasant&amp;gt; &lt;br/&gt;/ stimulusframes = [1=pleasant]&lt;br/&gt;/ validresponse = ("a", "5")&lt;br/&gt;/ correctresponse = ("5")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;(see &lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingtrials.htm)"&gt;&lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingtrials.htm)"&gt;http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingtrials.htm)&lt;/a&gt;&lt;/a&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22904"&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;No, &lt;br/&gt;&lt;br/&gt;&lt;pre&gt;&amp;lt;trial pleasant&amp;gt; &lt;br/&gt;/ stimulusframes = [1=pleasant]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;is supposed to display the stimulus "pleasant" -- a single item will be shown per trial.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trial&amp;gt;&lt;br/&gt;&lt;strong&gt;/ stimulusframes = [&lt;/strong&gt;1-3 = noreplace(sentence)&lt;strong&gt;]&lt;/strong&gt;&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;But you seem to expect the above to display "sentence" three times, each time showing a different item. &lt;br/&gt;That is not the case, as I explained above.&lt;br/&gt;&lt;br/&gt;If you were to run &amp;lt;trial trial&amp;gt; three times in a row, you would get three different items -- one per instance of the trial.&lt;br/&gt;&lt;/pre&gt;</description><pubDate>Mon, 20 Nov 2017 09:47:46 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Why doesn't this script loop?</title><link>https://forums.millisecond.com/Topic22904.aspx</link><description>&lt;div data-id="22903" class="if-quote-wrapper" unselectable="on" data-guid="1511197827698"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22903" 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="22903" 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="22903" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Monday, November 20, 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-22903"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="22902" class="if-quote-wrapper" unselectable="on" data-guid="1511197827698"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22902" 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="22902" 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="22902" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Monday, November 20, 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-22902"&gt;&lt;div class="if-quote-message-margin"&gt;Hi&lt;br/&gt;&lt;br/&gt;I have a very basic query. My script doesn't loop through items. Below is a very simple Minimal Worked Example. It should loop through the sentences, but only displays 1. Thanks&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item sentences&amp;gt;&lt;br/&gt;/ 1 = "A dog is a canine"&lt;br/&gt;/ 2 = "A cat is a feline"&lt;br/&gt;/ 3 = "A bear is ursine"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item questions&amp;gt;&lt;br/&gt;/ 1 = ""&lt;br/&gt;/ 2 = "Did this sentence mention a cat?"&lt;br/&gt;/ 3 = ""&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text sentence&amp;gt;&lt;br/&gt;/ items  = sentences&lt;br/&gt;/ select = text.question.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text question&amp;gt;&lt;br/&gt;/ items = questions&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trial&amp;gt;&lt;br/&gt;/ stimulusframes = [1-3 = noreplace(sentence)]&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block block&amp;gt;&lt;br/&gt;/ trials = [1 = trial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt expt&amp;gt;&lt;br/&gt;/ blocks = [1 = block]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22902"&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;&amp;lt;trial trial&amp;gt;&lt;br/&gt;&lt;strong&gt;/ stimulusframes = [1-3 = noreplace(sentence)]&lt;/strong&gt;&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;is not supposed to "loop" through sentences. A given stimulus object like &amp;lt;text sentence&amp;gt; will select one and only one item per trial, displaying the element repeatedly during the trial will not lead to a new selection. If you wish to display three different items during a trial, you need three different stimulus objects -- e.g. &amp;lt;text sentence_a&amp;gt; to &amp;lt;text sentence_c&amp;gt; -- and have your trial display all three.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22903"&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. I'm afraid I don't understand. This is identical to one of the walk-through examples: the IAT script (snippets shown below). A series of items are defined and these are plugged into the text object. Then a trial object is created, in which the property 'items' references the text object. This successfully loops through the items. As far as I can see, my example has exactly the same structure as this, but it doesn't loop. There must be something wrong which causes it not to loop.&lt;br/&gt;&lt;pre&gt;&amp;lt;text pleasant&amp;gt;&lt;br/&gt;/ items = pleasant&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;pre&gt;&amp;lt;item pleasant&amp;gt;&lt;br/&gt;/ 1 = "&amp;nbsp;&amp;nbsp;  HONOR&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 2 = "&amp;nbsp;&amp;nbsp;  LUCKY&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 3 = "&amp;nbsp;&amp;nbsp; DIAMOND&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 4 = "&amp;nbsp;&amp;nbsp;  LOYAL&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 5 = "&amp;nbsp;&amp;nbsp; FREEDOM&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 6 = "&amp;nbsp;&amp;nbsp; RAINBOW&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 7 = "&amp;nbsp;&amp;nbsp;&amp;nbsp;LOVE&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/ 8 = "&amp;nbsp;&amp;nbsp;  HONEST&amp;nbsp;&amp;nbsp; "&lt;br/&gt;/ 9 = "&amp;nbsp;&amp;nbsp;  PEACE&amp;nbsp;&amp;nbsp;  "&lt;br/&gt;/10 = "&amp;nbsp;&amp;nbsp;  HEAVEN&amp;nbsp;&amp;nbsp; "&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;(see &lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingstimuli.htm)"&gt;http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingstimuli.htm)&lt;/a&gt;&lt;/pre&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre&gt;&amp;lt;trial pleasant&amp;gt; &lt;br/&gt;/ stimulusframes = [1=pleasant]&lt;br/&gt;/ validresponse = ("a", "5")&lt;br/&gt;/ correctresponse = ("5")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;(see &lt;a href="http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingtrials.htm)"&gt;http://www.millisecond.com/support/docs/v5/html/tutorials/simpleiat/iatcreatingtrials.htm)&lt;/a&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 20 Nov 2017 09:19:51 GMT</pubDate><dc:creator>Nick Riches</dc:creator></item><item><title>RE: Why doesn't this script loop?</title><link>https://forums.millisecond.com/Topic22903.aspx</link><description>&lt;div data-id="22902" class="if-quote-wrapper" unselectable="on" data-guid="1511197167688"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22902" 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="22902" 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="22902" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Nick Riches - Monday, November 20, 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-22902"&gt;&lt;div class="if-quote-message-margin"&gt;Hi&lt;br/&gt;&lt;br/&gt;I have a very basic query. My script doesn't loop through items. Below is a very simple Minimal Worked Example. It should loop through the sentences, but only displays 1. Thanks&lt;br/&gt;&lt;br/&gt;Nick&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item sentences&amp;gt;&lt;br/&gt;/ 1 = "A dog is a canine"&lt;br/&gt;/ 2 = "A cat is a feline"&lt;br/&gt;/ 3 = "A bear is ursine"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item questions&amp;gt;&lt;br/&gt;/ 1 = ""&lt;br/&gt;/ 2 = "Did this sentence mention a cat?"&lt;br/&gt;/ 3 = ""&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text sentence&amp;gt;&lt;br/&gt;/ items  = sentences&lt;br/&gt;/ select = text.question.currentindex&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text question&amp;gt;&lt;br/&gt;/ items = questions&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial trial&amp;gt;&lt;br/&gt;/ stimulusframes = [1-3 = noreplace(sentence)]&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block block&amp;gt;&lt;br/&gt;/ trials = [1 = trial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt expt&amp;gt;&lt;br/&gt;/ blocks = [1 = block]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="22902"&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;&amp;lt;trial trial&amp;gt;&lt;br/&gt;&lt;strong&gt;/ stimulusframes = [1-3 = noreplace(sentence)]&lt;/strong&gt;&lt;br/&gt;/ validresponse = ("Y", "N")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;is not supposed to "loop" through sentences. A given stimulus object like &amp;lt;text sentence&amp;gt; will select one and only one item per trial, displaying the element repeatedly during the trial will not lead to a new selection. If you wish to display three different items during a trial, you need three different stimulus objects -- e.g. &amp;lt;text sentence_a&amp;gt; to &amp;lt;text sentence_c&amp;gt; -- and have your trial display all three.&lt;br/&gt;</description><pubDate>Mon, 20 Nov 2017 09:03:10 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>