OS : Windows10:
PsychoPy version: 1.84
Standard Standalone? (y/n): yes? I’ve not added anything
What are you trying to achieve?
I’ve got help from a couple of the other threads, but I’ve run into a bit of a problem with some of the code I’ve adapted. I’m trying to get it to compare whether the clicked-on image is the response I’ve stated as correct in the Excel file and report it back in the data output; at the moment, it’s always coming back as ‘Not selected’ and I can’t work out why.
I’ve got the following in the ‘each frame’ part of adding code in Builder.
` # cycle through the stimulus components by name:
for stimulus in [ Image1, Image2, Image3, Image4]:
# check if the mouse is pressed within the current one: if Mouse.isPressedIn(stimulus): # Yes, so store the reaction time in the data: thisExp.addData('selectedAns', 'Answer') # check if the stimulus' image filename matches the correct answer: if stimulus.image == eval(corrAns): thisExp.addData('selectedAns', 'Selected') else: thisExp.addData('selectedAns', 'Not Selected') # end the trial once done here: while np.any(Mouse.getPressed()): pass continueRoutine = False # stop any further checking: break core.wait(0.3)
If anyone can offer any help/advice that would be greatly appreciated, thank you!