Howdy, Stranger!

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

Supported by

[solved] Set a time out for inline_script item without using mouse or keyboard functions

edited May 2014 in OpenSesame

Hello everyone,

I designed a experiment in which the subjects can click on a "image button" to choose a answer an proceed to next step (you can find detailed information here http://forum.cogsci.nl/index.php?p=/discussion/963/solved-collecting-response-time-when-using-image-button-with-inline-script#Item_5)

Everything is realized by python codes in inline_script item and I have no idea how to simply define a timeout since most solution I found are achieved with something like
"button, position, timestamp = my_mouse.get_click(timeout=20)".

I can't use this function because the function of "image button" demands already one mouse click.

Anyway the question seems to be very easy but I really did't find a solution and thus need your help.

Antonie

Comments

  • edited 9:15AM

    Hi Antonie.

    Forms don't support timeouts (although it's on the tentative roadmap for the 2.9 series: issue #142). So you cannot use a form to collect a mouse click and use a timeout value, unfortunately. A workaround would be to make the form 'non-interactive', in which case it is just shown on the screen without waiting for user input, more-or-less like a sketchpad with a 0ms duration. You can do this by calling form.render() instead of form._exec(). See:

    Then afterwards, you can use a mouse object in an inline_script (or mouse_response item in the GUI) to collect a mouse click with a timeout. The obvious downside is that you have to check the coordinates of the click to determine which button was clicked. So it's not ideal, but it should do the trick.

    Does that help at all?

    Cheers,
    Sebastiaan

  • edited 9:15AM

    Hi sebastiaan,

    such a shame that timeout cannot be used in my experiment. But still thank you for your answer!

    Antonie

Sign In or Register to comment.