During the experiment, we present images to the participants, I made an excel file and a loop so that psychopy selects them randomly. I would like for each image, if and only if the participants press the spacebar, they are prompted to respond on a slider about a feeling, then the loop continues to present the images. If the participants do not press the spacebar then no slider and the images continue to scroll randomly.
here it’s the code line i put in “begin routine” :
descriptionJVscale.show = False
here it’s the one i put in “each frame” :
theseKeys = event.getKeys(keyList=[‘space’,‘none’])
descriptionJVscale.show = True if ‘space’ in theseKeys else False
knowing that “descriptionJVscale” is the slider i want to show after the press on the spacebar.