Models 707B and 708B Switching Matrix Reference Manual
Section 6: Instrument programming
707B-901-01 Rev. A / August 2010
6-39
Create an unnamed script using script.new
NOTE
Unnamed scripts are not available from the front panel display of the instrument. Only the anonymous
script and named scripts are available from the front panel display.
When you create a script using
script.new()
, if you do not include
name
, the script is added to the
runtime environment as an unnamed script. The
script.new()
function returns the script. You can
assign it to a global variable, a local variable, or ignore the return value. A global variable is not
automatically created.
For example, if you sent the command:
hello = script.new('display.clear() display.settext("hello")')
A script is created in the runtime environment and a global variable is created that references the
script.
To run the script, send the command:
hello()
Figure 82: Create an unnamed script
name
value
pointer to unnamed scrip
t
hello
Global variables
Scripts in the runtime environment
No
Autorun
script name
source
display.clear()
display.settext("hello"))