Group: Forum Members
Posts: 40,
Visits: 148
|
Hi all, I am programming an experiment in which I would need to record both mouse coordinates and keyboard responses within a single trial: the structure of the experiment looks like this:
<text space> / fontstyle = ("Arial", 18pt, true) / items = ("Press the spacebar to continue") </text>
<trial space> / stimulusframes = [1=space] / inputdevice = keyboard / correctresponse =(57) / validresponse = (57) / posttrialpause = 500 </trial>
<values> /Actiontype=0 /congruency = 0 /object = 0 /length = 0 / x=0 / y=0 /time_sound = (round(rand(60,180))) /time_second_frame = time_sound+60+5 /time_third_frame = time_sound+60+5+5 /time_fourth_frame = time_sound+60+5+5+5 /time_fifth_frame = time_sound+60+5+5+5+5 </values>
<trial safe_3_backward_inc> / ontrialbegin = [values.Actiontype="Withdrawal"; values.congruency = "Incongruent"; values.object = "safe"; values.length = 3] / ontrialbegin = [trial.safe_3_backward_inc.insertstimulusframe(sound.take, values.time_sound); trial.safe_3_backward_inc.insertstimulusframe(picture.safe_minus_second_frame, values.time_second_frame); trial.safe_3_backward_inc.insertstimulusframe(picture.safe_minus_third_frame, values.time_third_frame);] / stimulusframes = [1 = safe_first_frame] / validresponse = (0) / inputdevice = mousekey / showmousecursor = false / trialduration = values.time_third_frame / branch = [trial.safe_3_backward_inc_respond;] </trial> <trial safe_3_backward_inc_respond> / stimulusframes = [1=safe_w] / inputdevice = mouse / showmousecursor = true / validresponse = (lbuttondown) / correctresponse = (lbuttondown) / ontrialend = [values.x=trial.safe_3_backward_inc_respond.responsex;values.y=trial.safe_3_backward_inc_respond.responsey;] / branch = [trial.space;] </trial>
So that the intertrial interval is represented by the "space trial": here participants have to press the spacebar to start the next trial and keep it pressed for the whole trial. They can release the spacebar just at the end of the trial safe_3_backward_inc, when they have then to make the mouse response (trial safe_3_backward_inc_respond). I need to know and make sure that participants keep the spacebar pressed for the whole trial interval, as this information represents an exclusion criterion for the experiment. Is there a way to record both spacebar release (or the duration of spacebar pressing) and mouse coordinates wihin a single trial?
Thank you very much.
Eleonora
|