TOOLS.INI Statement Syntax

Within each TOOLS.INI section you place a series of comments or statements. Each statement is a macro definition, key assignment, or switch setting, and must be stated on a single logical line. Statements can be continued across lines by using line-continuations.

General Macro Syntax

The general syntax for a macro definition is:

name := definition

PWB does not reserve any names. Therefore, be careful not to redefine a PWB function. For more information about how to write macros, see “Writing PWB Macros” on page 109.

General Key Syntax

The general syntax for a key assignment is:

name : key

The name is the name of a function or macro, and the key is the name of a key. To see how to write a given key, use the Tell function as described in “Changing Key Assignments”.

Note that certain keys have fixed meanings when the cursor is in a dialog box or in the Help window. You can assign one of these keys to a function or macro, but the fixed meaning is used in a dialog box or the Help window.

The following keys have fixed meanings:

Key Dialog Box Help Window

ESC Choose Cancel Close the Help window
F1 See Help on the dialog box (choose Help) See Help on the current item
TAB Move to the next option Move to the next hyperlink
SHIFT+TAB Move to the previous option Move to the previous hyperlink
SPACEBAR Toggle the setting of the current option Activate the current hyperlink
ENTER, SHIFT+ENTER, NUMENTER, SHIFT+NUMENTER Choose the default action Activate the current hyperlink

Note :

The Windows operating environment or a terminate-and-stay-resident (TSR) program may override PWB's use of specific keys. PWB has no knowledge of keys that are reserved by these external processes. PWB lists these keys as available keys in the Key Assignments dialog box and allows you to assign functions to these keys, but you may not be able to use them. See the documentation for your operating environment to see what keys are reserved by the system.

General Switch Syntax

The general syntax for a switch setting is:

switch : value

The exact syntax for the switch value depends on the switch. See Chapter 7, “PWB Reference,” for more information about each switch.

Line Continuation

All statements in TOOLS.INI must be stated on a single logical line. A logical line can be written on several physical lines by using the TOOLS.INI line-continuation character, the backslash (\).

The backslash must be preceded by a space to be treated as a line-continuation character. Precede the backslash by two spaces if you want the concatenated statement to contain a space at that location. If the backslash is preceded by a tab, PWB treats the tab as if it were two spaces. The backslash should be the last character on the line except for spaces or tabs.

The backslash in the following statement is not a line continuation.

Qreplace:CTRL+\

However, the backslash at the end of the first line below is a line continuation.

findtag:=Arg Arg "^\\[[^\\]]+\\]" Psearch ->nf \

Arg Setwindow => :>nf Arg "no tag" Message

In this example, the backslash is preceded by two spaces. The first space is included to separate ->nf from Arg in the concatenated macro definition. The second space identifies the backslash that follows it as the line-continuation character.

Comments

In the TOOLS.INI file, PWB treats the text that follows a semicolon (;) up to the end of the line as a comment. To specify the beginning of a comment, you must place the semicolon at the beginning of a line or following white space.

For example, the first semicolon in the following statement is part of a command, and the second semicolon begins a comment.

Printcmd:lister -t4 %s -c; ;Print using lister program

In the following example, the first semicolon is a key name, and the second semicolon begins a comment.

Sinsert:CTRL+; ;Stream insertion: CTRL plus semicolon

Semicolons inside a quoted string do not begin a comment.