Randomly choose between two columns in single block

I’m running PsychoPy 2020.2.10 standalone on Windows 10.

I’ve been trying (and failing) to conceptualize how to implement a relatively simple experimental design.

People first read one sentence (in this case, a mystery), at their own pace.


Then, after reading the first sentence, I want a second sentence to appear on screen while the first is still present.

So, I copied the mysteryText component and added a component for the second sentence:

The second sentence varies within subjects. Some sentences are solutions and some are neutral sentences:


I’ve been trying to implement this all in a single loop:


I cannot, for the life of me, figure out how to randomly choose between the the two columns.

Here’s what I’ve done so far:

In Begin Experiment, I created a list of the variable names:

senOps = ['solutions','neutrals']

Then, in Begin Routine, I chose a random number to represent the index of that list:

op = random.choice(0,1)

…and then using that index to call the sentence type from my list:

senType = senOps[op]

What I can’t figure out is how to use that variable to set the text for my sen2Text component.
I’ve tried:


plus a few variations therein that I can’t remember (nor can I remember the errors I was getting).

I even went as far as setting the text in the sen2Text component to $getMsg and adjusted senOps list to be

senOps = ['$solutions','$neutrals']

and I expected that choosing one of those two list items should be read like a variable in the text component:

op = random.choice(0,1)
getMsg = senOps[op]

I’ve considered all manners of solutions (few of which I implemented because they didn’t seem feasible), but nothing is making sense in my head.

I could do this in a heartbeat in Coder, but I need builder because I am running this experiment online.

Please help me figure out how to choose that second sentence to appear on screen at the same time as the first sentence. (my dissertation anxiety monster will thank you enormously!)

I found code relevant to the solution here.

Cheers to @Michael for the answer.