[solved] collecting mouse and keyboard response while showing stimuli
my name is Stefano and I am quite new to OpenSesame, although I really like it already. But I need some help implementing a dual task
Basically I want to show a stimulus with 4 rectangles and a line of text for 1500ms. The colors of the rectangles, and the text to be displayed are defined in a loop, and while the stimulus is on the screen I want to monitor for 1500 ms (the duration of the stimulus on the screen) both mouse clicks and keybord responses. In fact there are two simultaneous task to be performed: a) checking whethere 3 or more rectangles have the same fill color, and press space if that is the case, and b) whether there is a colon in the text line, and click on the mouse if that is the case. After a click or a keystroke, anyway, the stimulus must stay on the screen until 1500 ms have elapsed from the stimulus onset.
Given that there are two tasks to be performed simultaneously, in each trial there are two correct responses, one for task (a) and one for task (b), and I have set variables in the loop of condition to store (a) whether there are 3 or more rectangles of the same color or not (variable "correct_response", values: "space" if there are 3 or more rectangles with same fill color; "a" otherwise), (b) whether there is a colon in the text (variable "colon", values: 1 if there is a colon, 0 otherwise). For each task, at the end of a trial, I want to record in a variable whether there was a hit (the target condition was present, and the subject gave the correct response), a miss (the target was present, but the subject did not respond within 1500 ms) or an incorrect response (the target was NOT present, and the subject did respond as it was present).
I guess I need inline script to do that, but I'm not sure how to use them. Can anyone please help?
Thanks you in advance for any help you can provide me!