﻿<?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  » Send markers to the eye-tracker through   everytime a response is made</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 10 Sep 2026 00:48:18 GMT</lastBuildDate><ttl>20</ttl><item><title>Send markers to the eye-tracker through   everytime a response is made</title><link>https://forums.millisecond.com/Topic30477.aspx</link><description>Inside a trial where a participant can press a button multiple times, I need to send markers to the eye-tracker using &amp;lt;port&amp;gt; for every response given by a participant. I would appreciate some suggestions on how to do this. I can think of branching to another &amp;lt;trial&amp;gt; everytime a button is pressed, but is there a better and less cumbersome solution to this?</description><pubDate>Tue, 19 Jan 2021 23:29:15 GMT</pubDate><dc:creator>nidhi_desai</dc:creator></item><item><title>RE: Send markers to the eye-tracker through   everytime a response is made</title><link>https://forums.millisecond.com/Topic30546.aspx</link><description>&lt;blockquote data-id="30545" class="if-quote-wrapper" unselectable="on" data-guid="1611098945683" contenteditable="false" id="if_insertedNode_1611098945402"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30545" 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="30545" 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="30545" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 1/19/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30545"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="30544" class="if-quote-wrapper" unselectable="on" data-guid="1611098945683" id="if_insertedNode_1611095090216" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30544" 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="30544" 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="30544" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nidhi_desai - 1/19/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30544"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="30478" class="if-quote-wrapper" unselectable="on" data-guid="1611098945683" id="if_insertedNode_1611092495786" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30478" 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="30478" 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="30478" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 1/12/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30478"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="30477" class="if-quote-wrapper" unselectable="on" data-guid="1611098945683" id="if_insertedNode_1610474107697" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30477" 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="30477" 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="30477" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nidhi_desai - 1/12/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30477"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Inside a trial where a participant can press a button multiple times, I need to send markers to the eye-tracker using &amp;lt;port&amp;gt; for every response given by a participant. I would appreciate some suggestions on how to do this. I can think of branching to another &amp;lt;trial&amp;gt; everytime a button is pressed, but is there a better and less cumbersome solution to this?&lt;a class="if-quote-goto quote-link" href="#" data-id="30477"&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;You can send the marker via /responsemessage and you can have a trial accept multiple responses by implementing /stop logic.&lt;br/&gt;&lt;br/&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm"&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm"&gt;https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;For the sake of example, assume you want to allow an unlimited number of pressing either the E or I key for a duration of 10 seconds:&lt;br/&gt;[code]&lt;br/&gt;&amp;lt;block myblock&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;/ stop = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.mytrial.elapsedtime &amp;gt;= 10000;&lt;br/&gt;]&lt;br/&gt;/ stimulustimes = [0=clearscreen,mytext]&lt;br/&gt;/ validresponse = ("E", "I")&lt;br/&gt;/ responsemessage = ("E", Epress, 100)&lt;br/&gt;/ responsemessage = ("I", Ipress, 100)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Press the E and I keys. You have 10 seconds.")&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Epress&amp;gt;&lt;br/&gt;/ items = ("Pressed E")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ipress&amp;gt;&lt;br/&gt;/ items = ("Pressed I")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;&amp;lt;/text&amp;gt;[/code]&lt;br/&gt;&lt;br/&gt;Every time one of the keys is pressed, the respective /responsemessage is triggered. Here, it just displays a &amp;lt;text&amp;gt; on the screen, but you can just as well send a &amp;lt;port&amp;gt; signal via /responsemessage attributes.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="30478"&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;I used this above solution along with /isvalidresponse to dynamically change the value of the text displayed as a response to the button press. I have attached my code here. In it I use the following code to update the values of the text.&amp;nbsp;&lt;br/&gt;[code]&amp;lt;expressions&amp;gt;&lt;br/&gt;/setText = text.Spress.setitem(values.checkS, 1)&lt;br/&gt;&amp;lt;/expressions&amp;gt;[/code]&lt;br/&gt;I am doing this as I need to have the flexibility to have Spress as a text or a port based on if have eye-tracker added in my code. This method was suggested in one of my other post&amp;nbsp;&lt;a href="https://www.millisecond.com/forums/Topic30397.aspx."&gt;&lt;a href="https://www.millisecond.com/forums/Topic30397.aspx."&gt;https://www.millisecond.com/forums/Topic30397.aspx.&lt;/a&gt;&lt;/a&gt; &lt;br/&gt;But this results in the text not displayed when S key is pressed.&amp;nbsp;Could you suggest some solution to this problem or how might I go about having a dynamic value of the response text/port stimuli?&lt;a class="if-quote-goto quote-link" href="#" data-id="30544"&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;I cannot, because that is not possible. Basically, you cannot manipulate the response message stimulus while the trial is running.&lt;a class="if-quote-goto quote-link" href="#" data-id="30545"&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;Thank you for letting me know.</description><pubDate>Tue, 19 Jan 2021 23:29:15 GMT</pubDate><dc:creator>nidhi_desai</dc:creator></item><item><title>RE: Send markers to the eye-tracker through   everytime a response is made</title><link>https://forums.millisecond.com/Topic30545.aspx</link><description>&lt;blockquote data-id="30544" class="if-quote-wrapper" unselectable="on" data-guid="1611095091929" id="if_insertedNode_1611095090216" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30544" 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="30544" 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="30544" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nidhi_desai - 1/19/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30544"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="30478" class="if-quote-wrapper" unselectable="on" data-guid="1611095091929" id="if_insertedNode_1611092495786" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30478" 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="30478" 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="30478" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 1/12/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30478"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="30477" class="if-quote-wrapper" unselectable="on" data-guid="1611095091929" id="if_insertedNode_1610474107697" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30477" 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="30477" 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="30477" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nidhi_desai - 1/12/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30477"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Inside a trial where a participant can press a button multiple times, I need to send markers to the eye-tracker using &amp;lt;port&amp;gt; for every response given by a participant. I would appreciate some suggestions on how to do this. I can think of branching to another &amp;lt;trial&amp;gt; everytime a button is pressed, but is there a better and less cumbersome solution to this?&lt;a class="if-quote-goto quote-link" href="#" data-id="30477"&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;You can send the marker via /responsemessage and you can have a trial accept multiple responses by implementing /stop logic.&lt;br/&gt;&lt;br/&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm"&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm"&gt;https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;For the sake of example, assume you want to allow an unlimited number of pressing either the E or I key for a duration of 10 seconds:&lt;br/&gt;[code]&lt;br/&gt;&amp;lt;block myblock&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;/ stop = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.mytrial.elapsedtime &amp;gt;= 10000;&lt;br/&gt;]&lt;br/&gt;/ stimulustimes = [0=clearscreen,mytext]&lt;br/&gt;/ validresponse = ("E", "I")&lt;br/&gt;/ responsemessage = ("E", Epress, 100)&lt;br/&gt;/ responsemessage = ("I", Ipress, 100)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Press the E and I keys. You have 10 seconds.")&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Epress&amp;gt;&lt;br/&gt;/ items = ("Pressed E")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ipress&amp;gt;&lt;br/&gt;/ items = ("Pressed I")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;&amp;lt;/text&amp;gt;[/code]&lt;br/&gt;&lt;br/&gt;Every time one of the keys is pressed, the respective /responsemessage is triggered. Here, it just displays a &amp;lt;text&amp;gt; on the screen, but you can just as well send a &amp;lt;port&amp;gt; signal via /responsemessage attributes.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="30478"&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;I used this above solution along with /isvalidresponse to dynamically change the value of the text displayed as a response to the button press. I have attached my code here. In it I use the following code to update the values of the text.&amp;nbsp;&lt;br/&gt;[code]&amp;lt;expressions&amp;gt;&lt;br/&gt;/setText = text.Spress.setitem(values.checkS, 1)&lt;br/&gt;&amp;lt;/expressions&amp;gt;[/code]&lt;br/&gt;I am doing this as I need to have the flexibility to have Spress as a text or a port based on if have eye-tracker added in my code. This method was suggested in one of my other post&amp;nbsp;&lt;a href="https://www.millisecond.com/forums/Topic30397.aspx."&gt;&lt;a href="https://www.millisecond.com/forums/Topic30397.aspx."&gt;https://www.millisecond.com/forums/Topic30397.aspx.&lt;/a&gt;&lt;/a&gt; &lt;br/&gt;But this results in the text not displayed when S key is pressed.&amp;nbsp;Could you suggest some solution to this problem or how might I go about having a dynamic value of the response text/port stimuli?&lt;a class="if-quote-goto quote-link" href="#" data-id="30544"&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;I cannot, because that is not possible. Basically, you cannot manipulate the response message stimulus while the trial is running.</description><pubDate>Tue, 19 Jan 2021 22:30:32 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Send markers to the eye-tracker through   everytime a response is made</title><link>https://forums.millisecond.com/Topic30544.aspx</link><description>&lt;blockquote data-id="30478" class="if-quote-wrapper" unselectable="on" data-guid="1611092496351" contenteditable="false" id="if_insertedNode_1611092495786"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30478" 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="30478" 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="30478" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 1/12/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30478"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="30477" class="if-quote-wrapper" unselectable="on" data-guid="1611092496351" id="if_insertedNode_1610474107697" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30477" 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="30477" 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="30477" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nidhi_desai - 1/12/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30477"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Inside a trial where a participant can press a button multiple times, I need to send markers to the eye-tracker using &amp;lt;port&amp;gt; for every response given by a participant. I would appreciate some suggestions on how to do this. I can think of branching to another &amp;lt;trial&amp;gt; everytime a button is pressed, but is there a better and less cumbersome solution to this?&lt;a class="if-quote-goto quote-link" href="#" data-id="30477"&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;You can send the marker via /responsemessage and you can have a trial accept multiple responses by implementing /stop logic.&lt;br/&gt;&lt;br/&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm"&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm"&gt;https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;For the sake of example, assume you want to allow an unlimited number of pressing either the E or I key for a duration of 10 seconds:&lt;br/&gt;[code]&lt;br/&gt;&amp;lt;block myblock&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;/ stop = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.mytrial.elapsedtime &amp;gt;= 10000;&lt;br/&gt;]&lt;br/&gt;/ stimulustimes = [0=clearscreen,mytext]&lt;br/&gt;/ validresponse = ("E", "I")&lt;br/&gt;/ responsemessage = ("E", Epress, 100)&lt;br/&gt;/ responsemessage = ("I", Ipress, 100)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Press the E and I keys. You have 10 seconds.")&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Epress&amp;gt;&lt;br/&gt;/ items = ("Pressed E")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ipress&amp;gt;&lt;br/&gt;/ items = ("Pressed I")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;&amp;lt;/text&amp;gt;[/code]&lt;br/&gt;&lt;br/&gt;Every time one of the keys is pressed, the respective /responsemessage is triggered. Here, it just displays a &amp;lt;text&amp;gt; on the screen, but you can just as well send a &amp;lt;port&amp;gt; signal via /responsemessage attributes.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="30478"&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;I used this above solution along with /isvalidresponse to dynamically change the value of the text displayed as a response to the button press. I have attached my code here. In it I use the following code to update the values of the text.&amp;nbsp;&lt;br/&gt;[code]&amp;lt;expressions&amp;gt;&lt;br/&gt;/setText = text.Spress.setitem(values.checkS, 1)&lt;br/&gt;&amp;lt;/expressions&amp;gt;[/code]&lt;br/&gt;I am doing this as I need to have the flexibility to have Spress as a text or a port based on if have eye-tracker added in my code. This method was suggested in one of my other post&amp;nbsp;&lt;a href="https://www.millisecond.com/forums/Topic30397.aspx."&gt;https://www.millisecond.com/forums/Topic30397.aspx.&lt;/a&gt; &lt;br/&gt;But this results in the text not displayed when S key is pressed.&amp;nbsp;Could you suggest some solution to this problem or how might I go about having a dynamic value of the response text/port stimuli?</description><pubDate>Tue, 19 Jan 2021 21:49:01 GMT</pubDate><dc:creator>nidhi_desai</dc:creator></item><item><title>RE: Send markers to the eye-tracker through   everytime a response is made</title><link>https://forums.millisecond.com/Topic30478.aspx</link><description>&lt;blockquote data-id="30477" class="if-quote-wrapper" unselectable="on" data-guid="1610474108469" id="if_insertedNode_1610474107697" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="30477" 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="30477" 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="30477" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nidhi_desai - 1/12/2021&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-30477"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Inside a trial where a participant can press a button multiple times, I need to send markers to the eye-tracker using &amp;lt;port&amp;gt; for every response given by a participant. I would appreciate some suggestions on how to do this. I can think of branching to another &amp;lt;trial&amp;gt; everytime a button is pressed, but is there a better and less cumbersome solution to this?&lt;a class="if-quote-goto quote-link" href="#" data-id="30477"&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;You can send the marker via /responsemessage and you can have a trial accept multiple responses by implementing /stop logic.&lt;br/&gt;&lt;br/&gt;&lt;a href="https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm"&gt;https://www.millisecond.com/support/docs/v6/html/language/attributes/stop_trial.htm&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;For the sake of example, assume you want to allow an unlimited number of pressing either the E or I key for a duration of 10 seconds:&lt;br/&gt;[code]&lt;br/&gt;&amp;lt;block myblock&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;/ stop = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trial.mytrial.elapsedtime &amp;gt;= 10000;&lt;br/&gt;]&lt;br/&gt;/ stimulustimes = [0=clearscreen,mytext]&lt;br/&gt;/ validresponse = ("E", "I")&lt;br/&gt;/ responsemessage = ("E", Epress, 100)&lt;br/&gt;/ responsemessage = ("I", Ipress, 100)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Press the E and I keys. You have 10 seconds.")&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Epress&amp;gt;&lt;br/&gt;/ items = ("Pressed E")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text Ipress&amp;gt;&lt;br/&gt;/ items = ("Pressed I")&lt;br/&gt;/ position = (50%, 90%)&lt;br/&gt;&amp;lt;/text&amp;gt;[/code]&lt;br/&gt;&lt;br/&gt;Every time one of the keys is pressed, the respective /responsemessage is triggered. Here, it just displays a &amp;lt;text&amp;gt; on the screen, but you can just as well send a &amp;lt;port&amp;gt; signal via /responsemessage attributes.&lt;br/&gt;</description><pubDate>Tue, 12 Jan 2021 18:09:35 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>