All tutorials are included in the SmartOpen help file

Tutorial 1: Config.sys

Introducing extensions, conditions, and actions

In this tutorial we will be adding a new extension to SmartOpen to associate .sys files with it, then adding a condition to check whether the .sys file opened is config.sys or not, and adding an action to open config.sys with notepad, but to display a message box for any other .sys file.

First, run SmartOpen and take a look at the screen presented to you. The main part of the screen is taken up by the Display Box, which shows the current SmartOpen configuration. If this is the first time you have used SmartOpen, this should be empty, except for a pen with [Add New Extension] written next to it. To add a new extension, double click this, or select it and press the Add Button. Once you have done this a new window will open asking for the extension to add. Enter .sys and press OK. Notice that a new item has been added to the display box for this extension. To expand the extension, double click on it, or press the + sign next to it.

The extension now expands to a list of conditions associated with the extension, however as we have not created any yet, this list will contain only the [Add New Condition] item. In the same way as for the extension, double click this to add a new condition to this list. Once you have done this, another new window will appear for you to enter the condition, and whether it should perform all actions, or display a menu offering a choice of actions. For this example, you should leave this set to perform all actions. In the Condition box enter c:\config.sys, and press OK. The actions associated with this condition will now only be executed if the .sys file which was double clicked is c:\config.sys.

Now we must associate an action with condition we have just created. This is done in a similar way to the condition and extension we have already done. Click the + sign next to the condition just created, and double click the [Add New Action] that appears. In the window which appears there are two boxes in which to enter the name and command line of the action. In the Name box enter a friendly name for the action, such as Run Notepad. In the Command Line box enter notepad.exe %1, and press enter. Note that the %1 will be replaced by the filename which is double clicked. If you do not include a %1, SmartOpen will add it to the end of the command line you entered automatically, but you may want to include yourself in a different position, such as runner.exe %1 /fast or similar.

So far we have told SmartOpen to open notepad ready to edit config.sys if it is double clicked on, but we have not told it what to do if it is any other .sys file which is double clicked. As it stands, no action will occur, so it might be preferable to display a message box instead. To do this, we must add another condition to the .sys extension, with the condition * to signify everything. As this will appear after the config.sys condition it will really signify "Everything except config.sys", as only one condition will be matched. Precedence is given to earlier created conditions (higher in the list). We must also add an action to this new * condition, with a name such as MessageBox, and a command line /mb This is a system file and should not be edited or executed. The /mb tells SmartOpen to display a message box. This will then appear whenever a system file other than config.sys is double clicked on.

Continue to Tutorial 2...