﻿<?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  » Conditions going off when script run from the website</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 28 Apr 2026 09:19:21 GMT</lastBuildDate><ttl>20</ttl><item><title>Conditions going off when script run from the website</title><link>https://forums.millisecond.com/Topic15465.aspx</link><description>Hi,&lt;br/&gt;&lt;br/&gt;I set up a Simon task experiment and everything is perfectly fine in terms of number of conditions,etc...when I run the task on my computer.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;In more details, I am supposed to have: &lt;br/&gt;-40 incongruent trials: 20 of condition 1 and 20 of condition 4&lt;br/&gt;-40 congruent trials: 20 of condition 2 and 20 of condition 3&lt;br/&gt;-40 neutral trials: 20 of condition 5 and 20 of condition 6&lt;br/&gt;&lt;br/&gt;But once I upload the script on the website and run it from the website, the number of conditions go off. For example, I get 40 incongruent trials but 18 of condition 1 and 22 of condition 4...&lt;br/&gt;I really don't know the reason for that, so here is the script of the task I set up:&lt;br/&gt;&lt;br/&gt;&amp;lt;defaults&amp;gt;&lt;br/&gt;/ minimumversion = "4.0.0.0"&lt;br/&gt;/ fontstyle = ("Cambria", 3.5%, false)&lt;br/&gt;/canvasaspectratio = (4,3)&lt;br/&gt;/ screencolor = (white)&lt;br/&gt;&amp;lt;/defaults&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/file = "Simon_rawdata.iqdat"&lt;br/&gt;/ columns = [date time subject blockcode blocknum trialcode trialnum response values.cresp values.stimtype latency correct numcorrect percentcorrect meanlatency stimulusonset&lt;br/&gt;script.elapsedtime]&lt;br/&gt;/ separatefiles = true&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ cresp = 0&lt;br/&gt;/ stimtype = 0&lt;br/&gt;/fontsize_fixation = 8%&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ preinstructions = (intro01)&lt;br/&gt;/ postinstructions = (end)&lt;br/&gt;/ blocks = [1=simonpracticeblock; 2=simontestblock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block simonpracticeblock&amp;gt;&lt;br/&gt;/ trials = [1-12=noreplace(congruenttrial,incongruenttrial, neutraltrial)]&lt;br/&gt;/ errormessage = (errormessage, 500)&lt;br/&gt;/ correctmessage = (correctmessage, 500)&lt;br/&gt;/ bgstim = (leftinstruct,rightinstruct)&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block simontestblock&amp;gt;&lt;br/&gt;/ preinstructions = (test)&lt;br/&gt;/ trials = [1-120=noreplace(congruenttrial,incongruenttrial,neutraltrial)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text leftinstruct&amp;gt;&lt;br/&gt;/ items = ("Z = UP")&lt;br/&gt;/ hposition = 15&lt;br/&gt;/ vposition = 95&lt;br/&gt;/ fontstyle = ("Cambria", 3.00%, true)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text rightinstruct&amp;gt;&lt;br/&gt;/ items= ("M = DOWN")&lt;br/&gt;/ hposition = 85&lt;br/&gt;/ vposition = 95&lt;br/&gt;/ fontstyle = ("Cambria", 3.00%, true)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial congruenttrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [if(script.currentblock=="practiceblock")&lt;br/&gt;{&lt;br/&gt;values.stimtype=counter.pcongruentstimtype.selectedvalue;&lt;br/&gt;values.cresp=counter.pcongruentcresp.selectedvalue;&lt;br/&gt;} &lt;br/&gt;else&lt;br/&gt;{&lt;br/&gt;values.stimtype=counter.congruentstimtype.selectedvalue;&lt;br/&gt;values.cresp=counter.congruentcresp.selectedvalue;&lt;br/&gt;}]&lt;br/&gt;/ posttrialpause = 500&lt;br/&gt;/ stimulustimes = [0=fixation, leftinstruct,rightinstruct;500=blank, leftinstruct,rightinstruct; 1000=stimulus, leftinstruct, rightinstruct]&lt;br/&gt;/ responsetime = 1000&lt;br/&gt;/ validresponse = (anyresponse)&lt;br/&gt;/ iscorrectresponse = [trial.congruenttrial.response==values.cresp]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial incongruenttrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [if(script.currentblock=="practiceblock")&lt;br/&gt;{&lt;br/&gt;values.stimtype=counter.pincongruentstimtype.selectedvalue;&lt;br/&gt;values.cresp=counter.pincongruentcresp.selectedvalue;&lt;br/&gt;} &lt;br/&gt;else&lt;br/&gt;{&lt;br/&gt;values.stimtype=counter.incongruentstimtype.selectedvalue;&lt;br/&gt;values.cresp=counter.incongruentcresp.selectedvalue;&lt;br/&gt;}]&lt;br/&gt;/ posttrialpause = 500&lt;br/&gt;/ stimulustimes = [0=fixation, leftinstruct,rightinstruct; 500=blank, leftinstruct,rightinstruct; 1000=stimulus, leftinstruct, rightinstruct]&lt;br/&gt;/ responsetime = 1000&lt;br/&gt;/ validresponse = (anyresponse)&lt;br/&gt;/ iscorrectresponse = [trial.incongruenttrial.response==values.cresp]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial neutraltrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [if(script.currentblock=="practiceblock")&lt;br/&gt;{&lt;br/&gt;values.stimtype=counter.pneutralstimtype.selectedvalue;&lt;br/&gt;values.cresp=counter.pneutralcresp.selectedvalue;&lt;br/&gt;} &lt;br/&gt;else&lt;br/&gt;{&lt;br/&gt;values.stimtype=counter.neutralstimtype.selectedvalue;&lt;br/&gt;values.cresp=counter.neutralcresp.selectedvalue;&lt;br/&gt;}]&lt;br/&gt;/ posttrialpause = 500&lt;br/&gt;/ stimulustimes = [0=fixation, leftinstruct,rightinstruct; 500=blank, leftinstruct,rightinstruct; 1000=stimulus, leftinstruct, rightinstruct]&lt;br/&gt;/ responsetime = 1000&lt;br/&gt;/ validresponse = (anyresponse)&lt;br/&gt;/ iscorrectresponse = [trial.neutraltrial.response==values.cresp]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text fixation&amp;gt;&lt;br/&gt;/items = ("+")&lt;br/&gt;/position = (50%, 50%)&lt;br/&gt;/ fontstyle = ("Arial", values.fontsize_fixation, false, false, false, false, 5, 1)&lt;br/&gt;/ txcolor = (0, 0, 0)&lt;br/&gt;/ erase = true (white)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape blank&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ color = (white)&lt;br/&gt;/ position = (50%,50%)&lt;br/&gt;/ size = (100%,100%)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture stimulus&amp;gt;&lt;br/&gt;/ items = stimitems&lt;br/&gt;/ select = values.stimtype&lt;br/&gt;/ erase = true(white)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item stimitems&amp;gt;&lt;br/&gt;/ 1 = "LD_Arrowb.BMP"&lt;br/&gt;/ 2 = "LU_Arrowb.BMP"&lt;br/&gt;/ 3 = "RD_Arrowb.BMP"&lt;br/&gt;/ 4 = "RU_Arrowb.BMP"&lt;br/&gt;/ 5 = "MD_Arrowb.BMP"&lt;br/&gt;/ 6 = "MU_Arrowb.BMP"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text errormessage&amp;gt;&lt;br/&gt;/ items = ("  ERROR  ")&lt;br/&gt;/ txcolor = (255,0,0)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text correctmessage&amp;gt;&lt;br/&gt;/ items = ("  CORRECT  ")&lt;br/&gt;/ txcolor = (0,255,0)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter congruentstimtype&amp;gt;&lt;br/&gt;/ items = (2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3)&lt;br/&gt;/ select = noreplace&lt;br/&gt;/ selectionrate = trial&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter congruentcresp&amp;gt;&lt;br/&gt;/ items = (44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50)&lt;br/&gt;/ select = current(congruentstimtype)&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter pcongruentstimtype&amp;gt;&lt;br/&gt;/ items = (2,3)&lt;br/&gt;/ select = noreplace&lt;br/&gt;/ selectionrate = trial&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter pcongruentcresp&amp;gt;&lt;br/&gt;/ items = (44,50)&lt;br/&gt;/ select = current(pcongruentstimtype)&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter incongruentstimtype&amp;gt;&lt;br/&gt;/ items = (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4)&lt;br/&gt;/ select = noreplace&lt;br/&gt;/ selectionrate = trial&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter incongruentcresp&amp;gt;&lt;br/&gt;/ items = (50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44)&lt;br/&gt;/ select = current(incongruentstimtype)&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter pincongruentstimtype&amp;gt;&lt;br/&gt;/ items = (1,4)&lt;br/&gt;/ select = noreplace&lt;br/&gt;/ selectionrate = trial&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter pincongruentcresp&amp;gt;&lt;br/&gt;/ items = (50,44)&lt;br/&gt;/ select = current(pincongruentstimtype)&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter neutralstimtype&amp;gt;&lt;br/&gt;/ items = (5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6)&lt;br/&gt;/ select = noreplace&lt;br/&gt;/ selectionrate = trial&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter neutralcresp&amp;gt;&lt;br/&gt;/ items = (50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44)&lt;br/&gt;/ select = current(neutralstimtype)&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter pneutralstimtype&amp;gt;&lt;br/&gt;/ items = (5,6)&lt;br/&gt;/ select = noreplace&lt;br/&gt;/ selectionrate = trial&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;counter pneutralcresp&amp;gt;&lt;br/&gt;/ items = (50,44)&lt;br/&gt;/ select = current(pneutralstimtype)&lt;br/&gt;&amp;lt;/counter&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;instruct&amp;gt;&lt;br/&gt;/windowsize = (90%, 90%)&lt;br/&gt;/finishlabel = "&amp;lt;SPACEBAR&amp;gt; to start"&lt;br/&gt;/nextkey = (57)&lt;br/&gt;/prevkey = (28)&lt;br/&gt;/prevlabel = "&amp;lt;ENTER&amp;gt; to go back"&lt;br/&gt;/nextlabel = "&amp;lt;SPACEBAR&amp;gt; to continue"&lt;br/&gt;&amp;lt;/instruct&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;page intro01&amp;gt;&lt;br/&gt;THE "UP/DOWN ARROWS" TASK&lt;br/&gt;^^In this task, you will see an arrow pointing UP or DOWN.  &lt;br/&gt;^This arrow could appear on the left or the right side of the screen.&lt;br/&gt;^^Your task is to decide whether the arrow is pointing UP or DOWN.&lt;br/&gt;^^Press "z" with one hand if the arrow is pointing UP.&lt;br/&gt;^Press "m" with the other hand if the arrow is pointing DOWN.&lt;br/&gt;^^Please respond as fast and accurately as possible!&lt;br/&gt;^^Press the spacebar to move on to the practice.&lt;br/&gt;&amp;lt;/page&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;page test&amp;gt;&lt;br/&gt;^This concludes the practice phase.&lt;br/&gt;^^Please keep in mind: &lt;br/&gt;^^^^Press "z" if the arrow is pointing UP, regardless of its position on the screen.&lt;br/&gt;^Press "m" if the arrow is pointing DOWN, regardless of its position on the screen&lt;br/&gt;^^^^Please try to respond as fast and accurately as possible!&lt;br/&gt;^^^^Press the spacebar to start the test phase.&lt;br/&gt;&amp;lt;/page&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;page end&amp;gt;&lt;br/&gt;^This concludes the "Up/Down Arrows" Task.&lt;br/&gt;^^Thanks for participating!&lt;br/&gt;&amp;lt;/page&amp;gt;&lt;br/&gt;&lt;br/&gt;Thank you very much!&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 05 Feb 2015 06:56:55 GMT</pubDate><dc:creator>Zooahh</dc:creator></item><item><title>RE: Conditions going off when script run from the website</title><link>https://forums.millisecond.com/Topic15482.aspx</link><description>Thank you!</description><pubDate>Thu, 05 Feb 2015 06:56:55 GMT</pubDate><dc:creator>Zooahh</dc:creator></item><item><title>RE: Conditions going off when script run from the website</title><link>https://forums.millisecond.com/Topic15467.aspx</link><description>The highlighted statement will never be executed because the condition will never evaluate to true: &lt;br/&gt;&lt;br/&gt;&amp;lt;trial congruenttrial&amp;gt;&lt;br/&gt;/ ontrialbegin = [if(script.currentblock=="&lt;strong&gt;practicebloc&lt;/strong&gt;k")&lt;br/&gt;&lt;strong&gt;{&lt;br/&gt;values.stimtype=counter.pcongruentstimtype.selectedvalue;&lt;br/&gt;values.cresp=counter.pcongruentcresp.selectedvalue;&lt;br/&gt;} &lt;/strong&gt;&lt;br/&gt;else&lt;br/&gt;{&lt;br/&gt;values.stimtype=counter.congruentstimtype.selectedvalue;&lt;br/&gt;values.cresp=counter.congruentcresp.selectedvalue;&lt;br/&gt;}]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;There is no &amp;lt;block&amp;gt; called "practiceblock" in your script, the respective block is called "simonpracticeblock". Thus you'll always sample from the &amp;lt;counter&amp;gt; elements designated for the test-block, never from those designated for the practice-block.&lt;br/&gt;&lt;br/&gt;Beyond that I am (a) unable to spot any mistake that would cause conditions to "go off" and (b) unable to reproduce conditions "going off" empirically. The test-block will give exactly 40 congruent (20 x stimtype 2, 20 x stimtype 3) , 40 incongruent (20 x stimtype 1, 20 x stimtype 4) and 40 neutral (20 x stimtype 5, 20 x stimtype 6) trials.&lt;br/&gt;</description><pubDate>Wed, 04 Feb 2015 10:24:17 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>