Download Pulsonix Spice Script Users Guide

Transcript
Command Reference 143
Notes
Unshifted letter and number key definitions will not function when a text edit window is active.
Space bar definitions must always be shifted.
The same codes can be used for menu short cuts. See DefMenu command.
Examples
The mc_histo script uses the following command:
D
e
f
K
e
y
C
Q
"
L
e
t
/
n
e
g
l
o
b
a
l
:
a
b
o
r
t
H
i
s
t
o
=
1
"
5
This defines control Q to set a global variable to 1 to force abort on the histogram process. It
resets the key as follows:
D
e
f
K
e
y
C
Q
"
"
The definition for F12 to zoom in a graph is
D
e
f
K
e
y
F
1
2
:
G
R
A
P
H
"
S
i
z
e
G
r
a
p
h
0
0
0
.
8
0
.
8
"
4
This definition only functions when a graph window is active.
Note that the key definition will be lost when Pulsonix Spice is quitted. To make a key or menu
definition permanent you can place the command to define it in the startup file. To do this,
select command shell menu File|Scripts|Edit Startup and add the line above.
DefMenu
DefMenu [/immediate] [/shortcut key_code] [/insert] [/append] menuname command_string
when_to_enable
Defines custom menu. Supersedes DefItem
/immediate
Immediate mode. Command is executed immediately even if another
operation - such as a simulation run - is currently in progress. For
other options the command is not executed until the current operation
is completed. Only a few commands can be assigned with this option.
These are
DefItem
DefKey
Echo
Let
Pause
Quit
ScriptAbort
ScriptPause
ScriptResume
Shell
/shortcut key_code
Specify key or key combination to activate menu. Key description is
placed on right hand side of menu item. For list of possible values see
DefKey command. Note that DefKey has precedence in the event of
the key or key combination being defined by both DefKey and
DefMenu.
/insert
Command isn't executed but the text of the command is placed in the
command line overwriting any existing text.
/append
Command isn't executed but the text of the command is placed in the
command line appended to existing text
menuname
Composed of strings separated by pipe symbol : '|'. First name must be
one of the following:
SHELL
GRAPH
Command shell menu
Graph popup menu