OS (e.g. Win10): Win 7 and 11
PsychoPy version (e.g. 1.84.x): 2022
Standard Standalone? (y/n) y
Hi in my experiment I need the option to pause a loop at any moment (mostly to check whether participants pay attention to the stimuli and give them a short rest when needed).
I added a short code component:
pauseKey = event.getKeys()
if ‘p’ in pauseKey:
continueRoutine = False
while not event.getKeys(keyList=[‘r’]):
continueRoutine = True
if ‘escape’ in pauseKey:
core.quit()
It allows me to pause my experiment after chosen trial, however, I have just noticed that it causes some stimuli didn’t show up (mostly one stimulus after each pause).
Is there any other option to pause a loop without losing trials?