Informed Consent and Slider color

Hi there!
I am a new user of Psychopy and I have just created my experiement with a judgment task on image stimuli.

My issue is with the informed consent sheet. I saw that some options suggest to add a link from Qualtrics but we do not have access to Qualtrics, so I was wondering how to add a long text such the one of the informed consent. Adding it as a Text component doesn’t work very well because the text is centre aligned and is not very friendly readable. The best thing would be to add a hyperlink to the sheet like:

Here you have the Information sheet regarding the purpose of this experiment.

If you agree with the conditions, press ‘y’
If you disagree and want to quit, press ‘n’.

Besides, I have a problem with the color of the slider which looks very weak and it can be hardly perceived. How can I modify it?

Thanks for your help!

You can have an informed consent sheet via my new app. https://moryscarter.com/vespr/portal

Alternatively, I’ve got a scrollable text demo. scroll-text [PsychoPy]

Your scrollable text demo works nice! How can I add it to my exp?

You can fork or view it from VESPR / Scroll Text · GitLab and download the code.

Hi Wakecarter!

I use your code for the scroll demo, and it perfectly fits in my experiment. However, when I tried to make the text smaller, it seems that the scroll bar doesn’t go down together with the text. Actually the scrollbar reaches the end and “press space to continue” appears, but the text can’t be visualized interely.

How can I fix it in the code?

Dani

If scrollCode find the lines

maxScroll = 0
for line in lines:
    maxScroll += math.ceil(len(line)*fontSize/screenRatio)

Try changing the starting number to 1 or 2 to allow the page to scroll a bit further.

Alternatively, add some blank lines to the bottom of your text.

It works, thanks a lot! I had to put a bigger number (20) to make everything appear.

However, I noticed another detail that I would like to fix: the scrollbar looks weird at the beginning. It looks too high compared with the text, do you see?

My calculation shouldn’t be that far out. Have you set the font size directly instead of using fontSize? What font are you using?

Yes, I set:
fontSize=.02
I didn’t change the font, which is Arial

Changes in the code? I’ll take a look and try to work out why it didn’t scale correctly.

I haven’t changed anything else… I will try to figure it out as well!
Thanks for your help!

I think I’ve got it.

align_code contains a correcting factor to stop the page scrolling until the bottom of the text reaches the top of the page (so the page is blank).

It was

maxScroll -= round(1.6/fontSize)-1;

and I’ve changed it to

maxScroll += round(.6/fontSize);
maxScroll -= 73;

It’s not perfect with my demo but I think I’d need to play around with the calculation of the number of lines to improve it at this point.

It doesn’t really work with mine :confused:
Anyways, thank you for trying… it’s not a big deal… if we can’t fix it, I can leave it like this!

It might be a browser issue with the win sizing.

Please could you add me as a developer so I can take a look?

I built in locally, not thorugh a browser, so I can’t!

Sorry – I thought you were running it online. You could try tweaking the formula or just do it another way. You could also manually override screenRatio = win.size[0]/win.size[1] but first it might be worth trying print(‘screenRatio’,screenRatio) to see what’s going wrong.

So far I have been working locally but now, as you said, I want to put it online.
I have signed in Pavlovia but, leaving apart the scrolling marker, the whole scroll text has disappeared… I thought it was because of python script but even if I use your javascript code, it doesn’t appear… Do you know why and how to solve it?

Moreover, at the end of the experiment an error occurs:

I am a bit hopeless this time…

Thanks,

Dani

Have you used Auto translate code components where possible?

What is obj?

I tried but Auto translate code components doesn’t work.

And I don’t know what obj is, although I suppose it refers to the text below “click here to end the experiment”, as the message pops up when clicking there.

More detail is needed here. Do you mean you get a syntax error on the right hand side?

Have you looked at my crib sheet?