﻿<?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  » Using Cedrus Response Box to shift slider cursor left and right for Visual Analogue Scale (VAS)</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 14 Apr 2026 08:21:06 GMT</lastBuildDate><ttl>20</ttl><item><title>Using Cedrus Response Box to shift slider cursor left and right for Visual Analogue Scale (VAS)</title><link>https://forums.millisecond.com/Topic14265.aspx</link><description>Hi guys,&lt;br/&gt;&lt;br/&gt;I've created a slider stimulus for a Visual Analogue scale that I want to implement in a couple of fMRI studies. The issue I have is that I will need to employ a Cedrus Response Box (fantastic troubleshoot page incidentally, if other users are interested&amp;nbsp;&lt;a href="http://www.millisecond.com/support/docs/v4/html/howto/cedrusresponse.htm),"&gt;http://www.millisecond.com/support/docs/v4/html/howto/cedrusresponse.htm),&lt;/a&gt; and in doing so I am unsure how to use the response box buttons to shift the slider arrow back and forth along the x-axis line as is usually carried out by the keyboard.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;The current code has a single &amp;lt;slider&amp;gt; stimulus per &amp;lt;surveypage&amp;gt; displaying a range of 0-100, and participants use the keyboard to shift the slider arrow in the position they require; after a 10000ms timeout the response is recorded for the last position of the slider arrow. &lt;br/&gt;&lt;br/&gt;Is there any possibility of having the response box keys similarly emulate the left and right keyboard arrow keys &amp;nbsp;in the &amp;lt;slider&amp;gt; stimulus? If not, is there another way around this? I've seen your code for a VAS using the &amp;lt;trial&amp;gt; element rather than the &amp;lt;slider&amp;gt; stimulus but I'm not quite sure how to imitate the shifting of the arrow.&lt;br/&gt;&lt;br/&gt;Any help at all would be excellent - you are always a huge help! I've added the &amp;lt;slider&amp;gt; code below that I am using (with the keyboard).&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;Warren&lt;br/&gt;&lt;br/&gt;______&lt;br/&gt;&lt;br/&gt;&amp;lt;defaults&amp;gt;&lt;br/&gt;/ screencolor = white&lt;br/&gt;/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 0)&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ inputdevice = mouse&lt;br/&gt;&amp;lt;/defaults&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ separatefiles = true&lt;br/&gt;/ columns = [date, time, group, subject, trialcode, blockcode, blocknum, trialnum, latency, response, &lt;br/&gt;correct, stimulusnumber, stimulusitem, values.trialcurrenttime, values.trialelapsedtime ]&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;summarydata&amp;gt;&lt;br/&gt;/file = "ANT_task_summary.iqdat"&lt;br/&gt;/columns = [script.startdate, script.starttime, script.subjectid,&lt;br/&gt;]&lt;br/&gt;&amp;lt;/summarydata&amp;gt;&lt;br/&gt;--------------------------------------------&lt;br/&gt;****STIMULI****&lt;br/&gt;--------------------------------------------&lt;br/&gt;&lt;br/&gt;&amp;lt;text captioncrave&amp;gt;&lt;br/&gt;/items = ("How severe is your craving for alcohol RIGHT NOW")&lt;br/&gt;/ height = 40%&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text captionanxiety&amp;gt;&lt;br/&gt;/items = ("How severe is your anxiety RIGHT NOW")&lt;br/&gt;/ height = 40%&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text labelnocrave&amp;gt;&lt;br/&gt;/items = ("No craving")&lt;br/&gt;/fontstyle = ("arial", 36, false, false, false, false, 5)&lt;br/&gt;/ hposition = 12%&lt;br/&gt;/ vposition = 53%&lt;br/&gt;/ hjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text labelhighcrave&amp;gt;&lt;br/&gt;/items = ("Very severe craving")&lt;br/&gt;/ fontstyle = ("arial", 36, false, false, false, false, 5)&lt;br/&gt;/ hposition = 88%&lt;br/&gt;/ vposition = 53%&lt;br/&gt;/ hjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text labelnoanxiety&amp;gt;&lt;br/&gt;/items = ("No anxiety")&lt;br/&gt;/fontstyle = ("arial", 36, false, false, false, false, 5)&lt;br/&gt;/ hposition = 12%&lt;br/&gt;/ vposition = 53%&lt;br/&gt;/ hjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text labelhighanxiety&amp;gt;&lt;br/&gt;/items = ("Very severe anxiety")&lt;br/&gt;/ fontstyle = ("arial", 36, false, false, false, false, 5)&lt;br/&gt;/ hposition = 88%&lt;br/&gt;/ vposition = 53%&lt;br/&gt;/ hjustify = center&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;slider VAScrave&amp;gt;&lt;br/&gt;/ range = (1, 100)&lt;br/&gt;/ position = (15%,50%)&lt;br/&gt;/ slidersize = (60, 5%)&lt;br/&gt;/ showtooltips = false&lt;br/&gt;&lt;br/&gt;&amp;lt;/slider&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;slider VASanxiety&amp;gt;&lt;br/&gt;/ range = (1, 100)&lt;br/&gt;/ position = (15%,50%)&lt;br/&gt;/ slidersize = (60, 5%)&lt;br/&gt;/ showtooltips = false&lt;br/&gt;&lt;br/&gt;&amp;lt;/slider&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;clock timer&amp;gt;&lt;br/&gt;/ mode = timer&lt;br/&gt;/ resetrate = trial&lt;br/&gt;/ txcolor = black&lt;br/&gt;/ txbgcolor = white&lt;br/&gt;/ timeout = 10000&lt;br/&gt;/ position = (50%, 80%)&lt;br/&gt;/ format = "s"&lt;br/&gt;&amp;lt;/clock&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;--------------------------------------------&lt;br/&gt;****TRIALS****&lt;br/&gt;--------------------------------------------&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;&lt;br/&gt;/ trialcurrenttime = 0&lt;br/&gt;/trialelapsedtime = 0&lt;br/&gt;&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage VAScravepage&amp;gt;&lt;br/&gt;/ fontstyle = ("Verdana", -16, true, false, false, false, 5, 0)&lt;br/&gt;/ stimulusframes = [1=captioncrave, timer, labelnocrave, labelhighcrave]&lt;br/&gt;/ questions = [1=Vascrave] &lt;br/&gt;/timeout = 10000&lt;br/&gt;/ontrialbegin = [values.trialcurrenttime = script.currenttime]&lt;br/&gt;/ontrialend = [values.trialelapsedtime = script.elapsedtime]&lt;br/&gt;&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage VASanxietypage&amp;gt;&lt;br/&gt;/ fontstyle = ("Verdana", -16, true, false, false, false, 5, 0)&lt;br/&gt;/ stimulusframes = [1=captionanxiety, timer, labelnoanxiety, labelhighanxiety]&lt;br/&gt;/ questions = [1=Vasanxiety] &lt;br/&gt;/timeout = 10000&lt;br/&gt;/ontrialbegin = [values.trialcurrenttime = script.currenttime]&lt;br/&gt;/ontrialend = [values.trialelapsedtime = script.elapsedtime]&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;--------------------------------------------&lt;br/&gt;****BLOCKS****&lt;br/&gt;--------------------------------------------&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block posblock&amp;gt;&lt;br/&gt;/ trials = [1=vasanxietypage; 2=vascravepage]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1-30=posblock]&lt;br/&gt;&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 18 Sep 2014 00:37:40 GMT</pubDate><dc:creator>WarrenL</dc:creator></item><item><title>RE: Using Cedrus Response Box to shift slider cursor left and right for Visual Analogue Scale (VAS)</title><link>https://forums.millisecond.com/Topic14267.aspx</link><description>Also see &lt;a href="http://www.millisecond.com/forums/FindPost6989.aspx"&gt;http://www.millisecond.com/forums/FindPost6989.aspx&lt;/a&gt;&lt;br/&gt;</description><pubDate>Thu, 18 Sep 2014 00:37:40 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Using Cedrus Response Box to shift slider cursor left and right for Visual Analogue Scale (VAS)</title><link>https://forums.millisecond.com/Topic14266.aspx</link><description>Sort of answering my own post here... but I've fiddled around a bit using the /branch attributes and separate trials per point of a VAS (e.g., 10 trials for each respective point on a 10 point scale) and managed to come up with a potential solution. &lt;br/&gt;&lt;br/&gt;Will post up here asap as soon as I've ironed out some of the bugs and had it properly defined with the response box.&lt;br/&gt;&lt;br/&gt;Cheers&lt;br/&gt;Warren&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Wed, 17 Sep 2014 20:33:54 GMT</pubDate><dc:creator>WarrenL</dc:creator></item></channel></rss>