SuperLab CLI

I stumbled across this very interesting usage message from SuperLab:

The following options can be specified when running SuperLab Pro 4 from a command line:

Usage: SuperLab 4 [-h] [–verbose] [-r] [-q] [–nosplash] [-e <str>] [-g <str>] [-o <str>] [-n <str>]
-h, --help show this help message
–verbose generate verbose log messages
-r, --run run experiment when SuperLab is launched (requires -e)
-q, --quit quit SuperLab after running experiment (implies -r, requires -e)
–nosplash don’t show splash screen on startup
-e, --expfile=<str> experiment to open
-g, --group=<str> participant group name (implies -r, requires -e)
-o, --outputfile=<str> collected data file (implies -r, requires -e)
-n, --name=<str> participant name (implies -r, requires -e)
If this is fully supported and will continue to be supported, it will definitely be a very useful capability.

Greg Shenaut

It works on Windows too. :smiley:

Currently, SuperLab doesn’t do anything with the “–verbose” flag. This is provided and used by the host API on which SuperLab is built.

There is actually some basic documentation about this in the help files, though it’s not much more informative than what you’re already seeing.

In addition to the above flags, you can also create a SuperLab.ini file and specify these settings in that file. I didn’t find any documentation on this feature. It’s supported, but apparently, it’s currently undocumented (oops).

Here’s what my SuperLab.ini file currently looks like:

Language = default
SupressSplash = false
#DefaultExperimentDir = /Users/<me>/Documents/SuperLab Experiments

#File = /Users/<me>/Documents/superlab3/experiments/macosx/Letter Rotation (correct resp. tied to code values).sl4
#RunExperiment = no
#QuitAtExperimentEnd = true
#ParticipantGroup = NoInstructions
#DataOutputFile = /Users/<me>/Documents/auto_run_results.txt
#ParticipantName = Hank

Obviously, you’ll fill in your own values. You can either place this file in your Documents folder, or in the same folder as the binary executable. On Windows, this means “C:\Program Files\SuperLab 4.0\SuperLab.ini.” On Mac OS X, it means inside the application bundle at “SuperLab” Also, note that the “#” at the beginning of the line disables that option.