﻿<?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 6  » Correct picture name not saving in the 'response' column following mouse click on picture</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sun, 05 Apr 2026 20:00:33 GMT</lastBuildDate><ttl>20</ttl><item><title>Correct picture name not saving in the 'response' column following mouse click on picture</title><link>https://forums.millisecond.com/Topic33889.aspx</link><description>I am about to start editing an experiment file so wanted to fix this issue in it before I started. Last time I ran the experiment there was one place where the data file did not correctly record the image being shown. Luckily I could still work out and recode behaviour, but I think in the interests of making future code available to others etc it would be better to get things saving correctly. Below is the critical bit of the code. In the data file, if participants click on the monster image during the trial, then it records a *different* monster image name in the 'response' column. As there is only one image on screen at a time I can recode it as simply 'clicked on image yes/no' but it's a bit unnerving (I've extensively tested it and luckily the 'values.picname' and 'values.monsterType' variables are recording correctly). It seems totally random as to the picname that appears in the 'response' column in the datafile. I think the errors come about due to the rather complex counterbalancing? Or perhaps it is because I am using multiple ontrialbegin commands in the trial? Any advice appreciated.&lt;br/&gt;&lt;br/&gt;&amp;lt;item monsterImages&amp;gt;&lt;br/&gt;/ 1 ="M1.GIF"&lt;br/&gt;/ 2 ="M2.GIF"&lt;br/&gt;/ 3 ="M3.GIF"&lt;br/&gt;/ 4 ="M4.GIF"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list counterB&amp;gt;&lt;br/&gt;/ items = (1,2,3,4)&lt;br/&gt;/ selectionmode =random&lt;br/&gt;/ selectionrate = experiment&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/pic2 = if (values.counterbalance==3) {4} else {mod(values.counterbalance + 1, 4)}&lt;br/&gt;/pic3 = if (values.counterbalance==2) {4} else {mod(values.counterbalance + 2, 4)}&lt;br/&gt;/pic4 = if (values.counterbalance==1) {4} else {mod(values.counterbalance + 3, 4)}&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list transferTrialType&amp;gt;&lt;br/&gt;/items = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ selectionrate = trial&lt;br/&gt;/replace=false&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/monsterType = " "&lt;br/&gt;/picName = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture goToWinIcePic&amp;gt;&lt;br/&gt;/ items = monsterImages&lt;br/&gt;/ select = values.counterbalance&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture goToWinChocPic&amp;gt;&lt;br/&gt;/ items = monsterImages&lt;br/&gt;/ select = expressions.pic2&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;...&lt;br/&gt;&lt;br/&gt;&amp;lt;trial transferTrial&amp;gt;&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.trialType = list.transferTrialType.nextvalue;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.transferTrial.insertstimulustime(shape.eraser, parameters.fixationduration);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {lots of other commands here using 'if (mod(values.trialType, 4)==x', but not involving the variables below}&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br/&gt;/ ontrialbegin = [&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (mod(values.trialType, 4)==1){&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.transferTrial.insertstimulustime(picture.goToWinIcePic, parameters.fixationduration);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.picName = picture.goToWinIcePic.currentitem; values.monsterType = "goToWinIce"}&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if (mod(values.trialType, 4)==2){&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.transferTrial.insertstimulustime(picture.nogoToWinIcePic, parameters.fixationduration);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.picName = picture.nogoToWinIcePic.currentitem;values.monsterType = "nogoToWinIce"}&lt;br/&gt;.......&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/ validresponse = (goToWinChocPic,nogoToWinChocPic, goToWinIcePic, nogoToWinIcePic, noresponse)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/ ontrialend = [trial.transferTrial.resetstimulusframes();]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block transferTrials&amp;gt;&lt;br/&gt;/ onblockbegin = [values.blockCount +=1; values.trialcount = 0;]&lt;br/&gt;/ trials = [1-20 = transferTrial] &lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = instrumTrials; 2 = pavlovianTrials; 3 = transferTrials]&lt;br/&gt;/onexptbegin = [values.counterbalance  = list.counterB.nextvalue;]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 03 Feb 2022 23:28:09 GMT</pubDate><dc:creator>pops</dc:creator></item><item><title>RE: Correct picture name not saving in the 'response' column following mouse click on picture</title><link>https://forums.millisecond.com/Topic33902.aspx</link><description>&lt;blockquote data-id="33900" class="if-quote-wrapper" unselectable="on" data-guid="1643930875530" id="if_insertedNode_1643930875069" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33900" 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="33900" 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="33900" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;pops - 2/3/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33900"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;That fixed the issue (defining the valid response with /ontrialbegin and referencing that at the /validresponse = part of the script). Thank you so much!&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="33900"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Great! Thanks for letting me know.</description><pubDate>Thu, 03 Feb 2022 23:28:09 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Correct picture name not saving in the 'response' column following mouse click on picture</title><link>https://forums.millisecond.com/Topic33900.aspx</link><description>That fixed the issue (defining the valid response with /ontrialbegin and referencing that at the /validresponse = part of the script). Thank you so much!&lt;br/&gt;</description><pubDate>Thu, 03 Feb 2022 23:15:41 GMT</pubDate><dc:creator>pops</dc:creator></item><item><title>RE: Correct picture name not saving in the 'response' column following mouse click on picture</title><link>https://forums.millisecond.com/Topic33898.aspx</link><description>&lt;blockquote data-id="33897" class="if-quote-wrapper" unselectable="on" data-guid="1643919532440" id="if_insertedNode_1643919531386" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33897" 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="33897" 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="33897" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 2/3/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33897"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="33896" class="if-quote-wrapper" unselectable="on" data-guid="1643919532440" id="if_insertedNode_1643919411964" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33896" 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="33896" 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="33896" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;pops - 2/3/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33896"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="33895" class="if-quote-wrapper" unselectable="on" data-guid="1643919532440" id="if_insertedNode_1643916654228" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33895" 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="33895" 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="33895" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;pops - 2/3/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33895"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;br/&gt;Ah sorry for confusion - only one of the monster pictures is shown on each trial. So the participant can only click on one. But yes, I've defined them all as valid responses which may be the confusion. I'll add a pared down version of the script. Thank youl.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="33895"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;By 'monster pictures' I mean the objects that these appear in in the trial which are the goToWinIcePic, goToWinChocPic etc.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="33896"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Okay, thanks for the clarification. As I mentioned before, your question is not answerable based on a non-functioning code snippet. Please provide something that actually runs and shows the issue.&lt;a class="if-quote-goto quote-link" href="#" data-id="33897"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;&amp;gt; only one of the monster pictures is shown on each trial. So the participant can only click on one.&lt;br/&gt;&lt;br/&gt;Since they're all defined as valid responses, a click on the location of a given picture object will be accepted &lt;strong&gt;even if&lt;/strong&gt; that object happens to be not shown in the given trial. And since /validresponse options are evaluated in the order given (see my first response), that's the likely reason for the confusion.&lt;br/&gt;&lt;br/&gt;Here's an example:&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;shape redr&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ color = red&lt;br/&gt;/ size = (500px, 500px)&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape greenr&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ color = green&lt;br/&gt;/ size = (500px, 500px)&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial clicktrial&amp;gt;&lt;br/&gt;/ pretrialpause = 500&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (trial.clicktrial.trialcount == 0) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.clicktrial.insertstimulusframe(shape.redr, 1);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.clicktrial.insertstimulusframe(shape.greenr, 1);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;br/&gt;]&lt;br/&gt;/ ontrialend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.clicktrial.resetstimulusframes();&lt;br/&gt;]&lt;br/&gt;/ validresponse = (redr, greenr, noresponse)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ timeout = 5000&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-2 = clicktrial]&lt;br/&gt;&amp;lt;/block&amp;gt;[/code]&lt;br/&gt;&lt;br/&gt;There are two rectangles, equal in size and position, different in color.&lt;br/&gt;The first trial will show the red square. Clicking on it will record "redr" in the response column.&lt;br/&gt;The second trial will show the green square. Clicking on it will also record "redr" in the response column.&lt;br/&gt;(This is actually by design and useful in certain situations.)&lt;br/&gt;&lt;br/&gt;If one does not want this behavior, the way to avoid it is to use a variable:&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;shape redr&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ color = red&lt;br/&gt;/ size = (500px, 500px)&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;shape greenr&amp;gt;&lt;br/&gt;/ shape = rectangle&lt;br/&gt;/ color = green&lt;br/&gt;/ size = (500px, 500px)&lt;br/&gt;/ position = (50%, 50%)&lt;br/&gt;&amp;lt;/shape&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ valid = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial clicktrial&amp;gt;&lt;br/&gt;/ pretrialpause = 500&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.clicktrial.resetstimulusframes();&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (trial.clicktrial.trialcount == 0) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.clicktrial.insertstimulusframe(shape.redr, 1);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.valid = "redr";&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.clicktrial.insertstimulusframe(shape.greenr, 1);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.valid = "greenr";&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;br/&gt;]&lt;br/&gt;/ ontrialend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.clicktrial.resetstimulusframes();&lt;br/&gt;]&lt;br/&gt;/ validresponse = (values.valid, noresponse)&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ timeout = 5000&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-2 = clicktrial]&lt;br/&gt;&amp;lt;/block&amp;gt;[/code]&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 03 Feb 2022 20:45:26 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Correct picture name not saving in the 'response' column following mouse click on picture</title><link>https://forums.millisecond.com/Topic33897.aspx</link><description>&lt;blockquote data-id="33896" class="if-quote-wrapper" unselectable="on" data-guid="1643919413804" id="if_insertedNode_1643919411964" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33896" 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="33896" 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="33896" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;pops - 2/3/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33896"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="33895" class="if-quote-wrapper" unselectable="on" data-guid="1643919413804" id="if_insertedNode_1643916654228" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33895" 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="33895" 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="33895" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;pops - 2/3/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33895"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;br/&gt;Ah sorry for confusion - only one of the monster pictures is shown on each trial. So the participant can only click on one. But yes, I've defined them all as valid responses which may be the confusion. I'll add a pared down version of the script. Thank youl.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="33895"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;By 'monster pictures' I mean the objects that these appear in in the trial which are the goToWinIcePic, goToWinChocPic etc.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="33896"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Okay, thanks for the clarification. As I mentioned before, your question is not answerable based on a non-functioning code snippet. Please provide something that actually runs and shows the issue.</description><pubDate>Thu, 03 Feb 2022 20:18:03 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Correct picture name not saving in the 'response' column following mouse click on picture</title><link>https://forums.millisecond.com/Topic33896.aspx</link><description>&lt;blockquote data-id="33895" class="if-quote-wrapper" unselectable="on" data-guid="1643916656007" id="if_insertedNode_1643916654228" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33895" 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="33895" 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="33895" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;pops - 2/3/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33895"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;br/&gt;Ah sorry for confusion - only one of the monster pictures is shown on each trial. So the participant can only click on one. But yes, I've defined them all as valid responses which may be the confusion. I'll add a pared down version of the script. Thank youl.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="33895"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;By 'monster pictures' I mean the objects that these appear in in the trial which are the goToWinIcePic, goToWinChocPic etc.&lt;br/&gt;</description><pubDate>Thu, 03 Feb 2022 19:32:00 GMT</pubDate><dc:creator>pops</dc:creator></item><item><title>RE: Correct picture name not saving in the 'response' column following mouse click on picture</title><link>https://forums.millisecond.com/Topic33895.aspx</link><description>&lt;br/&gt;Ah sorry for confusion - only one of the monster pictures is shown on each trial. So the participant can only click on one. But yes, I've defined them all as valid responses which may be the confusion. I'll add a pared down version of the script. Thank youl.&lt;br/&gt;</description><pubDate>Thu, 03 Feb 2022 19:27:07 GMT</pubDate><dc:creator>pops</dc:creator></item><item><title>RE: Correct picture name not saving in the 'response' column following mouse click on picture</title><link>https://forums.millisecond.com/Topic33890.aspx</link><description>&lt;blockquote data-id="33889" class="if-quote-wrapper" unselectable="on" data-guid="1643890755381" id="if_insertedNode_1643890754671" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="33889" 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="33889" 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="33889" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;pops - 2/3/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-33889"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;I am about to start editing an experiment file so wanted to fix this issue in it before I started. Last time I ran the experiment there was one place where the data file did not correctly record the image being shown. Luckily I could still work out and recode behaviour, but I think in the interests of making future code available to others etc it would be better to get things saving correctly. Below is the critical bit of the code. In the data file, if participants click on the monster image during the trial, then it records a *different* monster image name in the 'response' column. As there is only one image on screen at a time I can recode it as simply 'clicked on image yes/no' but it's a bit unnerving (I've extensively tested it and luckily the 'values.picname' and 'values.monsterType' variables are recording correctly). It seems totally random as to the picname that appears in the 'response' column in the datafile. I think the errors come about due to the rather complex counterbalancing? Or perhaps it is because I am using multiple ontrialbegin commands in the trial? Any advice appreciated.&lt;br/&gt;&lt;br/&gt;&amp;lt;item monsterImages&amp;gt;&lt;br/&gt;/ 1 ="M1.GIF"&lt;br/&gt;/ 2 ="M2.GIF"&lt;br/&gt;/ 3 ="M3.GIF"&lt;br/&gt;/ 4 ="M4.GIF"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list counterB&amp;gt;&lt;br/&gt;/ items = (1,2,3,4)&lt;br/&gt;/ selectionmode =random&lt;br/&gt;/ selectionrate = experiment&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/pic2 = if (values.counterbalance==3) {4} else {mod(values.counterbalance + 1, 4)}&lt;br/&gt;/pic3 = if (values.counterbalance==2) {4} else {mod(values.counterbalance + 2, 4)}&lt;br/&gt;/pic4 = if (values.counterbalance==1) {4} else {mod(values.counterbalance + 3, 4)}&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;list transferTrialType&amp;gt;&lt;br/&gt;/items = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)&lt;br/&gt;/ selectionmode = random&lt;br/&gt;/ selectionrate = trial&lt;br/&gt;/replace=false&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/monsterType = " "&lt;br/&gt;/picName = ""&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture goToWinIcePic&amp;gt;&lt;br/&gt;/ items = monsterImages&lt;br/&gt;/ select = values.counterbalance&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture goToWinChocPic&amp;gt;&lt;br/&gt;/ items = monsterImages&lt;br/&gt;/ select = expressions.pic2&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;...&lt;br/&gt;&lt;br/&gt;&amp;lt;trial transferTrial&amp;gt;&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;/ ontrialbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.trialType = list.transferTrialType.nextvalue;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.transferTrial.insertstimulustime(shape.eraser, parameters.fixationduration);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {lots of other commands here using 'if (mod(values.trialType, 4)==x', but not involving the variables below}&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br/&gt;/ ontrialbegin = [&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (mod(values.trialType, 4)==1){&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.transferTrial.insertstimulustime(picture.goToWinIcePic, parameters.fixationduration);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.picName = picture.goToWinIcePic.currentitem; values.monsterType = "goToWinIce"}&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if (mod(values.trialType, 4)==2){&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.transferTrial.insertstimulustime(picture.nogoToWinIcePic, parameters.fixationduration);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;values.picName = picture.nogoToWinIcePic.currentitem;values.monsterType = "nogoToWinIce"}&lt;br/&gt;.......&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/ validresponse = (goToWinChocPic,nogoToWinChocPic, goToWinIcePic, nogoToWinIcePic, noresponse)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/ ontrialend = [trial.transferTrial.resetstimulusframes();]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block transferTrials&amp;gt;&lt;br/&gt;/ onblockbegin = [values.blockCount +=1; values.trialcount = 0;]&lt;br/&gt;/ trials = [1-20 = transferTrial] &lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = instrumTrials; 2 = pavlovianTrials; 3 = transferTrials]&lt;br/&gt;/onexptbegin = [values.counterbalance  = list.counterB.nextvalue;]&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="33889"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Perhaps you could post code that one can actually run to see the issue (your description is not exactly clear) and also provide the images and any other files said code requires to run.&lt;br/&gt;&lt;br/&gt;What's especially confusing is your statement that "it records a *different* monster image name in the 'response' column." since the response column does not record image names. It records the response given, which in the case of &amp;lt;trial transferTrial&amp;gt; is a click on one of the objects defined in its /validresponse.&lt;br/&gt;&lt;br/&gt; / validresponse = (goToWinChocPic,nogoToWinChocPic, goToWinIcePic, nogoToWinIcePic, noresponse)&lt;br/&gt;&lt;br/&gt;The response options listed are checked in the order given, left to right. So, if goToWinChocPic and nogoToWinChocPic overlap in size / position, a *perceived* click on the latter is actually a click on the former if the click occurred in the area where the two objects overlap. Whether that is the case in your script cannot be ascertained, since you have not provided the relevant information -- runnable code, including the images.&lt;br/&gt;</description><pubDate>Thu, 03 Feb 2022 12:27:48 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>