﻿<?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  » Make a picture pop up upon pressing key buttons</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 05 May 2026 05:01:15 GMT</lastBuildDate><ttl>20</ttl><item><title>Make a picture pop up upon pressing key buttons</title><link>https://forums.millisecond.com/Topic20110.aspx</link><description>Hi,&lt;br/&gt;I'm trying to program an experiment where in every trial, as soon as the participant presses any valid key button, an image will pop up for 1 second and disappear. I'm good with the other parts of the experiment, I just don't know how to make the picture flash upon participants pressing the key. Any one has any ideas? &lt;br/&gt;Greatly appreciated!&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 14 Nov 2016 16:48:05 GMT</pubDate><dc:creator>mingwu</dc:creator></item><item><title>RE: Make a picture pop up upon pressing key buttons</title><link>https://forums.millisecond.com/Topic20111.aspx</link><description>&lt;div data-id="20110" class="if-quote-wrapper" unselectable="on" data-guid="1479170527089"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="20110" 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="20110" 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="20110" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;mingwu - Monday, November 14, 2016&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-20110"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&lt;br/&gt;I'm trying to program an experiment where in every trial, as soon as the participant presses any valid key button, an image will pop up for 1 second and disappear. I'm good with the other parts of the experiment, I just don't know how to make the picture flash upon participants pressing the key. Any one has any ideas? &lt;br/&gt;Greatly appreciated!&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="20110"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;You can either use the &amp;lt;trial&amp;gt;'s /responsemessage attribute or /branch to a separate &amp;lt;trial&amp;gt; that displays the image for the desired amount of time. The latter approach is the one you'll want to use in case you need to log information about the image presented.&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ validresponse = ("d", "k")&lt;br/&gt;/ branch = [if (trial.mytrial.response == 32) trial.d_pic]&lt;br/&gt;/ branch = [if (trial.mytrial.response == 37) trial.k_pic]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial d_pic&amp;gt;&lt;br/&gt;/ stimulusframes = [1=d]&lt;br/&gt;/ validresponse = (0)&lt;br/&gt;/ trialduration = 1000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial k_pic&amp;gt;&lt;br/&gt;/ stimulusframes = [1=k]&lt;br/&gt;/ validresponse = (0)&lt;br/&gt;/ trialduration = 1000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture d&amp;gt;&lt;br/&gt;/ items = ("d1.jpg", "d2.jpg")&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture k&amp;gt;&lt;br/&gt;/ items = ("k1.jpg", "k2.jpg")&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;</description><pubDate>Mon, 14 Nov 2016 16:48:05 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>