﻿<?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  » Using a counter to draw from a list</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 16 Sep 2026 09:58:39 GMT</lastBuildDate><ttl>20</ttl><item><title>Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15608.aspx</link><description>So i have say this list:&lt;br/&gt;&lt;span style="font-size: 13.3333330154419px;"&gt;&amp;lt;list a2optiono1&amp;gt;&lt;/span&gt;&lt;br/&gt;&lt;span style="font-size: 13.3333330154419px;"&gt;/ items = (70 100)&lt;/span&gt;&lt;br/&gt;&lt;span style="font-size: 13.3333330154419px;"&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;/span&gt;&lt;br/&gt;And this counter:&lt;br/&gt;&amp;lt;counter a2option&amp;gt;&lt;br/&gt;/ items = (1;2)&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;How do I call&amp;nbsp;list.a2optiono1.(x) where x is counter.a2option.currentvalue or nextvalue?&lt;br/&gt;&lt;br/&gt;Thanks for any help.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 10 Aug 2015 21:17:40 GMT</pubDate><dc:creator>nashby</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic16916.aspx</link><description>As always thanks Dave got it working now.</description><pubDate>Mon, 10 Aug 2015 21:17:40 GMT</pubDate><dc:creator>nashby</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic16910.aspx</link><description>You can also frame the problem differently and assign positions to objects: &lt;a href="https://www.millisecond.com/forums/Topic5501.aspx"&gt;https://www.millisecond.com/forums/Topic5501.aspx&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Instead of using a &amp;lt;counter&amp;gt; directly in /hposition and /vposition, I would recommend (1) the use of &amp;lt;list&amp;gt; instead of &amp;lt;counter&amp;gt; and (2) using &amp;lt;values&amp;gt; to store a given element's' position.&lt;br/&gt;</description><pubDate>Mon, 10 Aug 2015 16:57:51 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic16909.aspx</link><description>For example:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ location1item = 1&lt;br/&gt;/ location2item = 1&lt;br/&gt;/ location3item = 1&lt;br/&gt;/ location4item = 1&lt;br/&gt;&amp;lt;/values&amp;gt;&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;/ ontrialbegin = [values.location1item=list.itemlist.nextindex; values.location2item=list.itemlist.nextindex;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.location3item=list.itemlist.nextindex; values.location4item=list.itemlist.nextindex; ]&lt;br/&gt;/ ontrialend = [list.itemlist.reset(); ]&lt;br/&gt;/ stimulusframes = [1=pic1, desc1, pic2, desc2, pic3, desc3, pic4, desc4]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text pic1&amp;gt;&lt;br/&gt;/ items = picitems&lt;br/&gt;/ select = values.location1item&lt;br/&gt;/ position = (20%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text pic2&amp;gt;&lt;br/&gt;/ items = picitems&lt;br/&gt;/ select = values.location2item&lt;br/&gt;/ position = (40%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text pic3&amp;gt;&lt;br/&gt;/ items = picitems&lt;br/&gt;/ select = values.location3item&lt;br/&gt;/ position = (60%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text pic4&amp;gt;&lt;br/&gt;/ items = picitems&lt;br/&gt;/ select = values.location4item&lt;br/&gt;/ position = (80%, 50%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text desc1&amp;gt;&lt;br/&gt;/ items = descitems&lt;br/&gt;/ select = values.location1item&lt;br/&gt;/ position = (20%, 55%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text desc2&amp;gt;&lt;br/&gt;/ items = descitems&lt;br/&gt;/ select = values.location2item&lt;br/&gt;/ position = (40%, 55%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text desc3&amp;gt;&lt;br/&gt;/ items = descitems&lt;br/&gt;/ select = values.location3item&lt;br/&gt;/ position = (60%, 55%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text desc4&amp;gt;&lt;br/&gt;/ items = descitems&lt;br/&gt;/ select = values.location4item&lt;br/&gt;/ position = (80%, 55%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item picitems&amp;gt;&lt;br/&gt;/ 1 = "cat.jpg"&lt;br/&gt;/ 2 = "dog.jpg"&lt;br/&gt;/ 3 = "cow.jpg"&lt;br/&gt;/ 4 = "bird.jpg"&lt;br/&gt;/ 5 = "fish.jpg"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item descitems&amp;gt;&lt;br/&gt;/ 1 = "A cute cat"&lt;br/&gt;/ 2 = "A happy dog"&lt;br/&gt;/ 3 = "A big cow"&lt;br/&gt;/ 4 = "A colorful bird"&lt;br/&gt;/ 5 = "An exotic fish"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list itemlist&amp;gt;&lt;br/&gt;/ poolsize = 5&lt;br/&gt;/ selectionrate = always&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 10 Aug 2015 16:44:41 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic16908.aspx</link><description>So I am stuck again but with a different problem.&lt;br/&gt;&lt;br/&gt;I have 16 locations that need to have 16 different pictures randomly assigned to them but I also have the 16 text descriptions of those pictures that need to be assigned to the correct picture. So whatever place Picture 1 ends up Text 1 needs to end up there as well, but again the where needs to be random.&lt;br/&gt;&lt;br/&gt;I have tried everything I can think of (spent the last 4 days working on this one issue) but nothing is matching the text up with the proper picture and I keep getting repeats of text and pictures.&lt;br/&gt;&lt;br/&gt;Can anyone show me a simple way to do this?</description><pubDate>Mon, 10 Aug 2015 16:03:47 GMT</pubDate><dc:creator>nashby</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15621.aspx</link><description>Ok I get it now. I just hate inquist syntax its very counter intuitive :)</description><pubDate>Wed, 25 Feb 2015 17:42:39 GMT</pubDate><dc:creator>nashby</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15620.aspx</link><description>And to avoid any confusion, there is *no* need for operating with index values. It works the same with any type of item:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ a1 = 0&lt;br/&gt;/ a2 = 0&lt;br/&gt;/ b1 = 0&lt;br/&gt;/ b2 = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list mylist&amp;gt;&lt;br/&gt;/ items = (0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%)&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ selectionrate = always&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [values.a1=list.mylist.nextvalue; values.a2=list.mylist.currentvalue;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.b1=list.mylist.nextvalue; values.b2=list.mylist.currentvalue; ]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%values.a1%&amp;gt;, &amp;lt;%values.a2%&amp;gt;, &amp;lt;%values.b1%&amp;gt;, &amp;lt;%values.b2%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;</description><pubDate>Wed, 25 Feb 2015 16:12:40 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15619.aspx</link><description>&amp;gt; But that doesnt assign that doesnt assign them randomly.I need position 1 to be a random item, not item 1 in the list.&lt;br/&gt;&lt;br/&gt;Of course it does assign items randomly: &lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ a1 = 0&lt;br/&gt;/ a2 = 0&lt;br/&gt;/ b1 = 0&lt;br/&gt;/ b2 = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list mylist&amp;gt;&lt;br/&gt;/ poolsize = 16&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ selectionrate = always&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [values.a1=list.mylist.nextindex; values.a2=list.mylist.currentindex; &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.b1=list.mylist.nextindex; values.b2=list.mylist.currentindex; ]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%values.a1%&amp;gt;, &amp;lt;%values.a2%&amp;gt;, &amp;lt;%values.b1%&amp;gt;, &amp;lt;%values.b2%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;How is this not random?&lt;br/&gt;</description><pubDate>Wed, 25 Feb 2015 16:01:11 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15618.aspx</link><description>But that doesnt assign that doesnt assign them randomly.I need position 1 to be a random item, not item 1 in the list.&lt;br/&gt;&lt;br/&gt;Here is the bits of my experiment that should be relevant to understand what I am trying to do.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list a2option&amp;gt;&lt;br/&gt;/ items = (1 2)&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ selectionrate = always&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list a2optiono1&amp;gt;&lt;br/&gt;/ items = (70 100)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list a2optiono2&amp;gt;&lt;br/&gt;/ items = (60 30)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list a2optionp&amp;gt;&lt;br/&gt;/ items = (50 20)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial2&amp;gt;&lt;br/&gt;/ stimulusframes = [1=  InPlay, LabelA, LabelB, O1, O2]&lt;br/&gt;/ validresponse = (LabelA, LabelB)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ ontrialend = [values.samples += 1]&lt;br/&gt;/ ontrialbegin = [values.condition = 4]&lt;br/&gt;/ ontrialbegin = [values.ran = round(rand(1,100))]&lt;br/&gt;/ ontrialend = [ if (trial.mytrial2.response == "LabelA" &amp;amp;&amp;amp; values.ran &amp;lt;= values.o1p) {values.outcome=(values.o1a); values.spicked = 0; }]&lt;br/&gt;/ ontrialend = [ if (trial.mytrial2.response == "LabelA" &amp;amp;&amp;amp; values.ran &amp;gt; values.o1p)  {values.outcome=(values.o1b); values.spicked = 0; }]&lt;br/&gt;/ ontrialend = [ if (trial.mytrial2.response == "LabelB" &amp;amp;&amp;amp; values.ran &amp;lt;= values.o2p) {values.outcome=(values.o2a);  values.spicked = 1; }]&lt;br/&gt;/ ontrialend = [ if (trial.mytrial2.response == "LabelB" &amp;amp;&amp;amp; values.ran &amp;gt; values.o2p){values.outcome=(values.o2b);  values.spicked = 1; }]&lt;br/&gt;/ ontrialend = [ if (trial.mytrial2.response == "LabelA") {text.o1.item.1=(values.outcome);text.o2.item.1=(" "); text.o3.item.1=(" "); text.o4.item.1=(" ");text.o5.item.1=(" ");text.o6.item.1=(" "); text.o7.item.1=(" "); text.o8.item.1=(" ");text.o9.item.1=(" "); text.o10.item.1=(" "); text.o11.item.1=(" ");text.o12.item.1=(" ");text.o13.item.1=(" "); text.o14.item.1=(" "); text.o15.item.1=(" "); text.o16.item.1=(" ");}]&lt;br/&gt;/ ontrialend = [ if (trial.mytrial2.response == "LabelB") {text.o2.item.1=(values.outcome);text.o1.item.1=(" "); text.o3.item.1=(" "); text.o4.item.1=(" ");text.o5.item.1=(" ");text.o6.item.1=(" "); text.o7.item.1=(" "); text.o8.item.1=(" ");text.o9.item.1=(" "); text.o10.item.1=(" "); text.o11.item.1=(" ");text.o12.item.1=(" ");text.o13.item.1=(" "); text.o14.item.1=(" "); text.o15.item.1=(" "); text.o16.item.1=(" ");}]&lt;br/&gt;/ ontrialend = [values.tot += values.outcome]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block picking2&amp;gt;&lt;br/&gt;/ trials = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,&lt;br/&gt;103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,&lt;br/&gt;183,185,187,189,191,193,195,197,199,201= mytrial2; &lt;br/&gt;2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,&lt;br/&gt;116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,&lt;br/&gt;198,200,202= blank2;]&lt;br/&gt;/ onblockbegin = [values.o1a = list.a2optiono1.item(list.a2option.item(1));values.o1b = list.a2optiono2.item(list.a2option.item(1));values.o2a = list.a2optiono1.item(list.a2option.item(2));values.o2b = list.a2optiono2.item(list.a2option.item(2)); values.o1p = list.a2optionp.item(list.a2option.item(1)); values.o2p = list.a2optionp.item(list.a2option.item(2));  ]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Wed, 25 Feb 2015 15:55:11 GMT</pubDate><dc:creator>nashby</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15617.aspx</link><description>&amp;gt; / onblockbegin = [values.o1a = list.a2optiono1.(x1);values.o1b = list.a2optiono2.(x1);values.o2a = list.a2optiono1.(x2);values.o2b &amp;gt; = list.a2optiono2.(x2); values.o1p = list.a2optionp.(x1); values.o2p = list.a2optionp.(x2);  ]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So like above where I need each x1 or x2 or x16 to be a different number drawn from 1-16 without replacement.			    							    &lt;br/&gt;&lt;br/&gt;See the 1st example I posted in my previous reply: &lt;a href="https://www.millisecond.com/forums/FindPost15614.aspx"&gt;https://www.millisecond.com/forums/FindPost15614.aspx&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;All you need is a single &amp;lt;list&amp;gt; with /selectionrate set to 'always'. nextindex forces a new selection, currentindex does not (same for nextvalue and currentvalue).&lt;br/&gt;</description><pubDate>Wed, 25 Feb 2015 15:52:30 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15616.aspx</link><description>That's broken syntax. If you use proper syntax, that works just fine:&lt;br/&gt;&lt;br/&gt;&amp;lt;list a&amp;gt;&lt;br/&gt;/ items = ("C", "A", "B")&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list b&amp;gt;&lt;br/&gt;/ items = (1,2,3)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [values.myvalue = list.a.item(list.b.item(1))]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%values.myvalue%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ myvalue = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;</description><pubDate>Wed, 25 Feb 2015 15:44:17 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15615.aspx</link><description>So i can call something like List.xxx.item(&amp;lt;%list.mylist_shuffled.item(1)%&amp;gt;)? Doesnt seem to work?</description><pubDate>Wed, 25 Feb 2015 15:33:26 GMT</pubDate><dc:creator>nashby</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15614.aspx</link><description>The /selectionmode is what "shuffles" your list. You can just pull out items randomly from it and assign. &lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ a1 = 0&lt;br/&gt;/ a2 = 0&lt;br/&gt;/ b1 = 0&lt;br/&gt;/ b2 = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list mylist&amp;gt;&lt;br/&gt;/ poolsize = 16&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ selectionrate = always&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [values.a1=list.mylist.nextindex; values.a2=list.mylist.currentindex; &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.b1=list.mylist.nextindex; values.b2=list.mylist.currentindex; ]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%values.a1%&amp;gt;, &amp;lt;%values.a2%&amp;gt;, &amp;lt;%values.b1%&amp;gt;, &amp;lt;%values.b2%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;Or you can "shuffle" the thing once, store that result in another list / array and then grab your values in order:&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ onblockbegin = [list.mylist_shuffled.appenditem(list.mylist.nextindex); list.mylist_shuffled.appenditem(list.mylist.nextindex);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list.mylist_shuffled.appenditem(list.mylist.nextindex); list.mylist_shuffled.appenditem(list.mylist.nextindex); &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list.mylist_shuffled.appenditem(list.mylist.nextindex); list.mylist_shuffled.appenditem(list.mylist.nextindex); &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list.mylist_shuffled.appenditem(list.mylist.nextindex); list.mylist_shuffled.appenditem(list.mylist.nextindex); &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list.mylist_shuffled.appenditem(list.mylist.nextindex); list.mylist_shuffled.appenditem(list.mylist.nextindex); &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list.mylist_shuffled.appenditem(list.mylist.nextindex); list.mylist_shuffled.appenditem(list.mylist.nextindex); &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list.mylist_shuffled.appenditem(list.mylist.nextindex); list.mylist_shuffled.appenditem(list.mylist.nextindex); &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list.mylist_shuffled.appenditem(list.mylist.nextindex); list.mylist_shuffled.appenditem(list.mylist.nextindex); &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br/&gt;/ trials = [1=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list mylist&amp;gt;&lt;br/&gt;/ poolsize = 16&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ selectionrate = always&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list mylist_shuffled&amp;gt;&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%list.mylist_shuffled.item(1)%&amp;gt;, &amp;lt;%list.mylist_shuffled.item(2)%&amp;gt;, &amp;lt;%list.mylist_shuffled.item(3)%&amp;gt;, ...")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;It all depends on what exactly you want to do.&lt;br/&gt;</description><pubDate>Wed, 25 Feb 2015 15:21:26 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15613.aspx</link><description>/ onblockbegin = [values.o1a = list.a2optiono1.(x1);values.o1b = list.a2optiono2.(x1);values.o2a = list.a2optiono1.(x2);values.o2b = list.a2optiono2.(x2); values.o1p = list.a2optionp.(x1); values.o2p = list.a2optionp.(x2);  ]&lt;br/&gt;&lt;br/&gt;So like above where I need each x1 or x2 or x16 to be a different number drawn from 1-16 without replacement.</description><pubDate>Wed, 25 Feb 2015 15:18:55 GMT</pubDate><dc:creator>nashby</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15612.aspx</link><description>I just cant figure it out. I need say an array list whatever that is (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16).&lt;br/&gt;&lt;br/&gt;I then need to say shuffle that array so they arent in order. Then I need to grab position 1 and assign to several different things, then position 2 and assign that to several different things. How do I do this with a list or counter or anything?</description><pubDate>Wed, 25 Feb 2015 15:11:08 GMT</pubDate><dc:creator>nashby</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15611.aspx</link><description>&amp;lt;list&amp;gt; elements are very much like arrays.&lt;br/&gt;</description><pubDate>Wed, 25 Feb 2015 15:09:25 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15610.aspx</link><description>I have an experiment with 16 &amp;nbsp;buttons. Randomly assigned to each one of those buttons are 16 different gambles that have two outcomes that occur at different probabilities. What I really need is randomly matched arrays but I know inquisit cant do arrays.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Wed, 25 Feb 2015 15:00:28 GMT</pubDate><dc:creator>nashby</dc:creator></item><item><title>RE: Using a counter to draw from a list</title><link>https://forums.millisecond.com/Topic15609.aspx</link><description>#1: You should not use a &amp;lt;counter&amp;gt; at all. Use only &amp;lt;list&amp;gt; elements.&lt;br/&gt;#2: &lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ myvalue = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list a2optiono1&amp;gt;&lt;br/&gt;/ items = (70, 100)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list a2option&amp;gt;&lt;br/&gt;/ items = (1, 2)&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-2=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [values.myvalue=list.a2optiono1.item(list.a2option.nextvalue)]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%values.myvalue%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;(I admittedly have trouble seeing a realistic use case for this; it strikes me as unnecessarily complicated)&lt;br/&gt;</description><pubDate>Wed, 25 Feb 2015 14:48:15 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>