Reuse one loop to generate different runs

Hi! tandy,

thank you so much for your reply, after I read the image files, I need to do some shuffle things, so the image components need to read image file through the image variables I create, like my code above.

what I’m confused is how can I use some sort of inner or outer loops to create 8 runs based on the stimuli stored in the variables, like the code I showed above, instead of the file paths stored in the excel file.

in other way, I may not need to split the stimuli into 8 sets, I just need to set a rest period after every 3 trials (24 trials in total), how can I achieve this purose?

I find the solution in this thread:

thank you very much!