﻿<?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  » Setting a maximum of consecutive block repeats in an anticipatory anxiety task (block design)</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sat, 23 May 2026 07:27:06 GMT</lastBuildDate><ttl>20</ttl><item><title>Setting a maximum of consecutive block repeats in an anticipatory anxiety task (block design)</title><link>https://forums.millisecond.com/Topic14172.aspx</link><description>Hi again,&lt;br/&gt;&lt;br/&gt;I'm constructing an anticipatory anxiety task whereby an indicator slide (i.e &amp;lt;picture threatpicture&amp;gt;- &amp;lt;picture safepicture&amp;gt;) is presented, followed by the corresponding emotionally valent image, selected images from either &amp;lt;picture negpictures&amp;gt; or&amp;nbsp;&lt;span style="color: rgb(34, 34, 34); font-family: arial, tahoma; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;"&gt;&amp;lt;picture&amp;nbsp;&lt;/span&gt;pospictures&amp;gt; respectively,&lt;br/&gt;&lt;br/&gt;In essence there are two block types that present either the threat+negative picture combination (&amp;lt;block negblock&amp;gt;) or the safe+positive picture combination (&amp;lt;block posblock&amp;gt;). Each block is presented 15 times (with no pictures repeated).&amp;nbsp;&lt;br/&gt;&lt;br/&gt;What I want to do is have a condition that allows either block to repeat itself, as long as it is not repeated consecutively more than three times. &lt;br/&gt;For example, &lt;br/&gt;presentation sequence:&amp;nbsp;[negblock - negblock - negblock - posblock - posblock] is okay as it is only 3 repeated 3 times&amp;nbsp;&lt;br/&gt;while :&amp;nbsp;[negblock - negblock - negblock - negblock - posblock] is not ideal.&lt;br/&gt;&lt;br/&gt;Is there a method to set a specific maximum allowed consecutive repeats? I have been scratching my head about it but thought best to ask before wasting any more time.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;The original code is below; I've attached the picture files as well if they are easier for running the script (warning: some are pretty unpleasant).&lt;br/&gt;&lt;br/&gt;Thanks for your help in advance!&lt;br/&gt;&lt;br/&gt;Cheers&lt;br/&gt;Warren&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;defaults&amp;gt;&lt;br/&gt;/ screencolor = white&lt;br/&gt;/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 0)&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;&amp;lt;/defaults&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;--------------------------------------------&lt;br/&gt;****STIMULI****&lt;br/&gt;--------------------------------------------&lt;br/&gt;&lt;br/&gt;&amp;lt;text fixationcross&amp;gt;&lt;br/&gt;/items = ("+")&lt;br/&gt;/fontstyle = ("arial", 10%, false, false, false, false, 5)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text captioncrave&amp;gt;&lt;br/&gt;/items = ("How severe is your craving for alcohol RIGHT NOW")&lt;br/&gt;/ height = 40%&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text labelnocrave&amp;gt;&lt;br/&gt;/items = ("No craving")&lt;br/&gt;/fontstyle = ("arial", 36, false, false, false, false, 5)&lt;br/&gt;/ hposition = 12%&lt;br/&gt;/ vposition = 53%&lt;br/&gt;/ hjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text labelhighcrave&amp;gt;&lt;br/&gt;/items = ("Very severe craving")&lt;br/&gt;/ fontstyle = ("arial", 36, false, false, false, false, 5)&lt;br/&gt;/ hposition = 88%&lt;br/&gt;/ vposition = 53%&lt;br/&gt;/ hjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture negpictures&amp;gt;&lt;br/&gt;/ items = neglist&lt;br/&gt;/ select = noreplace&lt;br/&gt;/resetinterval = 0&lt;br/&gt;/size = (100%,100%)&lt;br/&gt;&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture pospictures&amp;gt;&lt;br/&gt;/ items = poslist&lt;br/&gt;/ select = noreplace&lt;br/&gt;/resetinterval = 0&lt;br/&gt;/size = (100%,100%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture threatpicture&amp;gt;&lt;br/&gt;/ items = ("threatcue.jpg")&lt;br/&gt;/ select = noreplace&lt;br/&gt;/resetinterval = 0&lt;br/&gt;/size = (100%,100%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture safepicture&amp;gt;&lt;br/&gt;/ items = ("safecue.jpg")&lt;br/&gt;/ select = noreplace&lt;br/&gt;/resetinterval = 0&lt;br/&gt;/size = (100%,100%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;slider VAScrave&amp;gt;&lt;br/&gt;/ labels = ("no craving", "strong craving")&lt;br/&gt;/ range = (1, 100)&lt;br/&gt;/ position = (15%,50%)&lt;br/&gt;/ slidersize = (60, 5%)&lt;br/&gt;/ showtooltips = false&lt;br/&gt;&amp;lt;/slider&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;clock timer&amp;gt;&lt;br/&gt;/ mode = timer&lt;br/&gt;/ resetrate = trial&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ timeout = 10000&lt;br/&gt;/ position = (50%, 80%)&lt;br/&gt;/ format = "s"&lt;br/&gt;&amp;lt;/clock&amp;gt;&lt;br/&gt;&lt;br/&gt;--------------------------------------------&lt;br/&gt;****PICTURE ITEMS****&lt;br/&gt;--------------------------------------------&lt;br/&gt;&lt;br/&gt;&amp;lt;item neglist&amp;gt;&lt;br/&gt;/1 =  "neg3001.jpg"&lt;br/&gt;/2 =  "neg3015.jpg"&lt;br/&gt;/3 =  "neg3053.jpg"&lt;br/&gt;/4 =  "neg3063.jpg"&lt;br/&gt;/5 =  "neg3064.jpg"&lt;br/&gt;/6 =  "neg3102.jpg"&lt;br/&gt;/7 =  "neg3261.jpg"&lt;br/&gt;/8 =  "neg6021.jpg"&lt;br/&gt;/9 =  "neg6212.jpg"&lt;br/&gt;/10 =  "neg6520.jpg"&lt;br/&gt;/11 =  "neg6563.jpg"&lt;br/&gt;/12 =  "neg9252.jpg"&lt;br/&gt;/13 =  "neg9410.jpg"&lt;br/&gt;/14 =  "neg9412.jpg"&lt;br/&gt;/15 =  "neg9413.jpg"&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item poslist&amp;gt;&lt;br/&gt;/1 =  "pos1710.jpg"&lt;br/&gt;/2 =  "pos2045.jpg"&lt;br/&gt;/3 =  "pos2155.jpg"&lt;br/&gt;/4 =  "pos2158.jpg"&lt;br/&gt;/5 =  "pos2208.jpg"&lt;br/&gt;/6 =  "pos2216.jpg"&lt;br/&gt;/7 =  "pos2303.jpg"&lt;br/&gt;/8 =  "pos2345.jpg"&lt;br/&gt;/9 =  "pos2347.jpg"&lt;br/&gt;/10 =  "pos2389.jpg"&lt;br/&gt;/11 =  "pos4626.jpg"&lt;br/&gt;/12 =  "pos5629.jpg"&lt;br/&gt;/13 =  "pos5825.jpg"&lt;br/&gt;/14 =  "pos5833.jpg"&lt;br/&gt;/15 =  "pos8080.jpg"&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;--------------------------------------------&lt;br/&gt;****TRIALS****&lt;br/&gt;--------------------------------------------&lt;br/&gt;&lt;br/&gt;&amp;lt;trial fixationtrial&amp;gt;&lt;br/&gt;/ stimulustimes = [1=fixationcross]&lt;br/&gt;/ timeout = 500&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial negtrial&amp;gt;&lt;br/&gt;/ stimulustimes = [1=negpictures]&lt;br/&gt;/ timeout = 500&lt;br/&gt;/posttrialpause = 1&lt;br/&gt;&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial postrial&amp;gt;&lt;br/&gt;/ stimulustimes = [1=pospictures]&lt;br/&gt;/ timeout = 500&lt;br/&gt;/posttrialpause = 1&lt;br/&gt;&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial threatcuetrial&amp;gt;&lt;br/&gt;/ stimulustimes = [1=threatpicture]&lt;br/&gt;/ timeout = 1000&lt;br/&gt;/posttrialpause = 1&lt;br/&gt;&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial safecuetrial&amp;gt;&lt;br/&gt;/ stimulustimes = [1=safepicture]&lt;br/&gt;/ timeout = 1000&lt;br/&gt;/posttrialpause = 1&lt;br/&gt;&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage VAScravepage&amp;gt;&lt;br/&gt;/ fontstyle = ("Verdana", -16, true, false, false, false, 5, 0)&lt;br/&gt;/ stimulusframes = [1=captioncrave, timer, labelnocrave, labelhighcrave]&lt;br/&gt;/ questions = [1=Vascrave] &lt;br/&gt;/timeout = 10000&lt;br/&gt;&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;--------------------------------------------&lt;br/&gt;****BLOCKS****&lt;br/&gt;--------------------------------------------&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block negblock&amp;gt;&lt;br/&gt;/ trials = [1 = fixationtrial;  2=threatcuetrial; 3=negtrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block posblock&amp;gt;&lt;br/&gt;/ trials = [1= fixationtrial; 2=safecuetrial; 3=postrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block vascraveblock&amp;gt;&lt;br/&gt;/ trials = [1= vascravepage]&lt;br/&gt;&amp;lt;/block&amp;gt; &lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1-30=noreplace(negblock,posblock)]&lt;br/&gt;&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;</description><pubDate>Wed, 10 Sep 2014 22:59:28 GMT</pubDate><dc:creator>WarrenL</dc:creator></item><item><title>RE: Setting a maximum of consecutive block repeats in an anticipatory anxiety task (block design)</title><link>https://forums.millisecond.com/Topic14190.aspx</link><description>Huge help as always Dave - didn't think of setting the list, worked perfectly&lt;br/&gt;&lt;br/&gt;Thanks a million!&lt;br/&gt;&lt;br/&gt;Cheers&lt;br/&gt;Warren</description><pubDate>Wed, 10 Sep 2014 22:59:28 GMT</pubDate><dc:creator>WarrenL</dc:creator></item><item><title>RE: Setting a maximum of consecutive block repeats in an anticipatory anxiety task (block design)</title><link>https://forums.millisecond.com/Topic14174.aspx</link><description>The way to do this is to use a properly configured &amp;lt;list&amp;gt; element for block selection. Particularly, you'll want to use its /maxrunsize attribute to specify the maximum number of allowable repeats:&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1-30=list.blocklist]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list blocklist&amp;gt;&lt;br/&gt;/ items = (block.a, block.b)&lt;br/&gt;/ poolsize = 30&lt;br/&gt;/ maxrunsize = 3&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block a&amp;gt;&lt;br/&gt;/ trials = [1=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block b&amp;gt;&lt;br/&gt;/ trials = [1=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ validresponse = (0)&lt;br/&gt;/ trialduration = 100&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Wed, 10 Sep 2014 03:24:44 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Setting a maximum of consecutive block repeats in an anticipatory anxiety task (block design)</title><link>https://forums.millisecond.com/Topic14173.aspx</link><description>unfortunately it won't let me upload the other pictures...</description><pubDate>Wed, 10 Sep 2014 02:31:49 GMT</pubDate><dc:creator>WarrenL</dc:creator></item></channel></rss>