﻿<?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  » listing variables as list items</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 02 Jul 2026 22:21:33 GMT</lastBuildDate><ttl>20</ttl><item><title>listing variables as list items</title><link>https://forums.millisecond.com/Topic20434.aspx</link><description>I am wanting to use variables as list items, along the lines of the following code but in which the variable will be dynamically defined by the user.&amp;nbsp; Whenever I try to run the code it tells me that it wants double quotes for the items.&amp;nbsp; That is, it doesn't seem to realise that these are text variables.&lt;br/&gt;&lt;br/&gt;Any suggestions?&lt;br/&gt;Jamie&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/self_shape = "a.bmp"&lt;br/&gt;/friend_shape = "b.bmp"&lt;br/&gt;/stranger_shape = "c.bmp"&lt;br/&gt;/currentstim=0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item&amp;nbsp; shape&amp;gt;&lt;br/&gt;/1 = values.self_shape&lt;br/&gt;/2 = values.friend_shape&lt;br/&gt;/3 = values.stranger_shape&lt;br/&gt;/4 = values.self_shape&lt;br/&gt;/5 = values.friend_shape&lt;br/&gt;/6 = values.stranger_shape&lt;br/&gt;/7 = values.friend_shape&lt;br/&gt;/8 = values.self_shape&lt;br/&gt;/9 = values.self_shape&lt;br/&gt;/10 = values.stranger_shape&lt;br/&gt;/11 = values.stranger_shape&lt;br/&gt;/12 = values.friend_shape&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture display_shape&amp;gt;&lt;br/&gt;/items = shape&lt;br/&gt;/select = values.currentstim&lt;br/&gt;/position = (50%, 25%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;</description><pubDate>Wed, 04 Jan 2017 14:22:44 GMT</pubDate><dc:creator>jamieward</dc:creator></item><item><title>RE: listing variables as list items</title><link>https://forums.millisecond.com/Topic20435.aspx</link><description>&lt;div data-id="20434" class="if-quote-wrapper" unselectable="on" data-guid="1483567757564"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20434" 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="20434" 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="20434" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;jamieward - Wednesday, January 4, 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-20434"&gt;&lt;div class="if-quote-message-margin"&gt;I am wanting to use variables as list items, along the lines of the following code but in which the variable will be dynamically defined by the user.&amp;nbsp; Whenever I try to run the code it tells me that it wants double quotes for the items.&amp;nbsp; That is, it doesn't seem to realise that these are text variables.&lt;br/&gt;&lt;br/&gt;Any suggestions?&lt;br/&gt;Jamie&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/self_shape = "a.bmp"&lt;br/&gt;/friend_shape = "b.bmp"&lt;br/&gt;/stranger_shape = "c.bmp"&lt;br/&gt;/currentstim=0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item&amp;nbsp; shape&amp;gt;&lt;br/&gt;/1 = values.self_shape&lt;br/&gt;/2 = values.friend_shape&lt;br/&gt;/3 = values.stranger_shape&lt;br/&gt;/4 = values.self_shape&lt;br/&gt;/5 = values.friend_shape&lt;br/&gt;/6 = values.stranger_shape&lt;br/&gt;/7 = values.friend_shape&lt;br/&gt;/8 = values.self_shape&lt;br/&gt;/9 = values.self_shape&lt;br/&gt;/10 = values.stranger_shape&lt;br/&gt;/11 = values.stranger_shape&lt;br/&gt;/12 = values.friend_shape&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture display_shape&amp;gt;&lt;br/&gt;/items = shape&lt;br/&gt;/select = values.currentstim&lt;br/&gt;/position = (50%, 25%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20434"&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;Valid syntax would look like the below. You should also define a &amp;lt;picture&amp;gt; element in the script that has the image files defined as items (even if you don't actually use that &amp;lt;picture&amp;gt; element anywhere else in the script). Otherwise you could run into problems under some circumstances, for example when deploying the script online, because Inquisit would not necessarily know to download the actual files before starting to execute the script.&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/self_shape = "a.bmp"&lt;br/&gt;/friend_shape = "b.bmp"&lt;br/&gt;/stranger_shape = "c.bmp"&lt;br/&gt;/currentstim=0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item shape&amp;gt;&lt;br/&gt;/1 = "&amp;lt;%values.self_shape%&amp;gt;"&lt;br/&gt;/2 = "&amp;lt;%values.friend_shape%&amp;gt;"&lt;br/&gt;/3 = "&amp;lt;%values.stranger_shape%&amp;gt;"&lt;br/&gt;/4 = "&amp;lt;%values.self_shape%&amp;gt;"&lt;br/&gt;/5 = "&amp;lt;%values.friend_shape%&amp;gt;"&lt;br/&gt;/6 = "&amp;lt;%values.stranger_shape%&amp;gt;"&lt;br/&gt;/7 = "&amp;lt;%values.friend_shape%&amp;gt;"&lt;br/&gt;/8 = "&amp;lt;%values.self_shape%&amp;gt;"&lt;br/&gt;/9 = "&amp;lt;%values.self_shape%&amp;gt;"&lt;br/&gt;/10 = "&amp;lt;%values.stranger_shape%&amp;gt;"&lt;br/&gt;/11 = "&amp;lt;%values.stranger_shape%&amp;gt;"&lt;br/&gt;/12 = "&amp;lt;%values.friend_shape%&amp;gt;"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture display_shape&amp;gt;&lt;br/&gt;/items = shape&lt;br/&gt;/select = values.currentstim&lt;br/&gt;/position = (50%, 25%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture dummypic&amp;gt;&lt;br/&gt;/ items = ("a.bmp", "b.bmp", "c.bmp")&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.currentstim += 1&lt;br/&gt;]&lt;br/&gt;/ stimulusframes = [1=display_shape]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-12 = mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;</description><pubDate>Wed, 04 Jan 2017 14:22:44 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>