Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Only one response needed

edited November 2017 in OpenSesame

Hey,

I am using inline script to collect responses. The first response is recorded and logged correctly, however, any subsequent response is carried on to the next trial(s). How to prevent this to happen?

Thanks

from openexp.keyboard import keyboard
my_keyboard = keyboard(exp,keylist=['t', 'v'], timeout=1500)
start_time = clock.time()
key, end_time = my_keyboard.get_key()
self.experiment.set('response', key)
self.experiment.set('response_time', end_time - start_time)

Comments

  • Hi ocraneri,

    I am not sure I understand the structure of your experiment, are there multiple responses for a single trial?
    In that case it might make sense to create multiple response variables and log of of these at the end of the trail, this way they will show up in a single line, in different columns, hope this helps,
    Roelof

Sign In or Register to comment.