Howdy, Stranger!

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

Supported by

Variable Timeout

Hi, I couldn't find anything online for my problem, so I hope someone can help me.

I have a keyboard response timeout of 2000 ms and afterwards a fixation star should be displayed. The Timeout of the fixation star should be something like this: [2500ms + Jittering - response time]. Is there an easy way to implement this? Unfortunately I am still very new to Python and OpenSesame.

Thanks in advance



  • Hi Tobi,

    in an inline_script, you can compute the new timeout.

    It is important to put the code in the run phase, because otherwise no response will be defined.

    jitter = 2000 # or whatever you want
    var.star_dur = 2500 - var.resp_time + jitter

    Importantly, the star then needs to be shown in the feedback item, not a sketchpad. See here why:

    Good luck,


  • edited December 9

    Thank you, that solved my problem. Though I have another little thing: I want to show the text "Wrong!" when the wrong key was pressed and "Too slow!" when nothing was pressed, but if I use [correct] as variable for "Wrong" it is shown when nothing was pressed as well, so what variable do I have to use?

    Additionally, I want to use a custom keyboard, is there an easy way to implement this?

Sign In or Register to comment.