﻿<?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  » Cycling through images within a trial via key press</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 13 May 2026 09:27:04 GMT</lastBuildDate><ttl>20</ttl><item><title>Cycling through images within a trial via key press</title><link>https://forums.millisecond.com/Topic29097.aspx</link><description>Hi all,&lt;br/&gt;&lt;br/&gt;I'm currently trying to create an experiment where, in a given trial, one image with a specific brightness level is presented on one side of the screen, and the same image is presented on the other side of the screen at a different brightness level. The task is to adjust the brightness level of the second image to match that of the first.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;My initial idea for doing this was to write code which allowed participants to directly adjust the brightness of one image using something like the slider element, but I don't think this is possible in Iquisit (although I'm relatively new to Inquisit so I could well be wrong).&lt;br/&gt;&lt;br/&gt;My second idea was to load a large set of images (all the same image but with different preset brightness values) and allow participants to scroll through these images in a trial until they find one that matches.&lt;br/&gt;&lt;br/&gt;Can either of these methods be achieved in Inquisit? Any guidance at all would be greatly appreciated as I'm quite lost.&lt;br/&gt;&lt;br/&gt;Thanks in advance! &lt;br/&gt;Lachlan</description><pubDate>Mon, 01 Jun 2020 11:33:13 GMT</pubDate><dc:creator>lachie.kay1</dc:creator></item><item><title>RE: Cycling through images within a trial via key press</title><link>https://forums.millisecond.com/Topic29156.aspx</link><description>&lt;blockquote data-id="29151" class="if-quote-wrapper" unselectable="on" data-guid="1591010630530" id="if_insertedNode_1591010629487" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="29151" 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="29151" 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="29151" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;lachie.kay1 - 6/1/2020&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-29151"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Thanks Dave!&lt;br/&gt;&lt;br/&gt;Does this seem like I'm at all on the right track?&amp;nbsp; Where I'm trying to adjust "rightPic" to match "leftPic"&lt;br/&gt;&lt;br/&gt;(excuse the poorly written code, I'm still very much a novice):&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ Brightness = 3&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item leftPicList&amp;gt;&lt;br/&gt;/ 1 = "leftPic.PNG"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture leftPic&amp;gt;&lt;br/&gt;/ items = leftPicList&lt;br/&gt;/ position = (25, 50)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item rightPicList&amp;gt;&lt;br/&gt;/ 1 = "rightPic_brightness1.PNG"&lt;br/&gt;/ 2 = "rightPic_brightness2.PNG"&lt;br/&gt;/ 3 = "rightPic_brightness3.PNG"&lt;br/&gt;/ 4 = "rightPic_brightness4.PNG"&lt;br/&gt;/ 5 = "rightPic_brightness5.PNG"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture rightPic&amp;gt;&lt;br/&gt;/ items = rightPicList&lt;br/&gt;/ position = (75, 50)&lt;br/&gt;/ select = values.Brightness&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial myTrial&amp;gt;&lt;br/&gt;/ stimulustimes = [1 = leftPic, rightPic ]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = (28, 203, 205)&lt;br/&gt;/ response = free&lt;br/&gt;/ responseinterrupt = trial&lt;br/&gt;/ isvalidresponse = [if (trial.myTrial.response == 205) values.Brightness += 1; picture.rightPic.item]&lt;br/&gt;/ isvalidresponse = [if (trial.myTrial.response == 203) values.Brightness -= 1; picture.rightPic.item]&lt;br/&gt;/ isvalidresponse = [if (trial.myTrial.response == 28) trial.myTrial.next]&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-4 = myTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="29151"&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;Yes, that looks to be on the right track. You, should be using /branch, however, to loop &amp;lt;trial mytrial&amp;gt; unless the subject indicates s/he is done (response 28).&lt;br/&gt;&lt;br/&gt;Here&amp;nbsp;&lt;a href="https://www.millisecond.com/forums/FindPost25178.aspx"&gt;https://www.millisecond.com/forums/FindPost25178.aspx&lt;/a&gt; is an example where a given stimulus's size is increased or decreased depending on key press instead of increasing or decreasing the item number selected for a given stimulus. The overall approach , though, is very similar to what you need.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 01 Jun 2020 11:33:13 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Cycling through images within a trial via key press</title><link>https://forums.millisecond.com/Topic29151.aspx</link><description>Thanks Dave!&lt;br/&gt;&lt;br/&gt;Does this seem like I'm at all on the right track?&amp;nbsp; Where I'm trying to adjust "rightPic" to match "leftPic"&lt;br/&gt;&lt;br/&gt;(excuse the poorly written code, I'm still very much a novice):&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ Brightness = 3&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item leftPicList&amp;gt;&lt;br/&gt;/ 1 = "leftPic.PNG"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture leftPic&amp;gt;&lt;br/&gt;/ items = leftPicList&lt;br/&gt;/ position = (25, 50)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item rightPicList&amp;gt;&lt;br/&gt;/ 1 = "rightPic_brightness1.PNG"&lt;br/&gt;/ 2 = "rightPic_brightness2.PNG"&lt;br/&gt;/ 3 = "rightPic_brightness3.PNG"&lt;br/&gt;/ 4 = "rightPic_brightness4.PNG"&lt;br/&gt;/ 5 = "rightPic_brightness5.PNG"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture rightPic&amp;gt;&lt;br/&gt;/ items = rightPicList&lt;br/&gt;/ position = (75, 50)&lt;br/&gt;/ select = values.Brightness&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial myTrial&amp;gt;&lt;br/&gt;/ stimulustimes = [1 = leftPic, rightPic ]&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ validresponse = (28, 203, 205)&lt;br/&gt;/ response = free&lt;br/&gt;/ responseinterrupt = trial&lt;br/&gt;/ isvalidresponse = [if (trial.myTrial.response == 205) values.Brightness += 1; picture.rightPic.item]&lt;br/&gt;/ isvalidresponse = [if (trial.myTrial.response == 203) values.Brightness -= 1; picture.rightPic.item]&lt;br/&gt;/ isvalidresponse = [if (trial.myTrial.response == 28) trial.myTrial.next]&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-4 = myTrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;</description><pubDate>Mon, 01 Jun 2020 06:24:46 GMT</pubDate><dc:creator>lachie.kay1</dc:creator></item><item><title>RE: Cycling through images within a trial via key press</title><link>https://forums.millisecond.com/Topic29099.aspx</link><description>&lt;blockquote data-id="29097" class="if-quote-wrapper" unselectable="on" data-guid="1590490577512" id="if_insertedNode_1590490576364" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="29097" 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="29097" 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="29097" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;lachie.kay1 - 5/26/2020&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-29097"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi all,&lt;br/&gt;&lt;br/&gt;I'm currently trying to create an experiment where, in a given trial, one image with a specific brightness level is presented on one side of the screen, and the same image is presented on the other side of the screen at a different brightness level. The task is to adjust the brightness level of the second image to match that of the first.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;My initial idea for doing this was to write code which allowed participants to directly adjust the brightness of one image using something like the slider element, but I don't think this is possible in Iquisit (although I'm relatively new to Inquisit so I could well be wrong).&lt;br/&gt;&lt;br/&gt;My second idea was to load a large set of images (all the same image but with different preset brightness values) and allow participants to scroll through these images in a trial until they find one that matches.&lt;br/&gt;&lt;br/&gt;Can either of these methods be achieved in Inquisit? Any guidance at all would be greatly appreciated as I'm quite lost.&lt;br/&gt;&lt;br/&gt;Thanks in advance! &lt;br/&gt;Lachlan&lt;a class="if-quote-goto quote-link" href="#" data-id="29097"&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;The latter option is definitely possible. All you have to do is manipulate the item number up or down per a value in the &amp;lt;picture&amp;gt; element's /select depending on the key press (increase vs decrease brightness).</description><pubDate>Tue, 26 May 2020 10:57:39 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>