Self-paced reading using code component

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): v2020.1.3
Standard Standalone? (y/n) If not then what?: Y
What are you trying to achieve?: I’m designing a priming experiment which is partially self-paced and partially externally paced. Participants should see a Prime sentence, up to four Fillers, and a Target sentence. Some of these fillers and the Target will consist of self-paced word reading. The order of Prime-Fillers-Target cannot be randomised (i.e. every Prime must be followed by the same fillers and Target for all participants). I’ve been trying to get self-paced reading going in a single routine rather than designing one routine per word.

What did you try to make it work?: To start with, I designed a txt component showing $sfiller1 (second filler word 1) and a keypress response taking ‘space’, storing last key only and discarding previous. I repeated this for sf2 and sf3. sf2resp and sf2test are set to start when sf1t.status==FINISHED and sf1resp.status==FINISHED respectively. I then included a code component with the following under Each Frame:

if len(sf1resp.keys) > 0:
    sf1t.status == FINISHED
    sf1resp.status == FINISHED

if len(sf2resp.keys) >  0:
    sf2test.status == FINISHED
    sf2resp.status == FINISHED

if len(sf3resp.keys) >  0:
    sf3test.status == FINISHED
    sf3resp.status == FINISHED

I also tried the same but with:

if sf1resp.rt > 0:
    sf1t.status == FINISHED
    sf1resp.status == FINISHED

if sf2resp.rt >  0:
    sf2test.status == FINISHED
    sf2resp.status == FINISHED

if sf3resp.rt >  0:
    sf3test.status == FINISHED
    sf3resp.status == FINISHED

What specifically went wrong when you tried that?: The experiment loads, but no matter how often I press ‘space’ when I read sf1, the sequence won’t continue and move on to sf2. Any help would be greatly appreciated! Screenshots and file attached for reference.

primingERPsV2.psyexp (173.2 KB)

Have a look at my self paced reading online demo for some ideas.

1 Like