Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Possible to use a (txt)file for trialinput in the loops?

edited January 2015 in OpenSesame

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

  • edited 3:52AM

    Hi,

    I suppose you tried to save the list in the exp.set way? 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 list globally available by saving them as attribute of the experiment directly. For example, you read the list right in the beginning into a variable called exp.trial_info_list. This list is then available in other items of your sequence.

    Hope this helps.

    Eduard

    Buy Me A Coffee

  • edited 3:52AM

    Thank you so much Eduard!
    The exp.name method works like a charm :)

Sign In or Register to comment.