Quasi randomization of trials method
I'm currently exploring Open Sesame and OSWeb as a way of running experiments online, trying to work out whether it can handle the specific requirements my experiments typically have. One of these requirements is the generation of list of trials following sometimes demanding quasi randomization conditions (e.g., making sure that not more than two trials of such or such condition are presented consecutively, that such or such stimulus is not repeated on consecutive trials etc.). I use such quasi randomization to create a unique trials list order for each participant. So far I've done my experiments using E-Prime, using EBasic to write code, or when the quasi randomization is so complex that the program can get stuck without a solution, I've written an application capable of batching stimuli files that fulfill all the conditions, and then have the task import these, commit all information to variable arrays and then populate the trials list at the onset of the experiment.
I'm new to OpenSesame and OSWeb, and so far I haven't been able to work out how to achieve a similar result. I thought of the following options and have doubts or questions related to each:
(1) Quasi randomization through code:
(2) Reading from text file and populating a loop item table
Is there a way to read the content of a text file (e.g., csv), to commit it to memory arrays and then populate a loop item table with that information? For example, reading stimulus and correct response information for 20 trials from a text file, and then populate a 10 trials loop item table with information for trials 1 to 10 on the first execution of the loop, and with information from trials 11 to 20 on the second execution of the loop?
(3) Importing trials information from text file into a loop item dynamically
I've seen that the trials list / loop item can be populated from a file instead of a table. Can the path and file name be specified dynamically? For example, setting up variables such as StimFileBlock1 = "stim" + subect_nr + "B1.csv"; StimFileBlock2 = "stim" + subect_nr + "B2.csv"; etc. And then dynamically using these variables to specify the file to import in the loop item...
Sorry for the rather long message... I hope what I wrote is complete enough to explain the different options I've considered. Any help would be much appreciated on these or indeed or any alternative solution.
Thanks in advance for any advice!