Series 3700A System Switch/Multimeter Reference Manual Section 11: TSP command reference
3700AS-901-01 Rev. D/June 2018 11-351
scriptVar.save()
This function saves the script to nonvolatile memory or to a USB flash drive.
Usage
scriptVar.save()
scriptVar.save("filename")
The name of variable that references the script
A string that contains the file name to use when saving the script to a USB flash drive
Details
The scriptVar.save() function saves a script to nonvolatile memory or a USB flash drive. The
root folder of the USB flash drive has the absolute path /usb1/.
If no filename is specified (the filename parameter is an empty string), the script is saved to internal
nonvolatile memory. Only a script with filename defined can be saved to internal nonvolatile
memory. If a filename is given, the script is saved to the USB flash drive.
You can add the file extension, but it is not required. The only allowed extension is .tsp (see
Example 2).
Example 1
Saves the script referenced by the variable
test8 to nonvolatile memory.
test8.save("/usb1/myScript.tsp")
Saves the script referenced by the variable
test8 to a file named myScript.tsp on
your USB flash drive.
Also see
Save a user script (on page 10-10)
scriptVar.source
This attribute contains the source code of a script.
Attribute (RW)
(see Details)
Usage
code = scriptVar.source
scriptVar.source = nil
The name of the variable that references the script that contains the source code
A string that contains the body of the script