The Keyboard Redirection Menu allows DigImage to be switched into 'batch' mode. In batch mode, key strokes are read from a specified file rather than from the keyboard, allowing unattended running of DigImage. However, routines which necessarily require user intervention (such as synchronising the grab options from the Grab and Display submenu; note that the Control Video option V has an alternative Grabbing routine which does not require user synchronisation), will wait until the user takes the appropriate action. In addition, warning conditions will wait for the user to permit continuation. Error conditions will terminate the command file input and return control to the keyboard.
The command file should not use any of the commands accessed by non-printable characters (eg. function keys).
The file structure is simply a list of the key presses, or input (numerical or string), with one entry per line, just as you would type them from the keyboard. Command files should normally start with a <;> command to return to the main menu. With the exception of string input lines, comments may be included after the input on the same line. Blank lines are completely ignored. If you wish to include pass DigImage an empty line, then utilise the !B directive. In addition the following commands are available at the start of each line:
# comment Comment - ignore.
!^ comment Comment - print on screen. Useful for generating
prompts.
!% comment Comment - print on screen, beeping. Useful for
generating prompts and warning messages.
!$ comment Comment - print on screen then "Press any key to
continue.
!" Print quoted text - prints out (without any further
processing) all the text following this command up
until the next occurance of !".
!{command parameter_list}
Execute complex command, replacing !{...}
expression with the resulting value. Any variables
within the braces ({}) are substituted BEFORE
interpreting the command. Note that these !{...}
commands can not be nested. Valid commands are:
!{CHARACTER iChar char_list} returns the character
in the iChar-th position in char_list. Thus
!{CHARACTER 3 ABCD} will return "D". If no
char_list is specified, then the ASCII character
corresponding to iChar will be returned (e.g.
!{CHARACTER 66} will return "B").
!{COMPARE string1 string2} returns 1 if
string1>string2, 0 if string1=string2 and -1 if
string1<string2.
!{ENVIRONMENT aspect} returns some detail about a
particular aspect of the environment in which
DigImage is running. The string aspect can be one
of
BUFFERS Returns the total number of
buffers (same as !!N)
DIGIMAGEPATH The path where DigImage is
installed
ONBOARD Returns the number of
onboard buffers
THISPATH The current working directory
!{EVAL val0 val1 ... key expr} evaluates the
expression expr, written in terms of the variables
indicated by key. Each of the characters in key
must have a corresponding value val0, val1,...
!{EXIST file} Returns -1 (true) if the specified
file exists, and 0 (false) if it does not.
!{FILEPATH iComponet file} Returns part of file
and/or path name specified by iComponent:
iComponent<=7
bit0 Base file name
bit1 Extension
bit2 Full name of directory
iComponent >7
8 Name of top directory
!{FORMAT value format} converts the numerical
"value" into the specified "format". This command
understands the common Fortran number formats,
e.g. F10.3, G12.2, E10.4, I3, Z2.
!{INDEX substring string} returns the position of
the substring within the string. Note that the
substring starts at the first non space character
after the INDEX and is terminated by the first
space character after that point.
!{LEFTSTR nChars string} returns first nChars
characters of the specified string.
!{LENGTH string} returns the length of the
specified string in characters.
!{MAPXYTOI x y} Returns the i pixel coordinate
corresponding to x y
!{MAPXYTOJ x y} Returns the j pixel coordinate
corresponding to x y
!{MAPIJTOX i j} Returns the x world coordinate
corresponding to i j
!{MAPIJTOY i j} Returns the y world coordinate
corresponding to i j
!{NUMSTRING iColumn string} returns the numerical
value in the iColumnth position in the specified
string. Each number in string is assumed to be
separated by one or more spaces or comma
characters. Note that this command is identical
to !{TIMESTRING ...} as they both understand
understand both number and time formats.
!{PRESSCHAR key_list} returns the character
pressed, provided it is in key_list. All
alphabetic characters are converted to upper case.
Special keys return their lower case codes (see
!{PRESSKEY key_list} for details). If no key_list
is specified, then !{PRESSKEY} simply returns the
character pressed.
!{PRESSKEY key_list} waits for the pressing of one
of the keys listed in key_list. Once a key in
key_list has been pressed, this command returns
the ordinal position of that key in the key_list.
For example, !{PRESSKEY ABCD} would return the
number 3 if <C> were pressed. Note that alphabetic
keys produce upper case letters, and these must be
given as upper case in key_list (i.e. !{PRESSKEY
abcd} would not return if <C> were pressed). The
following lower case letters are reserved for
special keys:
u up arrow
d down arrow
l left arrow
r right arrow
p page up
o page down
h home
e end
i insert
x delete
thus !{PRESSKEY udlr} would return 2 if the down
arrow cursor key were pressed. If key_list is
blank, then !{PRESSKEY} returns the ASCII value
of the key pressed.
!{READNUM iLine iColumn file_name} returns the
numerical value in the number column iColumn of
line iLine. Each number column is assumed to be
separated by one or more space or comma
characters.
!{READSTR iLine iColumn nChars file_name} returns
the nChars characters starting in character column
iColumn of line iLine in the specified file.
!{RIGHTSTR nChars string} returns the last nChars
characters of the specified string.
!{SEARCHFILE [iLine] iColumn key_value file_name}
returns the line number in the file file_name
where the specified numeric key_value may be found
in column iColumn. The search will normally begin
from the start of the file. If the optional iLine
is specified, then the search will begin from
iLine. In either case the returned value is
relative to the start of the file. The main
purpose for this command is to facilitate the
reading of experimental data databases by command
files.
!{TIMESTRING iColumn string} returns the time
value in the iColumnth position in the specified
string. Each number or time in string is assumed
to be separated by one or more spaces or comma
characters. Note that this command is identical
to !{NUMSTRING ...} which understands both number
and time formats.
!B Indicates a blank line. The !B directive may be
used instead of a blank line. The advantage is that
a comment may be included after the !B on the blank
line. Note that !B is not equivalent to # as !B is
accepted as input, while # lines are ignored. The
!B must occupy the first two non-blank characters
of the line. Note that empty lines in the command
file will be ignored and NOT treated as blank lines
by DigImage.
!C directory Change directories to that specified. The !C must
occupy the first two non-blank characters of the
line.
!D Returns the name of the current working directory.
This may occur anywhere on the line.
!E file_name Erase (delete) the specified file name. The !E must
occupy the first two non-blank characters of the
line.
!F [file_name] Open the specified file name for macro output
(using the !W directive). If no file name is given,
then !F will close any file previously opened by
!F. The !F must occupy the first two non-blank
characters of the line.
!FB file_name Browses the specified file using the Help system
browser.
!FR old new Renames the file old as new. If new already
exists, then a warning will be generated and no
action is taken.
!GC The name of the currently executing command file.
If a nested command file is executing, then the
name of this file is returned. If no command file
executing, then blank.
!GD String giving the current date in dd/mm/yy for
50Hz systems and mm/dd/yy for 60Hz systems.
!GP The name of the outer-most level of the current
plot file. If no plot file execution, then blank.
!GT String giving the current time in hh:mm:ss.
!I dos_command Interpret the specified DOS command. The return
code is available in !!R0 on completion. Note that
this directive may fail due to insufficient
memory.
!K Take alphanumeric string from keyboard (this may be
used anywhere on the command file line). This
directive is similar to !!K except that it accepts
string as well as numeric text.
!L text Take input from the command file, even if the
prompt normally forces input to be from the
keyboard (eg. the "Press any key to grab frame (C
for continuous acquisition)" prompt in [;GG Grab
single frame]).
!M buffer Erase the specified buffer. If no buffer number is
specified, the current output buffer is erased.
!N Clear the computer's display.
!P If given without a file name within a command
file, then execution of that command file is
suspended to allow interactive input. To resume
the command file, type !P from the keyboard. While
the command file is suspended, the status panel
will show "CMD file suspended".
!P [value0 value1 ...] file_name
Execute the command file procedure specified by
file_name. Command file procedures are themselves
complete command files. Execution of this command
passes control to the specified command file. On
completion of that command file, control is
returned to the calling command file. Command file
procedures may be nested and may be recursive.
If the specified file is not found in the current
directory, then DigImage will first search the
path specified by [P Set command file search
path], and, if it is still not found, then the
DigImage\Macro directory is searched.
To ensure a procedure command file operates from a
known location within DigImage, you should
normally start the procedure with the <;> command
to return to the main menu before the body of the
code is executed. The !P must be the first two
non-blank characters of the line.
All string variables (!0 to !9) and all numeric
variables (!!0 to !!9 and !!a to !!z) are treated
as local variables within the nested command file.
Any changes made within the nested command file do
not alter the values on return from the command
file. If values are to be returned, then they may
either be recovered using the !Pn and !!Pn
variable return syntax (see below), or the !PA...
(!!a to !!z global), !PG... (all variables
global), !PO... (!!a to !!z and !0 to !9 global)
or !PS... (!0 to !9 global) variants may be used
(see below).
Note that the outermost command file (i.e. the one
started by the user, either from within DigImage
or at the MS-DOS prompt) all the variables are
considered global in that changes made within the
command file affect the base DigImage values. If
you do not wish this to occur, start the command
file with !PL ... to force all variables to be
local.
If the optional value0, value1, ... are specified,
then these will be available in the nested command
file as variables !!0, !!1 etc. Up to ten such
values may be specified. If fewer values are
specified, then the remaining !!n variables retain
the values they had in the calling command file.
Thus there are two mechanisms for passing
parameters: they may be assigned to the !!0, !!1
etc. variables prior to the !P directive, or they
may be included in the !P directive line.
!PA [value0 value1 ...] file_name
This directive is identical to !P ... except that
the numeric variables !!a to !!z are treated as
global. Any changes made in the nested command
file are maintained on exit from the command file.
The !!0 to !!9 and !0 to !9 variables are still
treated as local.
!PG [value0 value1 ...] file_name
This directive is identical to !P ... except that
all the numeric variables (!!0 to !!9, !!a to !!z
and !0 to !9) are treated as global. Any changes
made in the nested command file are maintained on
exit from the command file.
!PL [value0 value1 ...] file_name
This directive is identical to !P ... except that
all the variables are treated as local even for
the outermost command file level. Thus if the
command file is to be executed from the command
file and have no effect on the base DigImage
variables, then it should be started with !PL ...
!PM Suspends a command file until the next time
DigImage enters a menu or !P is pressed.
!PO [value0 value1 ...] file_name
This directive is identical to !P ... except that
the numeric variables !!a to !!z and string
variables !0 to !9 are treated as global. Any
changes made in the nested command file are
maintained on exit from the command file.
The numeric variables !!0 to !!9 are still treated
as local. Note that this was the effect of the
!P... command prior to DigImage version 1.3.
!PQ Suspends a command file until the next time a menu
is exited by <Q>, <;> or <escape>, or !P is
executed.
!PR plot_file [options]
This new command file directive invokes DigiPlot
within the context of DigImage or Trk2DVel. The
specified plot_file will be rendered, by default,
on the computer monitor. To render on the frame
grabber buffer, use the /B [buffer_number] switch.
All the standard DigiPlot command line options are
supported except for /H (help). Refer to the
DigiPlot Users Guide for full details on the
options.
Note that while the !PR directive may be issued
from anywhere within a command file, it may have
unexpected side effects if issued from within a
menu option.
!PS [value0 value1 ...] file_name
This directive is identical to !P ... except that
the string variables !0 to !9 are treated as
global. Any changes made in the nested command
file are maintained on exit from the command file.
The numeric variables !!0 to !!9 and !!a to !!z
variables are still treated as local.
!Pn Read-only psuedo variable (with n in the range 0
to 9) returning the value of the !n string
variable immediately prior to the return from the
last nested command file. This provides a
mechanism for returning string variables used in
nested command files started with the !P ...
directive and its derivatives.
!Rn Read only system string variable. These variables
(!R0 to !R9 and !Ra to !Rz) are used to return
string values from DigImage to a command file (or
the user). Details of the value returned (where
one is returned) may be found in the help file for
the associated routine.
!RD Read only system string variable. This variable
returns the current default value for a => type
prompt. If there is no default value, a null
string (zero length) is returned.
!RU Read only system string variable. This variable
returns the current world length units.
!S OFF Turns off all screen output (except that due to
!$, !^, !%, errors or warnings) while in a command
file.
!S ON Turns on screen output previously suppressed by
!S OFF.
!SW OFF Turns off WARNING messages when in a command file.
Warning messages may be re-enabled by !SW ON or
simply !SW. The warning messages will be
automatically enabled when the command file
terminates. When turned off, the command file will
simply continue execution as though the warning
had not been generated.
!SW ON Turns on WARNING messages previously turned off by
!SW OFF.
!T seconds Delays execution for the specified time (in
seconds).
!W text Write the specified text to the file previously
opened by !F file_name. Note that any
DigImage variables or replaceable string parameters
will be substituted before the write is performed.
The !W must be the first two non-blank characters
of the line.
!WI image_file Write the current output buffer to a compressed
DigImage .PIC file.
!:Label Unconditional jump to the specified label. The
label is defined by !!:Label.
!n Replaceable parameter, where n is a digit from 0 to
9 (inclusive). These parameters are specified from
[F Take input from a file]. Note that replaceable
parameters can not be used if the command file is
started from the command line using /CF file.
!n:=string Assign the specified string (which may include
DigImage variables and replaceable parameters) to
the string parameter !n, where n is a digit from 0
to 9 (inclusive). For example !1:=!K may be used
to set string parameter 1 to a value entered from
the keyboard.
!!n Use variable n, where n is a digit from 0 to 9
(local variables, restored on return from a !P
call) or a lower case letter (global variables
which are affected by a !P call): there are 36
possible variables. Note that all command file
variables are stored and processed as real values.
However, whether they appear as real or integer
input to DigImage depends on the syntax through
which they are accessed. This !!n form produces an
integer value occupying the minimum required space.
Note that if !!n is included on the right hand side
of an expression, then only the integer value will
be used. To utilise the real value, you must
specify one of the real replacement specifiers
(!!En, !!Fn or !!Gn).
!!_n Indirect access to variable. The contents of !!n is
taken as an integer value (m, say) and used as an
index to the variables (to give !!m). The effect of
this may be expressed as !!(!!n), although this is
not a valid syntax. !!0 to !!9 are accessed
indirectly through values 0 to 9 while variables
!!a to !!z are accessed indirectly through 10 to
35. If the index variable (!!n) contains a value
outside the range 0 to 35, then an error will be
generated.
!!Smn As for !!n except that the integer value takes up
m characters and uses leading blanks (spaces).
!!Zmn As for !!n except that the integer value takes up m
characters and includes leading zeros. !!Zmn
!!En As for !!n except that the full real value is
accessed as E12.5.
!!Fn As for !!n except that the full real value is
accessed as F12.5.
!!Gn As for !!n except that the full real value is
accessed as G12.5.
!!K Pseudo variable: requests numeric keyboard input.
In this form the input is taken as integer. The !!S
!!Z !!E !!F and !!G modifiers apply.
!!B Pseudo variable: requests a buffer number to
be input from the keyboard input. The routine is
similar to !!K except that it will always return an
integer and performs a range check on the buffer
number.
!!T Pseudo variable: requests keyboard time input.
This variable is similar to !!K except that the
minutes:seconds and ::fields formats may be used.
In this form the input is taken an integer number
of seconds. The !!S !!Z !!E !!F and !!G modifiers
apply.
!!C Read/write system variable returning or setting the
current logical output buffer. WARNING: if this
variable is set while executing an option,
unpredictable results may somethimes occur as the
contents of buffer 0 may be different from what the
option expects.
!!D Read only system variable returning the current
onboard output buffer.
!!H Read/write system variable returning or setting the
current video multiplexer channel for the optional
DT-2859.
!!I Read only system variable returning the intensity
of the point last accessed by the location cursor.
Note that the location cursor is utilised by a
large number of the DigImage facilities. To ensure
the desired point is accessed, it may be advisable
to access the cursor through the [;GZ Zoom &
pan/locate points] option prior to using the value
of !!I.
!!J Read only system variable returning the intensity
of the cell of five points centred on the point
last accessed by the location cursor (this is the
Average intensity displayed by this submenu). Note
that the location cursor is utilised by a large
number of the DigImage facilities. To ensure the
desired point is accessed, it may be advisable to
access the cursor through the [;GZ Zoom &
pan/locate points] option prior to using the value
of !!J.
!!L Read only system variable returning the current
nesting level for command files. The top most
command file will have a level 0, and any command
file called (through the !P procedure) from it will
have a level of 1. Likewise, the next level of
nesting will be 2 and so on. This variable provides
a mechanism for testing to see if a command file
has been nested.
!!M Read only system variable returning maximum buffer
number.
!!N Read only system variable returning the number of
buffers (!!M+1).
!!O Read/write system variable returning or setting the
current logical output look up table.
!!PN In plot files, returns the number of points
plotted since the last N plot instruction.
!!PW In plot files, returns a bit flag indicating where
the plot is being rendered. The bit assignments
are:
bit 0 On frame grabber buffer
bit 1 On computer monitor
bit 2 As a PostScript file.
!!PX In plot files, returns the x coordinate of the last
point plotted.
!!PY In plot files, returns the y coordinate of the last
point plotted.
!!PZ In plot files, returns the z coordinate of the last
3D point plotted.
!!Pn Read-only psuedo variable (with n in the range 0
to 9 or a to z) returning the value of the !!n
numeric variable immediately prior to the return
from the last nested command file. This provides a
mechanism for returning numeric variables used in
nested command files started with the !P ...
directive, or its derivatives.
!!Rn Read only system variable. This variable allows
results from some DigImage facilities to be
comunicated to a command (or plot) file. There are
ten such variables available, !!R0 to !!R9. Not
all DigImage menu items currently return values
in these variables. Refer to the help text for
specific menu items for details of what data is
returned (if any) by that item. Note that these
variables should only be accessed while a command
file is the menu immediately following completion
of the option which set them. If this is not
done, the !!Rn values may be unpredictable.
!!U Read only system variable returning the field rate
(in Hz) for the video system being used (ie. 50 or
60).
!!V Read only system variable returning the current
position of the VTR in seconds.
!!WT Read only system variable returning the current i
coordinate of the top of the current default window.
!!WB Read only system variable returning the current i
coordinate of the bottom of the current default
window.
!!WL Read only system variable returning the current j
coordinate of the left of the current default
window.
!!WR Read only system variable returning the current j
coordinate of the right of the current default
window.
!!WI Read only system variable returning the vertical
pixel coordinate of the last location of the
cursor.
!!WJ Read only system variable returning the horizontal
pixel coordinate of the last location of the
cursor.
!!WX Read only system variable returning the x world
coordinate of the last location of the cursor.
!!WY Read only system variable returning the y world
coordinate of the last location of the cursor.
!!n:= expression Set the variable to the result of the specified
expression. The expression may include constants,
variables and/or replaceable string parameters.
Expressions are evaluated from left to right
without the normal operator precedence. For example
!!1:= (!!0+2)^(2+!!G2/3)
is equivalent to the Fortran
v1 = (INT(v0)+2.0)**((2.0+v2)/3.0)
Allowable operators currently include:
+ Addition
- Subtraction
* Multiplication
/ Division
^ Exponentation
MOD Modulo arithmetic
Bit-wise operators (use integer part)
% Bit-wise OR
& Bit-wise AND
$ Bit-wise Exclusive OR
Logical operators (true<>0, false=0)
OR Logical OR
AND Logical AND
EOR Logical Exclusive OR
Comparative operators (return true=1 or false=0):
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
= Equal to
<> Not equal to
Other
MAX The larger value
MIN The smaller value
Brackets may be nested up to 10 levels. The
following functions of one arguement are also
supported (not case sensitive):
LOG(..) Logarithm, base 10
LN(..) Natural logarithm
EXP(..) Exponential
SQRT(..) Square root
SIN(..) Sine (angle in radians)
COS(..) Cosine (angle in radians)
TAN(..) Tangent (angle in radians)
ASIN(..) Inverse sine function
ACOS(..) Inverse cosine function
ATAN(..) Inverse tangent function
SINH(..) Hyperbolic sine
COSH(..) Hyperbolic cosine
TANH(..) Hyperbolic tangent
ABS(..) Absolute value
SGN(..) Sign (-1 for negative, 1
for positive and 0 for
zero)
NOT(..) Logical NOT of integer
part.
!!n+= expression Increment the variable by the result of the
specified expression. For more details on
expressions consult the entry for !!n:= expression
above.
!!n-= expression Decrement the variable by the result of the
specified expression. For more details on
expressions consult the entry for !!n:= expression
above.
!!n*= expression Multiply the variable by the result of the
specified expression. For more details on
expressions consult the entry for !!n:= expression
above.
!!n/= expression Divide the variable by the result of the
specified expression. For more details on
expressions consult the entry for !!n:= expression
above.
!!n= expression Test for equality - see below.
!!n< expression Test for variable less than value - see below.
!!n> expression Test for variable greater than value - see below.
!!n<= expression Test for less than or equal - see below.
!!n>= expression Test for greater than or equal - see below.
!!n<> expression Test for inequality - see below.
!!nc expression STOP Test the internal variable !!n against the
value of the specified expression, where c is one
of =, < , >, <=, >= or <>. If satisfied, then
terminate the command file. For more details on
expressions, consult the entry for !!n:= expression
above.
!!nc expression :Label Test the variable !!n against the value of
the specified expression, where c is one of =, < ,
>, <=, >= or <>. If satisfied, then jump to the
label !!:Label. For more details on expressions,
consult the entry for !!n:= expression above.
!!:Label Target label for conditional (!!n?!!m :Label) or
unconditional (!:Label) jumps.
If it is necessary for a line to start with a # or ! then the character should be escaped by an @ symbol. Similarly, @ will yield a single @.
Replaceable parameters (!n) and variables (!!n) may be used anywhere within a line in a command file. Use of a ! within the line for other purposes must be escaped using an @. Note that there is no need to escape an @ character. The following parameter and variable commands are valid within the line:
!n Replaceable parameter, where n is a digit from 0 to
9 (inclusive). These parameters are specified from
[F Take input from a file]. Note that replaceable
parameters can not be used if the command file is
started from the command line using /CF file. The
parameter will take as much space as it requires,
replacing the initial !n.
!n:=string Assign the specified string (which may include
DigImage variables and replaceable parameters) to
the string parameter !n, where n is a digit from 0
to 9 (inclusive). For example !1:=!K may be used
to set string parameter 1 to a value entered from
the keyboard.
!!n Use variable n as an integer value, where n is a
digit from 0 to 9 (local variables) or a lower case
letter (global variables). The integer value will
take up as many characters as is necessary for its
size.
!!Smn As for !!n except that the integer value takes up m
characters and uses leading blanks.
!!Zmn As for !!n except that the integer value takes up m
characters and includes leading zeros.
!!En As for !!n except that the full real value is
accessed as E10.4.
!!Fn As for !!n except that the full real value is
accessed as F10.4.
!!Gn As for !!n except that the full real value is
accessed as G12.6.
!!K Pseudo variable: requests numeric keyboard input.
In this form the input is taken as integer. The !!S
!!Z !!E !!F and !!G modifiers apply.
!!B Pseudo variable: requests a buffer number to
be input from the keyboard input. The routine is
similar to !!K except that it will always return an
integer and performs a range check on the buffer
number.
!!T Pseudo variable: requests keyboard time input.
This variable is similar to !!K except that the
minutes:seconds and ::fields formats may be used.
In this form the input is taken an integer number
of seconds. The !!S !!Z !!E !!F and !!G modifiers
apply.
!!C System variable returning the current logical
output buffer.
!!D System variable returning the current onboard
output buffer.
!!H System variable returning the standard devaiation
of the intensity of the cell of five points centred
on the point last accessed by the location cursor
(this is the Average intensity displayed by this
submenu). Note that the location cursor is utilised
by a large number of the DigImage facilities. To
ensure the desired point is accessed, it may be
advisable to access the cursor through the [;GZ
Zoom & pan/locate points] option prior to using the
value of !!J.
!!I System variable returning the intensity of the
point last accessed by the location cursor. Note
that the location cursor is utilised by a large
number of the DigImage facilities. To ensure the
desired point is accessed, it may be advisable to
access the cursor through the [;GZ Zoom &
pan/locate points] option prior to using the value
of !!I.
!!J System variable returning the intensity of the
cell of five points centred on the point last
accessed by the location cursor (this is the
Average intensity displayed by this submenu). Note
that the location cursor is utilised by a large
number of the DigImage facilities. To ensure the
desired point is accessed, it may be advisable to
access the cursor through the [;GZ Zoom &
pan/locate points] option prior to using the value
of !!J.
!!L System variable returning the current nesting level
for command files. The top most command file will
have a level 0, and any command file called
(through the !P procedure) from it will have a
level of 1. Likewise, the next level of nesting
will be 2 and so on. This variable provides a
mechanism for testing to see if a command file has
been nested.
!!M System variable returning maximum buffer number.
!!N System variable returning the number of buffers
(!!M+1).
!!O System variable returning the current logical
output look up table.
!!U Read only system variable returning the field rate
(in Hz) for the video system being used (ie. 50 or
60).
!!V Read only system variable returning the current
position of the VTR in seconds.
!!W System variable returning the current i coordinate
of the top of the current default window.
!!X System variable returning the current i coordinate
of the bottom of the current default window.
!!Y System variable returning the current j coordinate
of the left hand side of the current default
window.
!!Z System variable returning the current j coordinate
of the right hand side of the current default
window.
Command files may be started up from any menu using <shift><f12>. Note that this will cause any current activity to terminate. DigImage always returns to the main menu before starting up a command file, thus any file to be started using <shift><f12> must assume it is in the main menu, regardless as to from where it was invoked.
As an alternative, DigImage may be started up using a command file from the MS-DOS prompt by using the /CF switch. For example,
DigImage /CF CmdFile.CMD
or
call DigImage Contours /CF C:\Example\Test.CMD
In the first example, DigImage will be started up using the last used module, and the command file CmdFile.CMD (in the current directory) will be run. In the second example, DigImage will be started up using the Contours module (this will save DigImage from having to swap to this module under the control of the command file), running the command file C:\Example\Test.CMD. The 'call' statement is needed if DigImage is being started from within a batch file ('call' will ensure control is returned to the batch file once DigImage exits), thus enabling complex batch jobs to be set up and executed. Note that there must always be a single space character between the /CF switch and the command file name. When the command file is finished, control will be returned to the keyboard (assuming the command file has not exited DigImage).
If DigImage is unable to find the specified command file in the current directory, it will look in the directory %DigImage%\Macros to see if it has previously been defined as a DigImage macro with system-wide access. Note that a DigImage macro has a form identical to a command file.
Command files can not be used to access any function key facilities (eg. the help facility) nor the index facility.
This option starts the command file. The name of the file will be displayed in the status panel during execution, unless DigImage must change from one program to another. If this change is necessary, the remainder of the command file is first copied to a temporary file - the name of this temporary file will then be displayed instead.
This may be used within a file to return the control to the keyboard. Note that if the end of the file is reached, then the control will be returned to the keyboard anyway.
This option sets the search path for command files. If no explicit path is given when starting a command file, then the file is first searched for in the current directory. If it is not found there, it is next searched for in the directory specified by this option. Finally, if still not located, the DigImage\Macros directory is searched.
This option allows the initial values of the DigImage replaceable string parameters !n (where n is a single digit from 0 to 9 inclusive) to be specified. Note that this is the only mechanism currently supported for specifying the value of the replaceable string parameters.
This option allows the initial values of the DigImage variables !!n (where n is either a digit or a lower case letter) to be specified. Note that variable operations may modify the values set by this option. Note that in general it will be more convenient to utilise the !!K pseudo variable to request a value directly from the user from within a command file.
This option allows the interactive setting of the default DigImage window without any other consequences. Input will be taken from the keyboard, even if a command file is open.