Howdy, Stranger!

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

Supported by

[open] Logging problems/inline script issues

edited April 2013 in OpenSesame

Hey guys,

We've enjoyed using you're open source programme, it works great!

However, we've encountered a little problem with logging our keyboard response. Our goal is by pressing a 'j' or 'n' to record if the participant does or does not see an image. We use a loop function with a sequence, wherein the image is followed by an inline script and a logger. We've first used a keyboard response function, but in this function there was no response on when somebody pressed j or n. Next, we used an inline script, found on the webpage, but here all the logging information said "NA". We used this script:

from openexp.keyboard import keyboard
my_keyboard = keyboard(exp, keylist=['j', 'n'], timeout="0")
start_time = self.time()
key, end_time = my_keyboard.get_key()
self.experiment.set('response', key)
self.experiment.set('response_time', end_time - start_time)

What we want, is for Open Sesame to record when the participant sees the image (i.e. at what time in the sequence the participant presses 'j'), and to record when the participant presses 'j' and stops recording when he stops pressing the button, so we can log for how long the participant sees the image.

Kindest regards,

Susan, Marjolein, Anouk, Tim

Comments

  • edited 5:24AM

    We've first used a keyboard response function, but in this function there was no response on when somebody pressed j or n.

    If all you want to do is record the timestamp of a key press, then the keyboard_response is what you want. You could use an inline_script as well, but there's really no need. If the keyboard_response didn't appear to work, the problem is presumably elsewhere in the experiment. If you have trouble finding it out, perhaps you could post a screenshot of the overview area?

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.