Moving through routines with left and right arrow key

As Michael says, having just one routine would be easier. However, if really necessary, it is possible to also move back and forth through routines. Please find an example attached. The basic idea is to have x routines, each with a loop around them, plus an outer loop. For each outer loop iteration, only one of these routines will be presented. The response then determines which routine is presented on the next iteration of the outer loop. If the response is left, the previous routine will be presented and if the response is right, the next one. Which routine is presented is controlled by a list, the elements of which are used in the repeat settings of the inner loops. In the example with 3 routines, [0,1,0] means that the second routine will be presented. If the response is right, this changes to [0,0,1] and the third routine will be presented. If the response is left, this changes to [1,0,0] and the first routine is presented.
Please note that the example is still missing is a piece of code to break out of the outer loop after the final trial.

Jan

routines_back_and_forth.psyexp (20.2 KB)

2 Likes