This example illustrates how to write the contents of a List object to a text (.txt) file. The contents of this text file are then loaded into another experiment to determine the order of trials in that experiment.
E-Basic script is used to create and open a text file in 'Output' mode. The Subject and Session number are used in the name of the text file so that the participant can enter the same credentials during the following experiment.
The trials are then randomized in an array object and the first half of the trials are ran. If there is an odd number of trials in the TrialList, integer division is used to always make the second List section have one more trial than the first.
In the 'RandomWordRead' experiment (.es3) file, the contents of the text file are loaded into the experiment via InLine script. The order of the trails presented in the experiment will then exactly match the order of trials as they appear within the text file.
This method of reading and writing the contents of a List object are most commonly used in instances of pseudo randomization where the degrees of freedom for any given presentation of stimuli are relatively low. This sample can also be used in test-retest and within-subjects experiments.
For more information, please consult the following Knowledge Base* articles:
*Although these articles refer to a previous version of E-Prime, they still contain relevant information for experiment design in E-Prime 3.0