Howdy, Stranger!

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

Supported by

Rookie IAT question

Hi all,

I guess that maybe somebody has asked about this before but I can't find it on the forum... so sorry if that is the case.
I'm designing an IAT experiment with Open Sesame 3.1.7, and this is what I want to do.

My IAT experiment has to be divided into 4 different blocks displayed in random order: congruent, incongruent, congruent switched and incongruent switched. Inside each block, an instructions screen should be displayed followed by 15 trials displayed in random order. Each of the four blocks should appear three times (12 blocks in total).

I have the experimental design already done in Open Sesame, but I fail to set the random order for the four experimental blocks. Attached you can find a screenshot of my structure.

Any help would be appreciated!

IAT.jpg 239.7K
IAT2.jpg 220.9K


  • Hi,

    Right, so you're essentially running into the issue that a sequence has a fixed order, right? Here's what you can do:

    1. In experimental_blocks_loop, define a variable run_block with four levels that correspond to your four blocks: 'CF_congruent', 'CF_incongruent', etc.
    2. In experimental_blocks_sequence, use run-if statements to run only one sequence. So for CF_congruent_block the run-if statement would be [run_block] = CF_congruent. Etc.

    Does that make sense? This creates a fairly deeply nested structure, which is aesthetically unpleasing, but it does the job.


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • Hi Sebastiaan,

    Thank you very much for your reply! I've tried to do what you suggested, but maybe I didn't get it right because the program says that there's a mistake. Attached you can find both the reported error and what have I done.

    Thank you for your help!

  • Hi,

    You're using a Python statement as a conditional statement. You can do that, but if so you need to prefix it with =. So either of these would be valid (and equivalent):

    • =var.run_block == 'CF_congruent'
    • [run_block] = CF_congruent

    See also:

    Does that clear things up?


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • Hi,

    Great! It works perfectly fine using the " =var.run_block == 'CF_congruent' " format. But, to be honest, I have to admit that I fail to understand why does not it work using the " [run_block] = CF_congruent " one. When you say that both options should be valid and equivalent, you mean that both should work or I am not interpreting you correctly?

    Thank you very much for your help!


Sign In or Register to comment.