Start the practice phase again with key press
Hi everyone,
I'm designing a study for the OSWeb version of OpenSesame and I can't seem to make it work that when participants press a certain key (let's say J) I would like the practice phase to restart (basically I'd like the programme to go back to a certain sketchpad where it starts from), if participants press the F key for example I'd like it to continue with the next part which is the trial phase.
I was wondering if i should use an inline javascript or there's an easier simple way it'd work?
Would really appreciate the help, I'm still a beginner in this, just switched from another programme recently.
Hope y'all have a great day!
Comments
Hi @Csilani,
Can you specify a little more what you're trying to achieve? Are you looking to repeat a block of trials? or a single trial? Or to go back to a specific sketchpad within a single trial?
Generally, the easiest method to have some events repeating untiul a condition is met is to embed a loop (e.g., where you have your practice trials) within a higher loop set to run many times (high cycles number) and to use the "break if" parameter. Within the higher loop, you would include the loop contaning the practice trials, followed by a sketchpad asking participants to press J or F, folloed by a keyboard response object. You'd refer to the variable stornig the response to the latter in the "Break if" function of the higher loop, such that if it is equal to "F", the program breaks out of that loop.
Hope this helps,
Fabrice.