Setting Up Right-Click Pop-Up Menus

3:34:00 PM |

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. NOTE: The steps may be different depending on what operating system you are using, but the technique is the same.

  1. Open Windows Explorer
  2. Select Folder Options from the Tools menu or select Options or Folder Options from the View Menu.
  3. Select the File Types tab.
  4. 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.
  5. 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.
  6. Press the New button.
  7. 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.
  8. 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.
  9. Click OK. Click Close.
  10. Repeat the procedure for ".html" or for other file extensions, if desired.

Special Notes

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.