2600S-901-01 Rev. C / January 2008 Return to Section Topics 2-41
Series 2600 System SourceMeter® Instruments Reference Manual Section 2: TSP Programming
The following function retrieves a script listing. The script chunk is returned, along with the shell
keywords (
loadscript or loadandrunscript, and endscript):
myscript.list()
where: myscript is the user-defined name of the script.
Example:
Retrieve the listing for a saved script named “test7”:
userscriptlist = test7.list()
print (userscriptlist)
Deleting a script from non-volatile memory
Replacing, changing or deleting a script from the run-time environment does not remove the script
from non-volatile memory. A script can be permanently removed from non-volatile memory using
either of the following commands:
script.delete("name")
script.user.delete("name")
where: name is the user-defined name of the script.
Example:
Delete a user script named “test8” from non-volatile memory:
script.delete("test8")
Restoring a script in the run-time environment
A script is inherently a global variable and can be replaced by assigning a new value or by loading
a new script with the same name. It can also be removed from the run-time environment by
assigning it the nil value. A script can be restored from non-volatile memory back into the run-time
environment using either of the following commands:
script.restore("name")
script.user.restore("name")
where: name is the user-defined name of the script to be restored.
Example:
Restore a user script named “test9” from non-volatile memory:
script.restore("test9")