If this template helps then use it. If not then just delete and start from scratch.
OS: Win10 :
PsychoPy version: 3 :
Standard Standalone? Yes
What are you trying to achieve?:
I have 9 images in a 3x3 grid that I am trying to make selectable.
I would like it so that participants can select one or multiple images, turning them red when selected (and logging the selection and timestamp) and turning them back to their normal color when deselected. A next button at the bottom moves them to the next set of images.
Right now - the code works, but sometimes clicks are missed or not registered. All in all it seems like the loading time for the screen is slow, and that its either not refreshing frames fast enough - or that I’m waiting too long.
What did you try to make it work?:
Right now it loads images based on a list of images in an excel sheet that is the stim for the trial loop.
I have a code snippet in the builder that looks like the following:
for stimulus1 in [top_right,top_center, top_left, middle_right, middle_center, middle_left, bottom_left, bottom_center, bottom_right]: stimulus1.color = 'white' stimulus1.currentClick = 0
for stimulus1 in [top_right,top_center, top_left, middle_right, middle_center, middle_left, bottom_left, bottom_center, bottom_right]: if mouse.isPressedIn(stimulus1): thisExp.addData('clicked', stimulus1.name) if stimulus1.currentClick == 0: stimulus1.color = 'red' stimulus1.currentClick = 1 else: stimulus1.color = 'white' stimulus1.currentClick = 0 win.flip()
What specifically went wrong when you tried that?:
Its currently lagging and too slow meaning that clicks arent registered. Thoughts on how to make it more consistent in loading and registering clicks?
Include pasted full error message if possible. “That didn’t work” is not enough information.