﻿<?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  » Conditional branching</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Wed, 16 Sep 2026 01:18:33 GMT</lastBuildDate><ttl>20</ttl><item><title>Conditional branching</title><link>https://forums.millisecond.com/Topic21358.aspx</link><description>Dear Inquisit forum, I have a slight issue based on conditional branching - effectively I need one trial to branch to another trial based on a valid response within specific latencies. The participant will see a countdown, followed by a stimulus once the countdown finishes. If the participant responds within 150ms either side of the stimulus presented (i.e., a total window of 300ms), then the trial needs to branch to one trial. If the participant responds outside of this window, or fails to respond at all, then the trial needs to branch to another. In this instance, the stimulus (BulbL) is presented at 4000ms, so I have tried:&lt;br/&gt;&lt;br/&gt;&amp;lt;trial selfcountdownprac500&amp;gt;&lt;br/&gt;/stimulustimes = [1 = middle, PA_Name; 4000 = BulbL; 4100 = whiterectangle2]&lt;br/&gt;/ontrialbegin = [trial.selfcountdownprac500.insertstimulustime(list.countdown_500.nextvalue, 1000)]&lt;br/&gt;/ontrialbegin = [trial.selfcountdownprac500.insertstimulustime(list.countdown_500.nextvalue, 2000)]&lt;br/&gt;/ontrialbegin = [trial.selfcountdownprac500.insertstimulustime(list.countdown_500.nextvalue, 3000)]&lt;br/&gt;/beginresponsetime = 3000&lt;br/&gt;/validresponse = ("q")&lt;br/&gt;/branch = [if(trial.selfcountdownprac500.elapsedtime&amp;gt;3850 &amp;amp;&amp;amp; trial.selfcountdownprac500.elapsedtime&amp;lt;4150 &amp;amp;&amp;amp; trial.selfcountdownprac500.response == "q") trial.selfprac500 else&amp;nbsp;(trial.selfcountdownprac500.elapsedtime&amp;lt;3850 &amp;amp;&amp;amp; trial.selfcountdownprac500.elapsedtime&amp;gt;4150) trial.selfclickprac500error]&lt;br/&gt;/recorddata = false&lt;br/&gt;/timeout = 4200&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;However, this is simply not working, and not branching at all (i.e., it begins the trial again). I also need the trial to not advance to the next trial immediately; i.e., register the response, but not advance to the next trial on registering the response (hence the timeout). I realise I am probably making a fatal error somewhere, and may not even involve what I have attempted here, as I am not adept at using conditional logic, so any assistance would be greatly appreciated. There might be a very simple solution, as a part of me feels that I have overcomplicated this procedure in my head.&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;Josh&lt;br/&gt;&lt;br/&gt;</description><pubDate>Wed, 26 Apr 2017 07:52:20 GMT</pubDate><dc:creator>Psych_Josh</dc:creator></item><item><title>RE: Conditional branching</title><link>https://forums.millisecond.com/Topic21434.aspx</link><description>&lt;div data-id="21432" class="if-quote-wrapper" unselectable="on" data-guid="1493218262319"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21432" 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="21432" 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="21432" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, April 26, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21432"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21430" class="if-quote-wrapper" unselectable="on" data-guid="1493218262319"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21430" 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="21430" 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="21430" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Psych_Josh - Wednesday, April 26, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21430"&gt;&lt;div class="if-quote-message-margin"&gt;Hi Dave - hopefully this is my last query - I was wondering if it were possible to use a list element for a timeout attribute? I'm afraid the simple answer might be no - however, I would like to essentially terminate a trial after a random interval, so that I have:&lt;br/&gt;&lt;br/&gt;&amp;lt;list waiting&amp;gt;&lt;br/&gt;/items = (300, 400, 500, 650, 800, 1000, 1500)&lt;br/&gt;/poolsize = 7&lt;br/&gt;/replace = true&lt;br/&gt;/selectionmode = random&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial waiting_s_1_500&amp;gt;&lt;br/&gt;/stimulustimes = [100 = waitingstim]&lt;br/&gt;/timeout = [list.waiting.nextvalue]&lt;br/&gt;/branch = [trial.selftraining1countdownprac500]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;etc.&lt;br/&gt;&lt;br/&gt;However, as you can imagine, Inquisit tells me that it contains an unknown element or property name - would it be possible to point me in the right direction (and I apologise if the solution is frustratingly simple)?&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;Josh&lt;a class="if-quote-goto quote-link" href="#" data-id="21430"&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;Yes. It's perfectly possible to do. The proper syntax should be&lt;br/&gt;&lt;br/&gt;/ timeout = list.waiting.nextvalue&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21432"&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;Hi Dave - many thanks - I had made a mistake in placing squared brackets around&amp;nbsp;list.waiting.nextvalue, which was producing an error message.&lt;br/&gt;&lt;br/&gt;Thanks again!</description><pubDate>Wed, 26 Apr 2017 07:52:20 GMT</pubDate><dc:creator>Psych_Josh</dc:creator></item><item><title>RE: Conditional branching</title><link>https://forums.millisecond.com/Topic21432.aspx</link><description>&lt;div data-id="21430" class="if-quote-wrapper" unselectable="on" data-guid="1493217558797"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21430" 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="21430" 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="21430" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Psych_Josh - Wednesday, April 26, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21430"&gt;&lt;div class="if-quote-message-margin"&gt;Hi Dave - hopefully this is my last query - I was wondering if it were possible to use a list element for a timeout attribute? I'm afraid the simple answer might be no - however, I would like to essentially terminate a trial after a random interval, so that I have:&lt;br/&gt;&lt;br/&gt;&amp;lt;list waiting&amp;gt;&lt;br/&gt;/items = (300, 400, 500, 650, 800, 1000, 1500)&lt;br/&gt;/poolsize = 7&lt;br/&gt;/replace = true&lt;br/&gt;/selectionmode = random&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial waiting_s_1_500&amp;gt;&lt;br/&gt;/stimulustimes = [100 = waitingstim]&lt;br/&gt;/timeout = [list.waiting.nextvalue]&lt;br/&gt;/branch = [trial.selftraining1countdownprac500]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;etc.&lt;br/&gt;&lt;br/&gt;However, as you can imagine, Inquisit tells me that it contains an unknown element or property name - would it be possible to point me in the right direction (and I apologise if the solution is frustratingly simple)?&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;Josh&lt;a class="if-quote-goto quote-link" href="#" data-id="21430"&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;Yes. It's perfectly possible to do. The proper syntax should be&lt;br/&gt;&lt;br/&gt;/ timeout = list.waiting.nextvalue&lt;br/&gt;</description><pubDate>Wed, 26 Apr 2017 07:40:22 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Conditional branching</title><link>https://forums.millisecond.com/Topic21430.aspx</link><description>Hi Dave - hopefully this is my last query - I was wondering if it were possible to use a list element for a timeout attribute? I'm afraid the simple answer might be no - however, I would like to essentially terminate a trial after a random interval, so that I have:&lt;br/&gt;&lt;br/&gt;&amp;lt;list waiting&amp;gt;&lt;br/&gt;/items = (300, 400, 500, 650, 800, 1000, 1500)&lt;br/&gt;/poolsize = 7&lt;br/&gt;/replace = true&lt;br/&gt;/selectionmode = random&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial waiting_s_1_500&amp;gt;&lt;br/&gt;/stimulustimes = [100 = waitingstim]&lt;br/&gt;/timeout = [list.waiting.nextvalue]&lt;br/&gt;/branch = [trial.selftraining1countdownprac500]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;etc.&lt;br/&gt;&lt;br/&gt;However, as you can imagine, Inquisit tells me that it contains an unknown element or property name - would it be possible to point me in the right direction (and I apologise if the solution is frustratingly simple)?&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;Josh</description><pubDate>Wed, 26 Apr 2017 03:55:04 GMT</pubDate><dc:creator>Psych_Josh</dc:creator></item><item><title>RE: Conditional branching</title><link>https://forums.millisecond.com/Topic21423.aspx</link><description>Hi Dave,&lt;br/&gt;&lt;br/&gt;I tried various formats, and thankfully .mov did not encounter the error - thanks for your suggestion.&lt;br/&gt;&lt;br/&gt;Josh</description><pubDate>Tue, 25 Apr 2017 07:37:50 GMT</pubDate><dc:creator>Psych_Josh</dc:creator></item><item><title>RE: Conditional branching</title><link>https://forums.millisecond.com/Topic21420.aspx</link><description>&lt;div data-id="21419" class="if-quote-wrapper" unselectable="on" data-guid="1493129226341"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21419" 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="21419" 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="21419" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Psych_Josh - Tuesday, April 25, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21419"&gt;&lt;div class="if-quote-message-margin"&gt;Hi Dave, thank you very much for you assistance - I thought latency and elapsed time would operate similarly in this instance, but your fix has provided relief!&lt;br/&gt;&lt;br/&gt;I have another small, unrelated problem that has arisen - I can start another 'Question' or thread if you'd prefer, but, for now, I am having trouble with a video stimulus not fully erasing after presentation. Essentially I present a video stimulus, and whenever it continues to the next screen (whether it's another trial or block), a white shape of the same area/size as the video (in this instance, a medium-sized square) persists and covers up anything presented afterwards. I've tried multiple methods to my knowledge, but I still cannot remove it/prevent it from happening. If you could point me in the right direction if/when you have time, that would be very much appreciated.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial 1&amp;gt;&lt;br/&gt;/stimulustimes = [1 = clock; 1999 = whiterectangle]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/branch = [trial.2]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial 2&amp;gt;&lt;br/&gt;/stimulustimes = [1 = connecting2]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block FUCK&amp;gt;&lt;br/&gt;/trials = [1 = 1; 2 = 2]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item connecting&amp;gt;&lt;br/&gt;/1 = "Now you will begin the main experiment.&lt;br/&gt;&lt;br/&gt;Press space to search for another Prolific Academic user."&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text connecting&amp;gt;&lt;br/&gt;/fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)&lt;br/&gt;/txcolor = (black)&lt;br/&gt;/items = connecting&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial connecting&amp;gt;&lt;br/&gt;/stimulustimes = [1 = connecting]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/branch = [trial.waiting]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;-----&lt;br/&gt;&lt;br/&gt;&amp;lt;video clock&amp;gt;&lt;br/&gt;/items = ("libet0.avi")&lt;br/&gt;/playthrough = false&lt;br/&gt;/loop = true&lt;br/&gt;/size = (20%, 20%)&lt;br/&gt;&amp;lt;/video&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item waiting&amp;gt;&lt;br/&gt;/1 = "Please wait while we connect you to another user..."&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text waiting&amp;gt;&lt;br/&gt;/fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)&lt;br/&gt;/txcolor = (black)&lt;br/&gt;/items = waiting&lt;br/&gt;/position = (50, 80)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial waiting&amp;gt;&lt;br/&gt;/stimulustimes = [1 = clock, waiting]&lt;br/&gt;/timeout = 1000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;-----&lt;br/&gt;&lt;br/&gt;&amp;lt;item connecting2&amp;gt;&lt;br/&gt;/1 = "You are now connected with another Prolific Academic user!&lt;br/&gt;&lt;br/&gt;Press the space bar to continue."&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text connecting2&amp;gt;&lt;br/&gt;/fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)&lt;br/&gt;/txcolor = (black)&lt;br/&gt;/items = connecting2&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial connecting2&amp;gt;&lt;br/&gt;/stimulustimes = [1 = connecting2]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;-----&lt;br/&gt;&lt;br/&gt;&amp;lt;block connecting&amp;gt;&lt;br/&gt;/trials = [1 = connecting; 2 = waiting; 3 = connecting2]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;Josh&lt;a class="if-quote-goto quote-link" href="#" data-id="21419"&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;Hmm, no spontaneous idea. &lt;br/&gt;(1) Is your Inquisit installation up to date?&lt;br/&gt;(2) Have you tried a different video format?&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 25 Apr 2017 07:08:55 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Conditional branching</title><link>https://forums.millisecond.com/Topic21419.aspx</link><description>Hi Dave, thank you very much for you assistance - I thought latency and elapsed time would operate similarly in this instance, but your fix has provided relief!&lt;br/&gt;&lt;br/&gt;I have another small, unrelated problem that has arisen - I can start another 'Question' or thread if you'd prefer, but, for now, I am having trouble with a video stimulus not fully erasing after presentation. Essentially I present a video stimulus, and whenever it continues to the next screen (whether it's another trial or block), a white shape of the same area/size as the video (in this instance, a medium-sized square) persists and covers up anything presented afterwards. I've tried multiple methods to my knowledge, but I still cannot remove it/prevent it from happening. If you could point me in the right direction if/when you have time, that would be very much appreciated.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial 1&amp;gt;&lt;br/&gt;/stimulustimes = [1 = clock; 1999 = whiterectangle]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/branch = [trial.2]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial 2&amp;gt;&lt;br/&gt;/stimulustimes = [1 = connecting2]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block FUCK&amp;gt;&lt;br/&gt;/trials = [1 = 1; 2 = 2]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item connecting&amp;gt;&lt;br/&gt;/1 = "Now you will begin the main experiment.&lt;br/&gt;&lt;br/&gt;Press space to search for another Prolific Academic user."&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text connecting&amp;gt;&lt;br/&gt;/fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)&lt;br/&gt;/txcolor = (black)&lt;br/&gt;/items = connecting&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial connecting&amp;gt;&lt;br/&gt;/stimulustimes = [1 = connecting]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;/branch = [trial.waiting]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;-----&lt;br/&gt;&lt;br/&gt;&amp;lt;video clock&amp;gt;&lt;br/&gt;/items = ("libet0.avi")&lt;br/&gt;/playthrough = false&lt;br/&gt;/loop = true&lt;br/&gt;/size = (20%, 20%)&lt;br/&gt;&amp;lt;/video&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item waiting&amp;gt;&lt;br/&gt;/1 = "Please wait while we connect you to another user..."&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text waiting&amp;gt;&lt;br/&gt;/fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)&lt;br/&gt;/txcolor = (black)&lt;br/&gt;/items = waiting&lt;br/&gt;/position = (50, 80)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial waiting&amp;gt;&lt;br/&gt;/stimulustimes = [1 = clock, waiting]&lt;br/&gt;/timeout = 1000&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;-----&lt;br/&gt;&lt;br/&gt;&amp;lt;item connecting2&amp;gt;&lt;br/&gt;/1 = "You are now connected with another Prolific Academic user!&lt;br/&gt;&lt;br/&gt;Press the space bar to continue."&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text connecting2&amp;gt;&lt;br/&gt;/fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)&lt;br/&gt;/txcolor = (black)&lt;br/&gt;/items = connecting2&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial connecting2&amp;gt;&lt;br/&gt;/stimulustimes = [1 = connecting2]&lt;br/&gt;/correctresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;-----&lt;br/&gt;&lt;br/&gt;&amp;lt;block connecting&amp;gt;&lt;br/&gt;/trials = [1 = connecting; 2 = waiting; 3 = connecting2]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;Josh</description><pubDate>Tue, 25 Apr 2017 03:04:58 GMT</pubDate><dc:creator>Psych_Josh</dc:creator></item><item><title>RE: Conditional branching</title><link>https://forums.millisecond.com/Topic21362.aspx</link><description>&lt;div data-id="21358" class="if-quote-wrapper" unselectable="on" data-guid="1492537065426"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21358" 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="21358" 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="21358" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Psych_Josh - Tuesday, April 18, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21358"&gt;&lt;div class="if-quote-message-margin"&gt;Dear Inquisit forum, I have a slight issue based on conditional branching - effectively I need one trial to branch to another trial based on a valid response within specific latencies. The participant will see a countdown, followed by a stimulus once the countdown finishes. If the participant responds within 150ms either side of the stimulus presented (i.e., a total window of 300ms), then the trial needs to branch to one trial. If the participant responds outside of this window, or fails to respond at all, then the trial needs to branch to another. In this instance, the stimulus (BulbL) is presented at 4000ms, so I have tried:&lt;br/&gt;&lt;br/&gt;&amp;lt;trial selfcountdownprac500&amp;gt;&lt;br/&gt;/stimulustimes = [1 = middle, PA_Name; 4000 = BulbL; 4100 = whiterectangle2]&lt;br/&gt;/ontrialbegin = [trial.selfcountdownprac500.insertstimulustime(list.countdown_500.nextvalue, 1000)]&lt;br/&gt;/ontrialbegin = [trial.selfcountdownprac500.insertstimulustime(list.countdown_500.nextvalue, 2000)]&lt;br/&gt;/ontrialbegin = [trial.selfcountdownprac500.insertstimulustime(list.countdown_500.nextvalue, 3000)]&lt;br/&gt;/beginresponsetime = 3000&lt;br/&gt;/validresponse = ("q")&lt;br/&gt;/branch = [if(trial.selfcountdownprac500.elapsedtime&amp;gt;3850 &amp;amp;&amp;amp; trial.selfcountdownprac500.elapsedtime&amp;lt;4150 &amp;amp;&amp;amp; trial.selfcountdownprac500.response == "q") trial.selfprac500 else&amp;nbsp;(trial.selfcountdownprac500.elapsedtime&amp;lt;3850 &amp;amp;&amp;amp; trial.selfcountdownprac500.elapsedtime&amp;gt;4150) trial.selfclickprac500error]&lt;br/&gt;/recorddata = false&lt;br/&gt;/timeout = 4200&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;However, this is simply not working, and not branching at all (i.e., it begins the trial again). I also need the trial to not advance to the next trial immediately; i.e., register the response, but not advance to the next trial on registering the response (hence the timeout). I realise I am probably making a fatal error somewhere, and may not even involve what I have attempted here, as I am not adept at using conditional logic, so any assistance would be greatly appreciated. There might be a very simple solution, as a part of me feels that I have overcomplicated this procedure in my head.&lt;br/&gt;&lt;br/&gt;Many thanks,&lt;br/&gt;Josh&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21358"&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;A &amp;lt;trial&amp;gt;'s response property returns the numerical keyboard scancode (see Tools -&amp;gt; Keyboard Scancodes...), not "q". Hence &lt;br/&gt;&lt;br/&gt; trial.selfcountdownprac500.response == "q"&lt;br/&gt;&lt;br/&gt;will not work.&lt;br/&gt;&lt;br/&gt;Moreover,&lt;br/&gt;&lt;br/&gt;(trial.selfcountdownprac500.elapsedtime&amp;lt;3850 &amp;amp;&amp;amp; trial.selfcountdownprac500.elapsedtime&amp;gt;4150)&lt;br/&gt;&lt;br/&gt;makes no sense as a condition. The elapsed time cannot be BOTH smaller than 3850 AND greater than 4150 at the same time, i..e the logical AND (&amp;amp;&amp;amp;) makes no sense here.&lt;br/&gt;&lt;br/&gt;In sum, I'd rephrase the /branch a something along the lines of&lt;br/&gt;&lt;br/&gt;/branch = [if(trial.selfcountdownprac500.latency&amp;gt;=850 &amp;amp;&amp;amp; trial.selfcountdownprac500.latency&amp;lt;=1150 &amp;amp;&amp;amp; trial.selfcountdownprac500.response == 16) trial.selfprac500 else&amp;nbsp; trial.selfclickprac500error]&lt;br/&gt;&lt;br/&gt;Side note: The "Q" key is potentially a bad choice. It inhabits different positions on different-language keyboards, and thus will have different scancodes associated with it across languages: The scancode will be 16 on the English QWERTY layout, but not on e.g. a French AZERTY keyboard, where scancode 16 will be associated with the "A" key.. Scancodes reflect physical position of a key on the keyboard, rather than the letter imprinted on it.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 18 Apr 2017 10:54:29 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>