Using Cedrus Response Box to shift slider cursor left and right for Visual Analogue Scale (VAS)


Using Cedrus Response Box to shift slider cursor left and right for...
Author
Message
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
WarrenL
WarrenL
Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)
Group: Forum Members
Posts: 12, Visits: 102
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.

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.

Cheers
Warren



WarrenL
WarrenL
Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)
Group: Forum Members
Posts: 12, Visits: 102
Hi guys,

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 http://www.millisecond.com/support/docs/v4/html/howto/cedrusresponse.htm), 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. 

The current code has a single <slider> stimulus per <surveypage> 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.

Is there any possibility of having the response box keys similarly emulate the left and right keyboard arrow keys  in the <slider> stimulus? If not, is there another way around this? I've seen your code for a VAS using the <trial> element rather than the <slider> stimulus but I'm not quite sure how to imitate the shifting of the arrow.

Any help at all would be excellent - you are always a huge help! I've added the <slider> code below that I am using (with the keyboard).

Thanks,
Warren

______

<defaults>
/ screencolor = white
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 0)
/ txcolor = black
/ inputdevice = mouse
</defaults>

<data>
/ separatefiles = true
/ columns = [date, time, group, subject, trialcode, blockcode, blocknum, trialnum, latency, response,
correct, stimulusnumber, stimulusitem, values.trialcurrenttime, values.trialelapsedtime ]
</data>

<summarydata>
/file = "ANT_task_summary.iqdat"
/columns = [script.startdate, script.starttime, script.subjectid,
]
</summarydata>
--------------------------------------------
****STIMULI****
--------------------------------------------

<text captioncrave>
/items = ("How severe is your craving for alcohol RIGHT NOW")
/ height = 40%
</text>

<text captionanxiety>
/items = ("How severe is your anxiety RIGHT NOW")
/ height = 40%
</text>

<text labelnocrave>
/items = ("No craving")
/fontstyle = ("arial", 36, false, false, false, false, 5)
/ hposition = 12%
/ vposition = 53%
/ hjustify = center
</text>

<text labelhighcrave>
/items = ("Very severe craving")
/ fontstyle = ("arial", 36, false, false, false, false, 5)
/ hposition = 88%
/ vposition = 53%
/ hjustify = center
</text>

<text labelnoanxiety>
/items = ("No anxiety")
/fontstyle = ("arial", 36, false, false, false, false, 5)
/ hposition = 12%
/ vposition = 53%
/ hjustify = center
</text>

<text labelhighanxiety>
/items = ("Very severe anxiety")
/ fontstyle = ("arial", 36, false, false, false, false, 5)
/ hposition = 88%
/ vposition = 53%
/ hjustify = center
</text>


<slider VAScrave>
/ range = (1, 100)
/ position = (15%,50%)
/ slidersize = (60, 5%)
/ showtooltips = false

</slider>

<slider VASanxiety>
/ range = (1, 100)
/ position = (15%,50%)
/ slidersize = (60, 5%)
/ showtooltips = false

</slider>

<clock timer>
/ mode = timer
/ resetrate = trial
/ txcolor = black
/ txbgcolor = white
/ timeout = 10000
/ position = (50%, 80%)
/ format = "s"
</clock>


--------------------------------------------
****TRIALS****
--------------------------------------------

<values>

/ trialcurrenttime = 0
/trialelapsedtime = 0

</values>

<surveypage VAScravepage>
/ fontstyle = ("Verdana", -16, true, false, false, false, 5, 0)
/ stimulusframes = [1=captioncrave, timer, labelnocrave, labelhighcrave]
/ questions = [1=Vascrave]
/timeout = 10000
/ontrialbegin = [values.trialcurrenttime = script.currenttime]
/ontrialend = [values.trialelapsedtime = script.elapsedtime]

</surveypage>

<surveypage VASanxietypage>
/ fontstyle = ("Verdana", -16, true, false, false, false, 5, 0)
/ stimulusframes = [1=captionanxiety, timer, labelnoanxiety, labelhighanxiety]
/ questions = [1=Vasanxiety]
/timeout = 10000
/ontrialbegin = [values.trialcurrenttime = script.currenttime]
/ontrialend = [values.trialelapsedtime = script.elapsedtime]


</surveypage>

--------------------------------------------
****BLOCKS****
--------------------------------------------



<block posblock>
/ trials = [1=vasanxietypage; 2=vascravepage]
</block>


<expt>
/ blocks = [1-30=posblock]

</expt>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search