6.4 Adding Commands to the Run Menu

You can add up to six commands to the Run menu to integrate your own utilities into PWB. A command is the name of any executable (.EXE or .COM) file, batch (.BAT) file, or built-in operating-system command such as DIR or COPY.

Suppose you use an outline processor to keep project notes. You can start the outline processor from PWB's Run menu.

·To add a command to the Run menu:

1.From the Run menu, choose Customize Run Menu.

2.Choose the Add button.

PWB displays the Add Custom Run Menu Item dialog box for you to describe your custom menu item:

3.Type Project ~Notes... in the Menu Text box.

The tilde (~) before the letter N indicates the highlighted access letter for the menu command. The ellipsis (...) uses the standard convention to indicate that the command will require more information before it is completed. An ellipsis is commonly associated with a dialog box command but can be used in this context as well.

4.Specify the full path to the outlining program, OUTLINE.EXE, in the Path Name text box. (The program name OUTLINE.EXE is for example purposes only. Substitute the name of your own outliner or other program in its place.)

5.Specify the arguments you want to pass to the outliner in the Arguments text box: %|dpfF.log.

This example illustrates a powerful feature of PWB: its ability to extract parts of the filename to form a new name for customized menu items. The specification %|dpfF extracts the drive (d), path (p), and base name (f) of the current file. Anything after F is added to the end of the name.

For example, if the current file is C:\SOURCE\COUNT.C, the argument that PWB passes to the program is C:\SOURCE\COUNT.LOG.

6.In the Help Line text box, type the explanatory message that appears on the status bar when you browse this menu item:

Run the OUTLINE program

7.Choose OK to confirm your entries.

PWB adds the command to your Run menu and modifies TOOLS.INI to save the new item. You can now access your outline processor directly from the Run menu.

Note :

You can add other text processing or word processing programs to the Run menu. If you change the current file using another program, PWB prompts you to update the file or to ignore the changes made by the other program.