﻿<?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  » Operator "Logical OR"</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 22 Sep 2026 08:31:34 GMT</lastBuildDate><ttl>20</ttl><item><title>Operator "Logical OR"</title><link>https://forums.millisecond.com/Topic17974.aspx</link><description>Hello,&lt;br/&gt;&lt;br/&gt;I am programming my own version of the stroop task in which I need correct responses, incorrect responses and ommission errors counted singularly. My problem is that I think I made a mistake how to use the operator OR and inquisit does not what I want it to. As an example:&lt;br/&gt;&lt;br/&gt;&amp;lt;trial greencontrol_easy&amp;gt; &lt;br/&gt;/ontrialbegin = [values.count_control.easy += 1]&lt;br/&gt;/ontrialbegin = [values.congruency = 3]&lt;br/&gt;/ pretrialpause = 250&lt;br/&gt;/ stimulustimes = [0= fixation; 500=greencontrol_easy]&lt;br/&gt;/ correctresponse = ("f")&lt;br/&gt;/ validresponse = ("d", "f", "j")&lt;br/&gt;/ timeout = 2000&lt;br/&gt;/ errormessage = true(x, 400)&lt;br/&gt;/ontrialend = [if (trial.greencontrol_easy.correct) {values.countcorrect_control.easy += 1; values.sumrt_control.easy += trial.greencontrol_easy.latency}]&lt;br/&gt;/ontrialend = [if (trial.greencontrol_easy.response == 0 ) {values.control_oe_easy += 1; values.sumrt_control_oe_easy += trial.greencontrol_easy.latency}]&lt;br/&gt;/ontrialend = [if (trial.greencontrol_easy.response == "j"|| trial.greencontrol_easy.response =="d" ) {values.incorrect_control_easy += 1; values.sumrt_control_incorrect_easy += trial.greencontrol_easy.latency}]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;The last bit  [if (trial.greencontrol_easy.response == "j"|| trial.greencontrol_easy.response =="d" ) is supposed to count the wrong button presses to the incorrect trials but it doesnt work. Meaning, if the subject presses either "j" or "d", it is a wrong answer, thus it gets added to the values.incorrect_control_easy. BUt it doesnt work. Inquisit runs the entire, no question. But mistakes don't get counted.&lt;br/&gt;What did I do wrong?&lt;br/&gt;If you think you need the entire script, just let me know, I can send it to you as well.&lt;br/&gt;&lt;br/&gt;Thanks.&lt;br/&gt;Regards,&lt;br/&gt;Ulrike Nestler&lt;br/&gt;</description><pubDate>Mon, 14 Dec 2015 08:51:01 GMT</pubDate><dc:creator>Ulrike Nestler</dc:creator></item><item><title>RE: Operator "Logical OR"</title><link>https://forums.millisecond.com/Topic17975.aspx</link><description>The problem isn't the OR operator. The problem is that the response-property *does not* return the "literal" key (e.g. "d" or "k"). It returns the respective numerical keyboard scancode. Thus&lt;br/&gt;&lt;br/&gt;if (trial.greencontrol_easy.response == "j" || trial.greencontrol_easy.response == "d")&lt;br/&gt;&lt;br/&gt;ought to actually read&lt;br/&gt;&lt;br/&gt;if (trial.greencontrol_easy.response == 36 || trial.greencontrol_easy.response == 32)&lt;br/&gt;&lt;br/&gt;For details see the "Keyboard Scan Codes" topic in the documentation as well as Tools -&amp;gt; Keyboard Scancodes...&lt;br/&gt;</description><pubDate>Mon, 14 Dec 2015 08:51:01 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>