﻿<?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  » Conditional Color</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 17 Sep 2026 18:27:18 GMT</lastBuildDate><ttl>20</ttl><item><title>Conditional Color</title><link>https://forums.millisecond.com/Topic21438.aspx</link><description>I want to update the pursuit rotor task script (where a circle rotates around the screen, and participants have to keep their mouse on the circle) so that the color of the rotating circle changes dependent on whether the mouse is touching it or not. I think the code should look something like:&lt;br/&gt;&lt;br/&gt;if (values.current_targetlocation = 0) {&lt;br/&gt;shape.animatedCircle.color = white&lt;br/&gt;};&lt;br/&gt;else {&lt;br/&gt;shape.animatedCircle.color = blue&lt;br/&gt;}&lt;br/&gt;]&lt;br/&gt;&lt;br/&gt;but I can't figure out where to put this. Is there a way to put if/else statements in the color attribute? Or an attribute within the trial section I could use? /ontrialbegin doesn't seem to work.&lt;br/&gt;</description><pubDate>Wed, 26 Apr 2017 15:14:17 GMT</pubDate><dc:creator>aquirk</dc:creator></item><item><title>RE: Conditional Color</title><link>https://forums.millisecond.com/Topic21442.aspx</link><description>&lt;div data-id="21441" class="if-quote-wrapper" unselectable="on" data-guid="1493244789107"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21441" 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="21441" 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="21441" 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-21441"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="21438" class="if-quote-wrapper" unselectable="on" data-guid="1493244789107"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21438" 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="21438" 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="21438" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;aquirk - 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-21438"&gt;&lt;div class="if-quote-message-margin"&gt;I want to update the pursuit rotor task script (where a circle rotates around the screen, and participants have to keep their mouse on the circle) so that the color of the rotating circle changes dependent on whether the mouse is touching it or not. I think the code should look something like:&lt;br/&gt;&lt;br/&gt;if (values.current_targetlocation = 0) {&lt;br/&gt;shape.animatedCircle.color = white&lt;br/&gt;};&lt;br/&gt;else {&lt;br/&gt;shape.animatedCircle.color = blue&lt;br/&gt;}&lt;br/&gt;]&lt;br/&gt;&lt;br/&gt;but I can't figure out where to put this. Is there a way to put if/else statements in the color attribute? Or an attribute within the trial section I could use? /ontrialbegin doesn't seem to work.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21438"&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;If you wish to use the Inquisit 5-version of the script, it's not technically possible to alter the color mid-trial during &amp;lt;trial rotate&amp;gt; based on whether the mouse is on- or off-target.&lt;br/&gt;&lt;br/&gt;However, you can use the Inquisit 4-version, which is implemented differently due to the lack of bespoke animation features:&lt;br/&gt;&lt;br/&gt;&lt;a href="https://www.millisecond.com/download/library/v4/pursuitrotor/pursuitrotor.iqx"&gt;&lt;a href="https://www.millisecond.com/download/library/v4/pursuitrotor/pursuitrotor.iqx"&gt;https://www.millisecond.com/download/library/v4/pursuitrotor/pursuitrotor.iqx&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The Inquisit 4 version can (and does!) change the color of the circle depending on whether the cursor is on- or off-target.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21441"&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;Thank you!</description><pubDate>Wed, 26 Apr 2017 15:14:17 GMT</pubDate><dc:creator>aquirk</dc:creator></item><item><title>RE: Conditional Color</title><link>https://forums.millisecond.com/Topic21441.aspx</link><description>&lt;div data-id="21438" class="if-quote-wrapper" unselectable="on" data-guid="1493244184437"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21438" 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="21438" 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="21438" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;aquirk - 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-21438"&gt;&lt;div class="if-quote-message-margin"&gt;I want to update the pursuit rotor task script (where a circle rotates around the screen, and participants have to keep their mouse on the circle) so that the color of the rotating circle changes dependent on whether the mouse is touching it or not. I think the code should look something like:&lt;br/&gt;&lt;br/&gt;if (values.current_targetlocation = 0) {&lt;br/&gt;shape.animatedCircle.color = white&lt;br/&gt;};&lt;br/&gt;else {&lt;br/&gt;shape.animatedCircle.color = blue&lt;br/&gt;}&lt;br/&gt;]&lt;br/&gt;&lt;br/&gt;but I can't figure out where to put this. Is there a way to put if/else statements in the color attribute? Or an attribute within the trial section I could use? /ontrialbegin doesn't seem to work.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21438"&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;If you wish to use the Inquisit 5-version of the script, it's not technically possible to alter the color mid-trial during &amp;lt;trial rotate&amp;gt; based on whether the mouse is on- or off-target.&lt;br/&gt;&lt;br/&gt;However, you can use the Inquisit 4-version, which is implemented differently due to the lack of bespoke animation features:&lt;br/&gt;&lt;br/&gt;&lt;a href="https://www.millisecond.com/download/library/v4/pursuitrotor/pursuitrotor.iqx"&gt;https://www.millisecond.com/download/library/v4/pursuitrotor/pursuitrotor.iqx&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The Inquisit 4 version can (and does!) change the color of the circle depending on whether the cursor is on- or off-target.&lt;br/&gt;</description><pubDate>Wed, 26 Apr 2017 15:09:43 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>