[solved] Collecting number of keypresses in a fixed amount of time
Hi, i'm making an experiment and i want to collect the number of times that the subject press the key "1" in 8000ms.
That's the important part.
If possible (it's secondary), i want to collect also the times between responses, or the amount of time if "1" is being holded (it would be interesting for a graphic, later).
It seems simple, but i'm new with this software and i would be very grateful if somebody can help me, because we're a little rushed.
Thanks, thank you for make OpenSesame, great software.
Comments
Hi!
In theory, you could do this using the GUI, but you'd end up with massive data files! The easiest solution would probably be to use the following code in an inline_script item:
Keeping track of how long the button was down, is not possible in this way. You'll have to directly use either PyGame or PsychoPy to do so.
Good luck!
Thank you very much Edwin!
I'm experiencing this problem when trying to run the experiment with the given code:
My apologies, that's due to a silly mistake (forgot to pass
expto the keyboard!). I've edited my previous post, so it should work now.Thank you very much. It works like a charm.