Howdy, Stranger!

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

Supported by

Show a textline only for some milliseconds

Hello everyone,

I've built an experiment in which you have to react on the displayed stimuli (different images) by pressing certain keys. Every image has a different correct key. I want to show an error message, if the wrong key is used. The error message is shown on the right side of the stimuli, every time I press a wrong key and it disappers when I press the next key for the next stimuli. But I want the error message to disappear after 500ms and not after the next keypress.

Is there a simple command, which I have missed and which I can add to my OpenSesame script so that the error message disappears after 500ms or do I need an inline script?

At first I thought about using a coroutine, but as I use only one sketchpad I think this won't be the solution for my experiment.

This is what the script of my sketchpad looks like:

Greetings

Rex

Comments

  • Hi Rex,

    You can set the duration of the updated display (incl. Feedback) to 500 ms. However, this will then also wipe the original stimulus. A way to prevent this is to have in a loop that only breaks if the correct answer has been given, otherwise keeps on looping and shows the stimulus again, right after the feedback disappears. I think, that is possible without inline_scripts, but I would do it with them (I have a general affinity for code :)

    Eduard

  • Hi Eduard,

    so at first I should create a seperate feedback item that shows the message "wrong key" instead of including it in my stimulus sketchpad?

    Then create a loop, which starts the list of stimuli that I'd like to present. If someone presses a wrong key the feedback item will be shown and then the loop goes back to the sketchpad? Did I get this right? Does the sketchpad continue from the point where it was stopped or will the list of stimuli start from the beginning when I do it this way?

    If I do this with an inline script, should I create the whole sketchpad and the stimuli per script or is it enough to keep my structure and just implement the "Wrong Key"-feedback with the script?

    Rex

  • Hi Rex,

    Yes, that is basically correct.

    and then the loop goes back to the sketchpad?

    Well, it is a weird formulation, the loop just reiterates, and in doing so, it would get back to the sketchpad. Therefore, the sequence would also continue from where it was interrupted and wouldn't start over.

    or is it enough to keep my structure and just implement the "Wrong Key"-feedback with the script?

    Yeah, that is sufficient.

    Eduard

  • Hi Eduard,

    okay, thanks a lot. I will try to implement this and hopefully I will get it done. :)

    I'll give some feedback if it works or if there are some problems with the inline script.

    Rex

Sign In or Register to comment.