What I’m trying to achieve: There is a Condition variable in the Experiment Info Dialogue box. This will be either 1 or 2 (no other possibilities). If Condition=1, the Reading_Easy loop needs to run once (the Reading_Difficult loop doesn’t run). If Condition=2, the Reading_Difficult loop runs once (the Reading_Easy loop doesn’t run).
What happens currently: Reading_Difficult loop runs once, no matter what value is entered in the Condition box. Reading_Easy loop never runs.
I had tried something similar to that previously, and it didn’t do anything. When I tried it again, still nothing. When I run the experiment, both loops run no matter what number I enter into the condition box
I’m not sure if something funky is just going on or what because this makes sense to me and I feel like it should work…
OK I see the problem. Try changing your integer values to strings i.e.
rather than if expInfo['Condition'] == 1:
try if expInfo['Condition'] == '1':
Hope this works
Becca
PS. for future when debugging these you can check a type by adding a code component and calling type on the variable you want to check. In this example print(type(expInfo['Condition'])) returns <class 'str'> showing this is a string rather than an int (whole number).