![Keithley 2651A Reference Manual Download Page 469](http://html1.mh-extra.com/html/keithley/2651a/2651a_reference-manual_661729469.webp)
Model 2651A High Power System SourceMeter® Instrument Reference Manual
Section 7: Command reference
2651A-901-01 Rev. A / March 2011
7-161
As long as there are variables referencing an unnamed script, the script can be accessed through those
variables. When all variables that reference an unnamed script are removed, the script will be removed from the
run-time environment.
If the new name is the same as a name that is already used for another script, the name of the other script is set
to an empty string, and that script becomes unnamed.
NOTE
Changing the name of a script does not change the name of any variables that reference that script.
The variables will still reference the script, but the names of the script and variables may not match.
Example: Create a new script with no name and then rename it
test7 = script.new("display.clear() display.settext('Hello from my test')", "")
test7()
print(test7.name)
test7.name = "test7"
print(test7.name)
test7.save()
Use
script.new()
to create a script with no name, and then run the script.
Name the script "
test7
", and then save the script in nonvolatile memory.
Also see
(on page 7-155)
(on page 7-162)
(on page 6-43)
scriptVar.run()
This function runs a script.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function No
Usage
scriptVar
.run()
scriptVar
()
scriptVar
The name of variable that references the script
Details
The
scriptVar
.run()
function runs the script; you can also run the script by using
scriptVar
().
To run a factory script, use
script.factory.scripts.
scriptName
()
, replacing
scriptName
with the
name of the desired factory script.
Example
test8.run()
Runs the script referenced by the variable
test8
.