#### Welcome!

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

# Creating a batch file for opensesamerun

Posts: 3

Hello

I am another Open University student who is (fairly) new to opensesame and am going about recruiting participants remotely. So far I have only been able to recruit people who have OS installed on their machines. I am interested in making a zip file containing a copy of my experiment and a means to run it, so I could send the file to participants who do not have OS installed and they could send their results back to me. The experiment is a facial recognition task which just records keyboard responses and reaction time. I have seen a few people mention batch files and opensemerun in old threads on here, this seems like it may be a good option but I don't have any experience of making batch files (or coding in general).

So I have the following questions:

1) Is this possible (or have I overlooked something)
2) What is the most space-efficient method of storing my experiment and a means to run it (i.e. are there files I could get rid of in the openseseme no-installation file)
3) Is there a step-by-step guide to running an OS experiment using a batch file anywhere?

Many thanks

Tom

• Posts: 2,516

Hi Tom,

1) Is this possible (or have I overlooked something)

Absolutely!

2) What is the most space-efficient method of storing my experiment and a means to run it (i.e. are there files I could get rid of in the openseseme no-installation file)

Which files can be safely deleted depends on which libraries you use in your experiment. You could try to first find large files that might actually be worth deleting; then delete them; and then see if the experiment still runs. Honestly though, I think you'll spend quite a bit of time to save very little space.

3) Is there a step-by-step guide to running an OS experiment using a batch file anywhere?

A batch file is simply a text file with commands that you could also execute in the windows command prompt (cmd.exe). So if you would create a file called run_experiment.bat in the OpenSesame folder with the following line it:

opensesamerun.exe "path\to\experiment.osexp" -s 0 -l logfile.csv -f


That should do the trick: You can just double-click on it to run the experiment.

Cheers!
Sebastiaan

Thanked by 1TApps

There's much bigger issues in the world, I know. But I first have to take care of the world I know.
cogsci.nl/smathot

• Posts: 3

Thanks for your response Sebastiaan. After a bit of playing with the files you're absolutely right in that I could end up wasting a lot of time not getting very far (it wouldn't be the first time). It seems that my idea of a downloadable zip file that anyone could open, though possible, wouldn't be practical as it would be way to large for anyone to consider downloading. I'll have to go back to the drawing-board, the joys of distance learning eh.

Thanks again for all your help

Tom

• Posts: 2,516

It seems that my idea of a downloadable zip file that anyone could open, though possible, wouldn't be practical as it would be way to large for anyone to consider downloading.

Is it though? We actually distribute OpenSesame to students for running experiments as well, and I don't think—in this day when streaming hi-def video is normal—that anyone thinks twice about downloading 300 mb. (Although this obviously depends on the environment.)

There's much bigger issues in the world, I know. But I first have to take care of the world I know.
cogsci.nl/smathot

• Posts: 3

Yes while a file of 300mb would probably be fine for most people to download, I had found that for opensesamerun to run everything had to be uncompressed, a process that took around ten minutes and pushed the file size up to more around 700mb. Unless I'm mistaken (or my computer's just very slow) this would mean either putting up a huge ~700mb file or expect people to wait for everything to be uncompressed, at which point I may as well just ask them to download and install OS from here.

• Posts: 2,516

Yes, you indeed need to send a compressed archive (a zip usually), and then have participants uncompress it. Windows' built-in unzipper takes ages to do this; programs like 7-zip are much faster.

Thanked by 1TApps

There's much bigger issues in the world, I know. But I first have to take care of the world I know.
cogsci.nl/smathot