Self-paced reading task// A bug in the flow

You could try using the textbox component instead, which has linespacing as a formatting option. If you don’t tick “editable” I think it should behave in the same way.

Great suggestion. I will try that first. Thanks!

Hi,

I hope it is okay that I comment on this topic.

@wakecarter I have forked your experiment to adapt for my own SPR experiment. Before making any changes to the code, I tried running the experiment to check whether it works just like your online version. Unfortunately, I cannot get beyond the fixation cross because the experiments suddenly ends. In the runner it says:

Traceback (most recent call last):
File “C:\Users\KK\Documents\SPR\self-paced-reading_lastrun.py”, line 388, in
lines=math.ceil(len(Sentence)fontSize.33)
NameError: name ‘math’ is not defined

I tried to figure it out myself, but am I am quite new to programming. I am using version 2022.1.2 but I changed the settings to run the experiment on version 2021.2.3.

Also, when adapting the code for my procedure, can I simply delete the code of the SPR variants I do not need? I am afraid I might destroy everything…

You should be able to delete the unwanted SPR code.

You might need to import math in a Python component for it to work offline.

Hi Wakefield, I am using your SPR template for an experiment specifically using the incremental phrase mode. I managed to make it work beautifully in PsychoPy, but when running in Pavlovia my left align properties are gone (see picture). If I make the fontSize larger the text goes out of the screen. I have tried reading_text.setAlignHoriz(‘left’) in the Begin Routine JS panel of the reading code but didn’t seem to work. Do you have any suggestions for this issue?

(I also tried using your experiment, with your items, without changing anything but being me who uploads it to Pavlovia and then I couldn’t run it. It got stuck at the initializing stage.)

Thanks in advance!

Is it just that the text is offset to the left?

There has been a recent change which means that a line of code referring to setPos on the JS side of the Both component used to left justify is no longer needed.

Hi. Thanks a lot for providing so much help already with this. I seem to be having an issue that I don’t think anyone else has posted about so far. The experiment is running, but instead of presenting each word of the sentence one by one, it is showing the first word of each sentence in the column. My column is called ‘sentences’ and I have changed the code to reflect this. But what I’m getting is ‘Claudio’, ‘Guglielmo’, ‘Il’, ‘La’, when what I would like is ‘Claudio’, ‘era’, ‘tornato’, ‘di’, etc. I have tried a lot of solutions, but now I am really a bit stuck. Any help would be much appreciated.
image

Hey! Do you know whether it is possible to adapt this code to have a mouse command (left click) to change the words in the self-paced reading task instead of the “space” key?

Try adding a mouse component. Offhand I don’t think the keyboard component is used for anything other than ending the routine.

Thanks for the quick reply! I tried that but all it does is go straight to my comprehension question (instead of doing the paced reading), probably because in the code there is “if ‘space’ in keys” as the command to pass from one word to another. I was wondering if there’s a way to change that line to use the mouse to do that instead.