You are here: start » customizing » adding_commands

Adding Commands

Adding Commands

One of the requirements of a bulletin board system is that it be customizable to meet the needs of your users. PCBoard gives you the ability to add new commands to the system. You can define these new commands to do the following things:

Open a door

When you define a door, you must give it a name. You can execute this door by typing entering the door name at the conference command prompt. There is no need to use the OPEN or DOOR user commands. This method enables you to add the door name to your main menu making it appear as a command on your system.

Stuff the keyboard

Sometimes you may want to make things easier for your users by combining commonly used commands into one single command. For example, if your users have a hard time remembering that R;Y;ALL would read their own mail, create a command called YOURMAIL which stuffs the keyboard with R;Y;ALL.

Run a PPE

A PPE can be generated by the PPL Compiler or by downloading a pre-compiled PPE.

Execute a menu file

If you want to run a menu file as a new command, specify the menu file you wish to execute.

All new commands you add to your main menu (with the exception of doors) need to be added using the CMD.LST file (PCBSetup > File Locations > Configuration Files).

Stuffing Text Into The Keyboard

Perhaps the most common way to add a new command is to stuff text into the keyboard buffer. Using this method you can create commands based on common things your users may do. In the CMD.LST, specify the text to stuff in the right-most field on the screen (PPE/MNU File -or- Keystroke Replacement.)
The text you specify will stuffed into the keyboard buffer as if the user entered it directly from their keyboard.

For example:

     Command     Security  PPE/MNU File -or- Keystroke Replacement
 --------------  --------  ---------------------------------------

1) # 0 D;ALLFILES.ARJ;N^M

This entry defines the # command. When this command is executed, the commands necessary to download ALLFILES.ARJ are executed. In addition the ;N is added which will force PCBoard to use the (N)one protocol. In essence, this will force a protocol to be picked for transfer even if a default protocol has already been selected.

There are two things you need to be aware of when stuffing the keyboard. To simulate pressing ENTER add a ^M to the text that you are stuffing into the keyboard buffer. In addition, you need to realize that any text you stuff into the keyboard buffer will be lost if you run a door. If you need to stuff more characters than are available in the field, you should stuff a file instead.

Stuffing A File To The Keyboard

To specify that you wish to stuff an ASCII text file instead of the text, enter a % followed by the filename you wish to stuff. For example, if you wished to create a command called VIEW that will stuff the text file C:\PCB\TEMP\STUFFIT.TXT, add this entry:

     Command     Security  PPE/MNU File -or- Keystroke Replacement
 --------------  --------  ---------------------------------------

1) VIEW 0 %C:\PCB\TEMP\STUFFIT.TXT

Stuffing the keyboard buffer with a file is virtually identical to stuffing the keyboard buffer with text (described in previous section) with the following exceptions:

You may stuff as many characters as necessary. When stuffing text, you are limited to 256 characters. However, with a file, all of the text inside the file will be stuffed.

Instead of using ^M to represent ENTER, press ENTER when you are creating your ASCII file to stuff into the keyboard buffer.

If you were to stuff S^M2^M when stuffing text, the ^M will be converted to carriage returns.

If you were to stuff the same text from a file, it will resemble the following:

              S
  2

Using A PPE File

To specify the command to execute a PPE file is very simple. All you need to do is specify the new command, the security level required to execute the command, and finally the name of the PPE filename to execute. For example, to create a command called STATS which will execute C:\PCB\PPE\STATS.PPE, make the following entry:

     Command     Security  PPE/MNU File -or- Keystroke Replacement
 --------------  --------  ---------------------------------------

1) STATS 0 C:\PCB\PPE\STATS\STATS.PPE

Using A Menu File

You can add a MNU file by specifying the command you want to use for the menu, the security level required to execute the command, and the actual location of your MNU file. For example, if you want to add a command called ORDER which would put the user into a menu system where you could help them make purchasing decisions, add the following entry:

                           File Locations
     
     Command     Security  PPE/MNU File -or- Keystroke Replacement
 --------------  --------  ---------------------------------------

1) ORDER 0 F:\PCB\MENUS\ORDER.MNU

Replacing Existing Commands

Using the CMD.LST file, it is possible for you to override PCBoard's internal commands. The commands defined in CMD.LST have the highest priority of any command or function in PCBoard.

Even when you override a command, you can still access the original internal command as strange as that might sound. As a very simple example, add the following entry to your CMD.LST file:

     Command     Security  PPE/MNU File -or- Keystroke Replacement
 --------------  --------  ---------------------------------------

1) N 0 N

As you can see, this will stuff N into the keyboard buffer when the user executes the N user command. If you login and execute then N command you will notice it is identical to before you implemented the change. If you want to make sure everything is working properly, modify your N command in CMD.LST so it looks like this:

     Command     Security  PPE/MNU File -or- Keystroke Replacement
 --------------  --------  ---------------------------------------

1) N 0 N;S

If you login and execute the N command, you will not be prompted for the date. Instead, you will be asked immediately for the directory numbers you wish to search through. This is because the internal N command is still being used.

customizing/adding_commands.txt · Last modified: 2024/01/18 15:31
CC Attribution 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution 4.0 International