psychopy.org | Reference | Downloads | Github

Copy online experiment

I wanted to copy a standard online experiment, say digit-span, and include it within my own. I was able to fork it and then copy the components over to my computer. However, when I am in the builder, the js code does not appear for these components (code components). Therefore, when I attempt to run the copied experiment there are lots of errors as the auto js misses important distinctions.

Is there any way to get the JS code that was being previously successfully used in the builder to establish the online experiment.

Are you using PsychoPy 2020?

yes I am. I am aware of the nifty AutoJS, which does work, but it causes many errors. For example it can’t figure out how to translate the code component for showing what the subject is typing on the screen using the .join function.

for reference, I was trying to copy this adaptive DS https://gitlab.pavlovia.org/gadiel22222/digit-span

I tried this, and


for (var idx = 0, _pj_a = key_resp2_2.keys.length; (idx < _pj_a); idx += 1) {
    screen_text += key_resp2_2.keys[idx];
}

doesn’t work because ‘cannot read property ‘length’ of undefined’

do I have to import some module?