Sophie

Sophie

distrib > Fedora > 13 > i386 > media > os > by-pkgid > 1c37166989e9c6815a93b02b27142e84 > files > 7

msort-8.53-1.fc13.i686.rpm

On startup, msg attempts to read an initialization
file called .msgrc. It looks first in the current
working directory, then in the user's home directory.

An initialization file consists of a Tcl program. In addition to the
primitives of the Tcl language, commands specific to the configuration of
Msg are available. For most purposes you do not need to know
anything about programming in general or Tcl in particular - you can just
treat the initialization file as a sequence of parameter settings - but
you can make use of the Tcl interpreter if you wish to. The initialization
file is read by a safe interpreter. This means that some commands
and other facilities of the language are made unavailable for security
reasons.

A simple initialization file consists of a series of parameter setting commands.
Some commands take Boolean arguments, that is, they say yes or no.
All such commands have names ending in "P".
For example, the command BalloonHelpShowP is used to enable or disable
balloon help. If you want to disable balloon help, give the command:


BalloonHelpShowP off

You can use on and off as in this example, or a variety of
alternatives, including yes and no,
t and f, and 1 and 0.

Other commands take non-Boolean arguments. Examples are:

MenubarBackgroundColor \#C36176
BalloonHelpFontFamily  helvetica
BalloonHelpFontSize    12
BalloonHelpFontSlant    roman
BalloonHelpFontWeight    bold
BalloonHelpFontUnderline underline

The first line is a typical color setting. The command name consists of
the name of the object followed by the aspect of the object whose
color is to be set. The single argument of the command is the
color. You can use color names like salmon or you can
indicate the color you want by specifying its mixture of red, green, and blue.
The second line exemplifies this.


A numerical color specification begins with a crosshatch. Since a crosshatch
has a special meaning to Tcl, it is preceded by a backslash to give it
its ordinary meaning. The main part consists of three groups of two
characters. The first group specifies the amount of red, the second the amount
of green, and the third the amount of blue. Each pair of characters represents
two hexadecimal (base 16) digits. The hexadecimal digits are:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, and F. The proportion of each
 primary color is therefore specified as a number ranging from 00 (0*16 + 0*1 = 0) to
FF (15*16 + 15*1 = 240 + 15 = 255).

The next five lines exemplify font settings. The command name indicates
what aspect of the program the font is used for and which of the five
properties is set. Such commands take a single argument. The choices
for slant are roman and italic, for weight normal and bold,
and for underlinging normal and underline. Font size is
given in points. The font family should be the name of a font family
available on your system. 

The command Initialization File Commands on the Help menu
provides a complete list of the commands that you can use in your initialization
file. You can write the list out to a file or pop it up on the screen.
This list contains only the commands specific to Msg. The commands
that are built in to Tcl are described in a variety of books and
web sites.

There are just a few things you need to know about Tcl. One is that
a crosshatch begins a comment. Any line beginning with a crosshatch will be
ignored. If you want to put a comment on the same line as a command,
you must end the command with a semi-colon. 

A second is that certain other characters have a special meaning
to Tcl. If you include such characters you may unintentionally be
telling Tcl to do something that you did not intend. In Tcl
square-brackets enclose a command whose value replaces whatever
was between the square brackets. For example, the command:

puts "The current time is [clock format [clock seconds]]."

says to print the string The current time is followed by
the current time and date. The command [clock seconds] returns
the number of seconds since midnight, January 1, 1970. The command
[clock format] takes this value and converts it into a string
representing the time and date in a more conventional manner. This
string becomes part of the overall string. The result looks like this:

Sun Aug 14 21:06:47 EDT 2005

If you need to include special characters such as square-brackets in
strings and want them to have their ordinary values, you can quote
them with a backslash, e.g. \[..


If you want everything displayed at the outset, put the following
in your init file:

AlgorithmDisplayedP 1
InputFileDisplayedP 1
MiscOptionsDisplayedP 1
OutputFileDisplayedP 1
RecordParseDisplayedP 1
UnicodeDisplayedP 1
ExclusionsDisplayedP 1
KeyFieldIdentificationDisplayedP 1
MiscellaneousOptionsDisplayedP 1
SortOrderDisplayedP 1
SortTypeDisplayedP 1
SubstitutionsDisplayedP 1