[solved] Button-click response times
Hi,
Just wondering how to get the logger to log response times for my experiment. I'm using the form_base item to create buttons that participants will respond on. I've managed to find info on how to get the form to log which response is made, however I can't seem to get it to log response times?
Thanks in advance.
-Rose
Comments
Hi Rose,
Welcome to the forum!
Could you provide us with some more information? How did you try to determine the response time? And where does it go wrong? What kind of output do you get? Perhaps it would be easiest if you could upload your experimental script here by doing the following:
Best,
Lotje
Did you like my answer? Feel free to

Hi Lotje,
Thanks for the quick reply.
You actually answered a question like this before. So I used the the inline script you posted (1) and followed your directions; however when i run the experiment this what comes up in the error box (2)
1.
https://gist.github.com/anonymous/7654856
2.
This is what I have for my form_base:
https://gist.github.com/anonymous/7654849
Hi Rose,
Apparently I made a mistake in my inline script. To determine the time stamp of the form_base item, you should use:
instead of
Does that solve your problem?
Best wishes.
Lotje
Did you like my answer? Feel free to

Yes, it works perfectly.
Thank you so much Lotje!
Hello,
I hope you're doing well.
I read this old conversation because I would also like to log the response time that participants give in a form_base. The thing is that in the "form_base" they have to put a string of 6 letters, so when I try to calculate the reaction time with "my_rt = current_time - starting_time" I get this message "unsupported operand type for (-) float and str. So I added the function float before (starting_time). But now I get this message ValueError: could not convert string to float: 'ABCDEF'.
Do you have an idea about how can I solve this problem?
Thank you very much in advance.
Hi @Gio38000 ,
It looks like the variable
starting_timeactually contains the response as opposed to the onset of the item. This is likely due to how you implemented this.That being said, you can get the reaction time more easily, by subtracting the onset time of the form item from the onset time of the subsequent item (e.g. a
sketchpadthat follows the form). Onset times of items are automatically available astime_[item name]variables. Does that clear things up?— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thank you very much, @sebastiaan. I will do that. 😊