[open] want my target item to be disappeared after 500 ms, I also want a 2000 ms timeout
Hi everyone,
I have been working with OpenSesame for the last 3 or 4 weeks, and I'm totally new to this, and unfortunately I know nothing of programming or any kind of code writing. My experiment is a prime-target lexical choice decision. That is I have a prime item (a string of letters) for about 60 ms which becomes masked and then the target item appears on the screen and my participants needs to decide whether that target item is a word or a non-word by pressing either m or z. My question is that; I want my target item be on the screen for 500 ms and then DISAPPEAR but I also want to have a timeout on the keyboard responses, for 2000 ms, which I find no way of doing it!
I tried having a blank sketchpad after the target sketchpad so that I make the target item disappear. But my concern is that, I want the measurement of reaction time start as soon as the target item appears on the screen, soo how does the software know when to start measuring the reaction time if I have other sketchpads in between the target one and the keyboard response?
Comments
Hi, and welcome to OpenSesame.
One way of doing this would be to set the duration of your target sketchpad to 0ms, with the keyboard_response item following immediately after that. The timeout of the keyboard_response item should be set to 500. After that, you place your empty sketchpad, with again its duration set to 0ms. As you want participants to have a maximum of 2000ms to respond, you would finish up with another keyboard_response item with timeout set to 1500ms. One tricky bit though: you don't want this last item to be used if participants responded during the first keyboard_response item, right?
To make this work, click on the sequence item that the sketchpads and keyboard_responses are placed in. You'll see that its items have
alwaysas a run-if statement. As you may have surmised by now, we need to change the run-if statement of the second keyboard item. It should be run only if theresponseat that time is still 'None'. Double-click 'always' and change it into[response]=None.Does this help?
Cheers,
Josh
Hi Josh,
Thank you so much for your time.
Yes, it does work very well. I still have one concern. Does the reaction time measurement start when the target item appears on the screen or when it disappears from the screen? I myself tried the experiment and it seems that it starts after the item disappears from the screen, and this is not what I want. As I tried responding after the word disappears and it shows a reaction time less than 500 ms, which I believe should be more than 500 ms (having in mind that, the target item is there for 500 ms and then it disappears and the participant have another 2000 ms to respond before getting to the next cycle).
Best,
Sarvenaz
Hi Sarvenaz,
Reaction times are recorded from the moment on a
keyboard_responsegets activated. That said, using two of these items in succession won't work, because the two keyboards will have two different starting points. This is also the reason why your reaction times are so quick. To fix that, you can either move the entire procedure into aninline_scriptand use awhileloop to do it, or you adapt the reaction times post-hoc. To do that, you simply put aninline_scriptafter the secondkeyboard_responseand before theloggerand add the duration of thesketchpadto current reaction_times, if the secondkeyboard_responsewas run.So, if you name the second keyboard
kb2, something like this will do:Can you try whether this solves the issue for you? You might have to adjust the variable names. I am not sure whether I used to correct ones. But if you check your logfile, you should be able to find them.
Good luck,
Eduard
Hi Eduard,
Thank you for your time.
But unfortunately it's not working. I get error messages regarding the inline_script. I'm not sure whether I'm doing it right or not. I'm really puzzled here. I did everything as you told me to. But still not working.
Sarvenaz
Hi Sarvenaz,
What kind of error message are you getting? Can you post it here? (It usually doesn't work the first time, but a little bit of tweaking here and there, will solve it)
Eduard