adding a sketchpad or feedback item after a specific trial
Hello again,
Thanks again for creating this amazing tool! I've used opensesame for one perception experiment. It worked really well!
I'm at the moment creating a lexical decision experiment where I want a sketchpad/feedback item to appear after a specific trial in a block of randomized trials.
For example, I would like to have 'question 1' item to appear after 'item 1' has played, and 'question2' after 'item2' has been played. I tried to attach the experiment here, but I filed...
I couldn't find any direct inline_script (like specifying some trial orders to make it happen?) that could solve the problem.
I have a solution which is not very straightforward or economical, but I think it might work?
So first I added a sketchpad element called 'question1' in the trial sequence, and used run_if condition to make sure that the 'question 1' will run if [item]=1. Thankfully it worked!!
As I also want to collect the response for 'question 1', so I tried the following two solutions:
1) change the allowed keyboard responses for the sketchpad 'question1'. I came across this discussion here (forum.cogsci.nl/index.php?p=/discussion/401/open-how-to-limit-allowed-response-to-down-key-in-a-sequence-of-sketchpads) and put the adapted code in an inline_script before the skeptchpad . But it didn't work:(
Adapted code:
Import module:
from openexp.keyboard import keyboard
Create keyboard item:
my_keyboard = keyboard(exp, keylist=['a','b'])
Pull keyboard input:
my_keyboard.get_key()
2) add a keyboard response: I only wanted to run this keyboard response if the question 1 is being played. I tried 'question1=YES' and 'question1=TRUE', but they didn't work. I guess there must be something wrong with the syntax...
Thanks a lot in advance!
Mengzhu
Comments
The problems could be solved simply by using the condition 'run if [item]=1 for all the added elements that I want to show after the trial 'item' 1. This way is not neat as I have quite a lot of elements that are needed to run after some certain trials. So I am wondering if there is any script that I could use to do this....
Thank you!