You can utilize the ability of HTML Validator to accept command line arguments by specifying new actions in Explorer for files ending in certain extensions, such as "htm" and "html". Then when you right click on a document in Explorer, you can select validate (or another function, such as a tool) from the pop up menu and immediately validate the document without manually launching HTML Validator. You can also do the same for the lowercase tool, uppercase tool, and other tools.
HTML Validator now includes a built in function that automatically adds file associations so that right clicking on supported documents brings up a menu that includes a validation option. The file associations should be added automatically when HTML Validator is first run. However, if the associations need to be redone or removed, you can select the appropriate menu option to add or remove the associations from the Options->File Associations menu in HTML Validator.
The steps to manually add other actions are listed below because you may want to add your own actions. For instance, you may want to add an action that uses the Template Tool on an HTML document.
- Open Windows Explorer
- Select Folder Options from the Tools menu or select Options or Folder Options from the View Menu.
- Select the File Types tab.
- Search the Registered file types for any entries that are for ".htm" extensions. If you find one, select it, press the Advanced or Edit button, click New, and skip to step 7, otherwise press the New or New Type button and go to the next step.
- Enter Hypertext Document in the Description of type edit box (or use the advanced options) and enter ".htm" (without the quotes) in the File Extension or Associated extension edit box.
- Press the New button.
- Enter "Process with Template Tool" (without the quotation marks) in the Action edit box and then press the Browse button. Locate HTML Validator's command line processor executable file (for example,cmdlineprocessor.exe for version 4), select it, and click Open.
- In the Application used to perform action edit box, add a space following the executable file's filename and then a "-t" (without the quotes). This is the argument used by HTML Validator to tell it to process the file with the Template Tool. If you want to validate the file, -v or no additional text should be added to the executable filename.
- Click OK. Click Close.
- Repeat the procedure for ".html" or for other file extensions, if desired.
You may follow a similar procedure for adding menu options that allows you to immediately process an HTML document with the lowercase tool, uppercase tool, or any other tool available through a command line switch. For instance, for the lowercase or uppercase tool, simply add a -l or -u to the HTML Validator command line when specifying the application used to perform the action, and enter lowercase tool or uppercase tool for the action name.