User manual
Section 2: TSP Programming Fundamentals Series 3700 System Switch/Multimeter Reference Manual
2-26 3700S-901-01 Rev. C / July 2008
Autorun scripts
When a saved script is set to autorun, it will automatically load and run when the
Series 3700 is turned on. Any number of scripts can be set to autorun. The run
order for these scripts is arbitrary, so make sure the run order is not important.
To set a script for autorun, set one of the following autorun attributes to "yes."
Setting it to "no" disables autorun.
myscript.autorun
script.user.scripts.myscript.autorun
Where: myscript is the user-defined name of the script.
Make sure to save the script in nonvolatile memory after setting the autorun
attribute.
Example:
Assume a script named "test5" is in the run-time environment. Set the script to
autorun as follows:
test5.autorun = "yes" or script.user.scripts.test5.autorun
= "yes"
test5.save()
The next time the Series 3700 is turned on, the "test5" script will automatically
load and run.
NOTE The loadandrunscript name command sets the autorun attribute
for that script to "yes." To cancel it, set the autorun attribute to "no"
and save the script.
Autoexec script
One script can be designated as the autoexec script. When the Series 3700 is
turned on, the autoexec script will start after all the autorun scripts have run.
loadscript autoexec
loadandrunscript autoexec
Form an autoexec script by creating a new script and naming it autoexec (as
shown above using loadscript or loadandrunscript). After loading the
new script, send the autoexec.save() command to save it in nonvolatile
memory. See Creating a user script (on page 2-20) for details on creating a
script.