Psychopy 3 importing personally coded variables into data file

I created some global variables and used those for feedback purposes in the javascript. It runs well on pavlovia but I need the values for those variables to be saved so I can access them after the experiment is completed, maybe in the same output file psychopy produces.

Is that possible? Any guidance on how I could do this would be awesome, I’m new to javascript.

Best,

You can see these in the Builder-generated files. You want a code component with something like

psychoJS.experiment.addData('resp.keys', resp.keys);

where the first argument (the string) is the name of the column in the data file and the second is the actual variable

3 Likes

Thanks, this worked last week. Love the work you guys do!

1 Like