OS (e.g. Win10): Win10 PsychoPy version (e.g. 1.84.x): 1.90 Standard Standalone? (y/n) If not then what?: y
**What are you trying to achieve?:
I have two seperate experiments which I would like to merge into one for easier presentation to the participants (kids).
**What did you try to make it work?: copy and paste elements does not work from one file to another
Hi @fragmag, it will be useful to know more about your two experiments. Are they completely different tasks, or counterbalanced versions of the same experiment, etc?
Sure, you could do this, where you have two separate loops, one for each experiment, separated by a rest routine, so participants have a chance to rest. Each experiment could use its own routines, or can share them if they follow the same pattern.
Alternatively, you could use a batch file (in Windows) where you would run the batch file to load the experiment Python scripts consecutively, such that when one closes, the other one opens. To do this, open a notepad file, enter the following commands, and save as “runExp.bat” (or whatever you want to call it) and allow any file type when saving, but must have the extension .bat.
In the .bat file, you will want to add the path to PsychoPys version of Python, which will be in the PsychoPy installation folder, and the path to your experiment.py script. For example
I tried out your advice with the batch file, but it doesn’t seem to do the trick for me. For one thing the experiments don’t work properly and the other problem is that the kids would still return to the desktop in between experiments where they could do unwanted things.
Much better for me would be a kind of frame-psychopy-file that calls on my different experiments consecutively. I’m sure others have had the problem of wanting to run more than one experiment?!
Merging them into one file doens’t make sense to me as I want to work on them individually and as it would become quite confusing in the builder view.
Thanks for any ideas!
Thanks for the update. May I ask how the experiments do not work properly? Having a dialog box to run multiple experiments from Builder could be done and would not take too much time too implement, but you will always have the same issue of having one experiment stopping and another loading with a GUI asking for participant names etc, unless you choose to bypass the GUI in Builders Experiment settings. Let me post an issue on GitHub, and see if we can get an experiment runner set up for the next release of PsychoPy.
Hello @dvbridges
one experiment simply crashed, in the other one the images appeared at wrong positions and keyboard input didn’t work.
Would it be possible to copy and paste code from the skript compiler into one big skript?
Thanks for posting on GitHub.
No, thats an error I encountered before with any psychopy experiment (not using the batch file). I rebooted my system, now python is working and I get this error with the bat-file (first experiment). The second experiment worked fine…
Ok, so that suggests that you are passing a position value with too many coordinates. I can replicate this error if, for a position of my stim, I use (0, 0, 0), which would be (x, y, z), not (x, y), which is needed for the screen coordinates. Perhaps we could take a look at your experiment, as see if there are any typos.