I have an excel sheet filled with words. I want to make a loop run through all of the words, but I want the loop to pause and wait for a response between each excel item. I am not sure how to do that.
So far I have tried:
I have a loop that looks like this:
The code for “Pause” is
if trials_Main.thisN != 50:
continueRoutine = False
But this makes “Stimuli” go through all of the items in the excel sheet, and THEN check the number of reps, which I don’t want. I want it to pause and wait for a user response after every item in the excel sheet. Is this possible?
You don’t need any code for this. Just insert a keyboard component on your pause routine with a blank duration field (so it will wait until whenever a response occurs), and set it to “Force end of routine”.
The code snippet you are using is for another purpose (and sounds like it is doing what it should): it is designed to only run the pause routine after 51 trials (counting from 0), skipping it on every other trial. So just delete that code – it is working against what you want to achieve.
Oh wow, thank you so much, that was a very simple solution! I appreciate your answer!