Hello Maike
I used a similar approach to your condition-filename concatenation. It then started to fail on Pavlovia. I was too lazy to really dig into the problem. I simply switched to calling the filename from an Excel-sheet.
then
An alternative solution might be to store the value of "psychopy_list1/”+‘randcond’+“.xlsx” in a variable and call the variable instead of concatenating the filename. Keep in mind that you must store the value in the variable before you use it in the subsequent loop. I usually do this in a routine just before the loop.
e.g.
StimFileName = "psychopy_list1/”+ randcond +“.xlsx”
or
StimFileName = "psychopy_list1B.xlsx”;
if ((Math.random() > 0.5)) {
StimFileName = "psychopy_list1A.xlsx”;
}
You might want to store the chosen StimFileName in your data file.
Best wishes Jens