OS (e.g. Win10): This will be used on a Windows10 laptop with a touchscreen monitor. PsychoPy version (e.g. 1.84.x): What are you trying to achieve?: I have an RMTS task, where the animal will have to first choose the correct match, image below. If they choose the correct match, I need an X and O to come up, so they can choose the corresponding symbol. If they click the right symbol, it will activate my reward.exe otherwise they will get a 10 second timeout with a blank screen. All of the touches will be with “mouseclicks” through the tablet. With human participants I have been able to just use the keyboard and use the Correct Answer option to insert the $CorrAns variable in my excel file, and use the code below:
respond = ‘’
My plan was to have resp.corr = reward.exe but, I’m not seeing the Correct Answer option in the mouse click function in the builder.
Is there an equivalent to this with mouse clicks? So I can store correct and incorrect clicks to provide the animals with feedback?
My second question is regarding the matching portion of the task: if they select the matching color, the X and O appear, if not they get a timeout and move to the next trial. I’m not sure what would be the most efficient way to have the X and O text component appear on a correct match click? **Edit, I have added transparent polygon rectangles over my two choice stimuli. I am trying to find a way to tell the program “if the correct polygon is clicked (either Left or Right), show TextO and TextY (my symbols appear), else, move to next trial”. But am not sure how to tell it which polygon click is correct?
Any advice on either of these questions would be greatly appreciated!
I ended up finding a solution, and then realizing today it would not work with the touchscreen due to the double click issue. I searched through other questions and ended up finding your crib sheet with the “hover” solution, and I have been trying to use that to fix the double click problem. Now the issue is with the feedback.
The code below is what I’ve added to the routine with my mouse and two polygon choices:
Then this is the code on the next routine for providing feedback:
So it was dependent on the column created for mouseclicks. But now that it is not recording mouseclicks I’m trying to figure out a different way to provide correct vs incorrect feedback for the Left/Right choices.
Thank you. I have changed it to the contains method. For my feedback I will have it calling an .exe file to dispense a food reward and play a sound for a correct response, and play a different sound for incorrect responses. I guess where I am confused is how to tell the program what the correct and incorrect responses are for each trial/image, and I was unable to decipher that from reading the code, as I’m still trying to become proficient in python. With the key responses I can usually make a column in my excel file with the correct key for each image and use if respond.corr == 1. But am unsure to to get the same effect with the mouse, I have in my excel sheet “Left” or “Right” which are also the names of my polygon choices but do not know what to do with that information in the code.