I am coding an experiment in PsychoPy using python. One component involves watching a circle move and then clicking the circle using the mouse. I only want the experiment to continue if the circle is correctly pressed. This is an adaptation of code I saw recommended in another thread, but it is not working. Right now I have it set to quit if it correctly registers the mouse click just for the purpose of development, but so far this has not been working. Thank you in advance for any advice you can give me!
for frameN in range(n_frames): for key in event.getKeys(): if key in ['escape']: core.quit() if x < 750: x += 5 circle.pos=[x,y] draw(circle) if mouse.isPressedIn(circle): print('Success') core.quit()