Hi @dvbridges Thanks a lot!
I tried what you suggested. The second one works, but the first one that I quote doesn’t work. No matter I put it into end routine tab or even every frame tab, and I think someone have the exactly same problem. (Online study with loops not progressing correctly)
Besides, I use windows 10 and psychopy 3.00b9…
BTW, thanks. I learned how to proper post code now.