example_first_level.m has an example of how to set up a wrapper script to call the functions here for SPM analaysis.
The scripts assume all SPM functions are in your path. It may be necessary to run the SPM GUI to set your paths. The GUI can be closed. If it is left open, information may print to the GUI, bringing those figures to the fore, which cna be very distracting if you are trying to work on other things while SPM is looping through pariticpants.