[solved] Possible to use a (txt)file for trialinput in the loops?
Hey ![]()
I´m trying to write several basic experiments with opensesame.
Problem is: The trials come in form of a Textfile (the taskparameters like maxrt and display durations aswell, but solve one solve both i guess!).
The idea is, that once the experiment is done anybody can change the content (for example: img files and key to press are defined linewise as a trial) of the experiment to their liking without having to know about opensesame.
Coming from ePrime i´m a little bit used to the luxury of just telling the loop to use a file as input.
I cannot see how i would do that in opensesame though.
I tried to do little bit of a workaround with inline-objects:
Managed to get the trials in a list object, but i cannot access the list further down in the experiment.
I know there are experiment variables which i could define in the experiment script, but those are limited to single value - pretty bad for a trial list ![]()
Anyone has a nice idea? Or maybe a hint of what i am missing?

Comments
Hi,
I suppose you tried to save the list in the
exp.setway? So, something like this:exp.set('trial_info', trial_info_list)If so, you're right. In this case you can't store more complex data types, like lists.
However, you can also make the
listglobally available by saving them as attribute of the experiment directly. For example, you read the list right in the beginning into a variable calledexp.trial_info_list. This list is then available in other items of yoursequence.Hope this helps.
Eduard
Thank you so much Eduard!
The exp.name method works like a charm