Model 2657A High Power System SourceMeter® Instrument Reference Manual
Section 6: Instrument programming
2657A-901-01 Rev. B/December 2012
6-45
Retrieve a script as a single string
To retrieve the entire user script source code as a single string, use the
scriptVar.
source
attribute. The
loadscript
or
loadandrunscript
and
endscript
keywords are not included.
To retrieve the source code as a single string, send the command:
print(
scriptVar
.source)
Where
scriptVar
is the name of the script.
Example: Retrieve the source code as a single string
print(test.source)
Retrieve the source of a script named
"
test
".
Output might look similar to:
display.clear()
display.settext("This is a
test") print("This is a
test")
Retrieve a script using TSB Embedded
In TSB Embedded, from the User Scripts list, select the script you want to retrieve. The contents of
the script are displayed. See
(on page 6-36) for more information.
Script example: Retrieve the content of scripts
This set of examples:
•
Retrieves the source of a script using
scriptVar
.list()
•
Retrieves the source of a script using
scriptVar
.source
Содержание 2657A
Страница 3: ......