Debian Codegraph @

Doc/InitializationFiles

raw
1 On startup, msg attempts to read an initialization
2 file called .msgrc. It looks first in the current
3 working directory, then in the user's home directory.
4
5 An initialization file consists of a Tcl program. In addition to the
6 primitives of the Tcl language, commands specific to the configuration of
7 Msg are available. For most purposes you do not need to know
8 anything about programming in general or Tcl in particular - you can just
9 treat the initialization file as a sequence of parameter settings - but
10 you can make use of the Tcl interpreter if you wish to. The initialization
11 file is read by a safe interpreter. This means that some commands
12 and other facilities of the language are made unavailable for security
13 reasons.
14
15 A simple initialization file consists of a series of parameter setting commands.
16 Some commands take Boolean arguments, that is, they say yes or no.
17 All such commands have names ending in "P".
18 For example, the command BalloonHelpShowP is used to enable or disable
19 balloon help. If you want to disable balloon help, give the command:
20
21
22 BalloonHelpShowP off
23
24 You can use on and off as in this example, or a variety of
25 alternatives, including yes and no,
26 t and f, and 1 and 0.
27
28 Other commands take non-Boolean arguments. Examples are:
29
30 MenubarBackgroundColor \#C36176
31 BalloonHelpFontFamily helvetica
32 BalloonHelpFontSize 12
33 BalloonHelpFontSlant roman
34 BalloonHelpFontWeight bold
35 BalloonHelpFontUnderline underline
36
37 The first line is a typical color setting. The command name consists of
38 the name of the object followed by the aspect of the object whose
39 color is to be set. The single argument of the command is the
40 color. You can use color names like salmon or you can
41 indicate the color you want by specifying its mixture of red, green, and blue.
42 The second line exemplifies this.
43
44
45 A numerical color specification begins with a crosshatch. Since a crosshatch
46 has a special meaning to Tcl, it is preceded by a backslash to give it
47 its ordinary meaning. The main part consists of three groups of two
48 characters. The first group specifies the amount of red, the second the amount
49 of green, and the third the amount of blue. Each pair of characters represents
50 two hexadecimal (base 16) digits. The hexadecimal digits are:
51 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, and F. The proportion of each
52 primary color is therefore specified as a number ranging from 00 (0*16 + 0*1 = 0) to
53 FF (15*16 + 15*1 = 240 + 15 = 255).
54
55 The next five lines exemplify font settings. The command name indicates
56 what aspect of the program the font is used for and which of the five
57 properties is set. Such commands take a single argument. The choices
58 for slant are roman and italic, for weight normal and bold,
59 and for underlinging normal and underline. Font size is
60 given in points. The font family should be the name of a font family
61 available on your system.
62
63 The command Initialization File Commands on the Help menu
64 provides a complete list of the commands that you can use in your initialization
65 file. You can write the list out to a file or pop it up on the screen.
66 This list contains only the commands specific to Msg. The commands
67 that are built in to Tcl are described in a variety of books and
68 web sites.
69
70 There are just a few things you need to know about Tcl. One is that
71 a crosshatch begins a comment. Any line beginning with a crosshatch will be
72 ignored. If you want to put a comment on the same line as a command,
73 you must end the command with a semi-colon.
74
75 A second is that certain other characters have a special meaning
76 to Tcl. If you include such characters you may unintentionally be
77 telling Tcl to do something that you did not intend. In Tcl
78 square-brackets enclose a command whose value replaces whatever
79 was between the square brackets. For example, the command:
80
81 puts "The current time is [clock format [clock seconds]]."
82
83 says to print the string The current time is followed by
84 the current time and date. The command [clock seconds] returns
85 the number of seconds since midnight, January 1, 1970. The command
86 [clock format] takes this value and converts it into a string
87 representing the time and date in a more conventional manner. This
88 string becomes part of the overall string. The result looks like this:
89
90 Sun Aug 14 21:06:47 EDT 2005
91
92 If you need to include special characters such as square-brackets in
93 strings and want them to have their ordinary values, you can quote
94 them with a backslash, e.g. \[..
95
96
97 If you want everything displayed at the outset, put the following
98 in your init file:
99
100 AlgorithmDisplayedP 1
101 InputFileDisplayedP 1
102 MiscOptionsDisplayedP 1
103 OutputFileDisplayedP 1
104 RecordParseDisplayedP 1
105 UnicodeDisplayedP 1
106 ExclusionsDisplayedP 1
107 KeyFieldIdentificationDisplayedP 1
108 MiscellaneousOptionsDisplayedP 1
109 SortOrderDisplayedP 1
110 SortTypeDisplayedP 1
111 SubstitutionsDisplayedP 1
112
113
114
115