Section 6: Instrument programming
Models 707B and 708B Switching Matrix Reference Manual
6-42
707B-901-01 Rev. A / August 2010
Figure 84: Rename script
name
value
script.user.scripts table
beepTwoSec
pointer to script named
beep2sec
Global variables
Scripts in the runtime environment
beep2sec
pointer to script named
beep2sec
No
Autorun
beeper.enable = 1
beeper.beep(2, 2400)
script name
source
beep2sec
Example: Change name of existing script to create the autoexec script
Code Notes
test2.name = "autoexec"
test2.save()
Changes name of the script named
test2
to
be
autoexec
. The autoexec script runs
automatically when the instrument is turned on.
It runs after all the scripts have loaded and any
scripts marked as autorun have run.
NOTE
You can also use the
script.new()
and the
scriptVar.source attribute
commands to
create a script with a new name. For example, if you had an existing script named
test1
, you could
create a new script named
test2
by sending the command:
test2 = script.new(test1.source, "test 2")
See
script.new()