Set an incompressible duration of sketchpad while recording response time
Hi,
First of all, Opensesame is really useful and easy so thank you for that !
But I don’t succeed to do something that I thought would be easy to.
I would like to show a picture for at least 3000ms and allow the participant to answer (with keyboard) during that duration or after (the picture should stay at least that 3000ms and until the participant answers which can be for example 10s later).
If I set the duration of the sketchpad to 3000 and deselect the “clear key pressed before” on the keyboard_response it does work, but then I don’t have the response_time if the participant answer before the 3000ms.
If I set the sketchpad to 0ms then I can have the response_time directly after my picture appears but the picture disappears when the participant answers so it might not have been shown long enough (3s).
Does someone know how to handle that ?
Thanks
Comments
Hi,
How about some python scripting? Set the duration of the
sketchpadto 0 and replace thekeyboardwith aninline_scriptin which you will collect the response:Edaurd
Thanks Eduard, the thing is that I don't know anything about Python...
I did a copy/paste and it didn't work (It tells me variable "correct" doesn't exist). I guess that I should add some informations in this code but I really don't know what and how...
I see.
YOu can also check out the documentation. It's not all that difficult:
http://osdoc.cogsci.nl/3.1/manual/python/about/
http://osdoc.cogsci.nl/3.1/manual/python/keyboard/
Eduard
Hi Eduard,
So I did the necessary to understand a bit python code but I still don't succeed.
What I would like to have is :
If a key is pressed but the response time is inferior at 3000ms : collect response time and correct response + my picture stays on the screen until it reaches this 3000ms of presentation (and unfortunately this until function doesn't exist...) and then move on to the next picture.
If this is not the case : wait with my picture on the screen until the participant answers and then collect all informations and continue on next picture.
Do you have any idea of what I should do ?
Did you try my code? It should work I think...
Btw. Please post code as text, not as image, this makes working with it a lot easier.
Eduard
I found something much easier which works as I want.
self.sleep(3000-self.get('response_time'))Thank you a lot for your help !
Ysia