﻿<?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 7  » Counting clicks in a trial</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Mon, 23 Nov 2026 23:18:39 GMT</lastBuildDate><ttl>20</ttl><item><title>Counting clicks in a trial</title><link>https://forums.millisecond.com/Topic41495.aspx</link><description>Hi all,&lt;br/&gt;Does anyone know an elegant way to randomize between 'butterfly-trials' in which participants have to click 1, 2, 3 or 4 times to make a video play? Now I made the trials loop in eachother, but it makes the dataframe messy. The first trial in the block should be a one-click-butterfly and the second trial a second-click butterfly, and then they should be at random a one-click, two-click, three-click or four-click butterfly trial.&lt;br/&gt;&lt;br/&gt;thankyou!&lt;br/&gt;&lt;strong&gt;&lt;br/&gt;&amp;lt;block instrumental&amp;gt;&lt;/strong&gt;&lt;br/&gt;/trials = [1 = trial.butterflytrial1; 2= butterflytrial2; 3-10 = random(butterflytrial1, butterflytrial2,butterflytrial3,butterflytrial4)]&lt;br/&gt;/ preInstructions = (instr)&lt;br/&gt;/ timeout = 600000 &lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;&amp;lt;trial butterflytrial1&amp;gt;&lt;/strong&gt;&lt;br/&gt;/stimulustimes = [0 = butterfly]&lt;br/&gt;/inputdevice = touchscreen&lt;br/&gt;/correctresponse = (butterfly)&lt;br/&gt;/responseinterrupt = trial&lt;br/&gt;/branch = {&lt;br/&gt;&amp;nbsp; if (trial.butterflytrial1.correct) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  return trial.videofeedback;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;strong&gt;&amp;lt;trial butterflytrial2&amp;gt;&lt;/strong&gt;&lt;br/&gt;/ stimulustimes = [0= butterfly]&lt;br/&gt;/ inputdevice = touchscreen&lt;br/&gt;/ correctResponse = (butterfly)&lt;br/&gt;/branch= {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (trial.butterflytrial2.correct == true) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  return trial.butterflytrial1;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;/ responseinterrupt = trial&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;strong&gt;&amp;lt;trial butterflytrial3&amp;gt;&lt;/strong&gt;&lt;br/&gt;/ stimulustimes = [0= butterfly]&lt;br/&gt;/ inputdevice = touchscreen&lt;br/&gt;/ correctResponse = (butterfly)&lt;br/&gt;/branch= {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (trial.butterflytrial3.correct == true) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  return trial.butterflytrial2;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;/ responseinterrupt = trial&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;strong&gt;&amp;lt;trial butterflytrial4&amp;gt;&lt;/strong&gt;&lt;br/&gt;/ stimulustimes = [0= butterfly]&lt;br/&gt;/ inputdevice = touchscreen&lt;br/&gt;/ correctResponse = (butterfly)&lt;br/&gt;/branch= {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (trial.butterflytrial4.correct == true) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  return trial.butterflytrial3;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;/ responseinterrupt = trial&lt;br/&gt;&amp;lt;/trial&amp;gt;</description><pubDate>Mon, 11 Aug 2025 12:19:02 GMT</pubDate><dc:creator>Amelinq</dc:creator></item><item><title>RE: Counting clicks in a trial</title><link>https://forums.millisecond.com/Topic41497.aspx</link><description>&lt;blockquote data-id="41495" class="if-quote-wrapper" unselectable="on" data-guid="1754914693739" contenteditable="false" id="if_insertedNode_1754914692560"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="41495" 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="41495" 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="41495" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Amelinq - 8/11/2025&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-41495"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi all,&lt;br/&gt;Does anyone know an elegant way to randomize between 'butterfly-trials' in which participants have to click 1, 2, 3 or 4 times to make a video play? Now I made the trials loop in eachother, but it makes the dataframe messy. The first trial in the block should be a one-click-butterfly and the second trial a second-click butterfly, and then they should be at random a one-click, two-click, three-click or four-click butterfly trial.&lt;br/&gt;&lt;br/&gt;thankyou!&lt;br/&gt;&lt;strong&gt;&lt;br/&gt;&amp;lt;block instrumental&amp;gt;&lt;/strong&gt;&lt;br/&gt;/trials = [1 = trial.butterflytrial1; 2= butterflytrial2; 3-10 = random(butterflytrial1, butterflytrial2,butterflytrial3,butterflytrial4)]&lt;br/&gt;/ preInstructions = (instr)&lt;br/&gt;/ timeout = 600000 &lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;&amp;lt;trial butterflytrial1&amp;gt;&lt;/strong&gt;&lt;br/&gt;/stimulustimes = [0 = butterfly]&lt;br/&gt;/inputdevice = touchscreen&lt;br/&gt;/correctresponse = (butterfly)&lt;br/&gt;/responseinterrupt = trial&lt;br/&gt;/branch = {&lt;br/&gt;&amp;nbsp; if (trial.butterflytrial1.correct) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  return trial.videofeedback;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;strong&gt;&amp;lt;trial butterflytrial2&amp;gt;&lt;/strong&gt;&lt;br/&gt;/ stimulustimes = [0= butterfly]&lt;br/&gt;/ inputdevice = touchscreen&lt;br/&gt;/ correctResponse = (butterfly)&lt;br/&gt;/branch= {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (trial.butterflytrial2.correct == true) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  return trial.butterflytrial1;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;/ responseinterrupt = trial&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;strong&gt;&amp;lt;trial butterflytrial3&amp;gt;&lt;/strong&gt;&lt;br/&gt;/ stimulustimes = [0= butterfly]&lt;br/&gt;/ inputdevice = touchscreen&lt;br/&gt;/ correctResponse = (butterfly)&lt;br/&gt;/branch= {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (trial.butterflytrial3.correct == true) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  return trial.butterflytrial2;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;/ responseinterrupt = trial&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;strong&gt;&amp;lt;trial butterflytrial4&amp;gt;&lt;/strong&gt;&lt;br/&gt;/ stimulustimes = [0= butterfly]&lt;br/&gt;/ inputdevice = touchscreen&lt;br/&gt;/ correctResponse = (butterfly)&lt;br/&gt;/branch= {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (trial.butterflytrial4.correct == true) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;  return trial.butterflytrial3;&lt;br/&gt;&amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;/ responseinterrupt = trial&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="41495"&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;Please provide runnable code, it's entirely impossible to understand what you are doing based on these few uncommented snippets.</description><pubDate>Mon, 11 Aug 2025 12:19:02 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>