Aml2CHM: Complete Guide to Converting AML Files to CHM

How to Use Aml2CHM for Fast CHM Documentation Creation

Overview

Aml2CHM converts Aml (AModeler/AMForms-style) files into compiled CHM (Windows Help) books quickly. This guide shows a straightforward, practical workflow to produce a clean, searchable CHM help file from Aml source content.

Requirements

  • Aml2CHM executable or installer (latest stable version)
  • Source Aml file (.aml)
  • Microsoft HTML Help Workshop (hhc.exe) installed and on PATH
  • Basic knowledge of HTML/CSS (optional for styling)
  • Windows machine for compilation

1. Prepare your Aml source

  1. Organize content: Arrange topics in your Aml file with clear headings and logical hierarchy. Use consistent heading levels for sections and subsections.
  2. Use templates: If your Aml tool supports templates, apply a consistent topic template to ensure uniform metadata (title, keywords, description).
  3. Embed resources: Place images, CSS, and any JS in a subfolder relative to the Aml file so links remain relative after conversion.

2. Install dependencies

  1. Install Microsoft HTML Help Workshop from Microsoft and ensure hhc.exe is available in your PATH (or note its full path for later).
  2. Install Aml2CHM by running its installer or placing the executable in a known folder.

3. Basic conversion command

Run Aml2CHM from a command prompt to convert your Aml into an intermediate HTML project and then compile to CHM. A typical command:

Code

aml2chm.exe -i “C:\Docs\mymanual.aml” -o “C:\Docs\output\mymanual.chm” –hhc “C:\Program Files (x86)\HTML Help Workshop\hhc.exe”
  • -i input Aml file
  • -o output CHM path
  • –hhc path to the HTML Help Compiler (if not on PATH)

4. Useful command options

  • –title “Project Title” — set CHM window title.
  • –css “styles\help.css” — specify custom CSS for all topics.
  • –toc — generate a Table of Contents based on Aml headings.
  • –index — create index entries from topic metadata or tags.
  • –resources “images;scripts” — include resource folders.
  • –verbose — show detailed logs to troubleshoot issues.

Example with options:

Code

aml2chm.exe -i “C:\Docs\mymanual.aml” -o “C:\Docs\output\mymanual.chm” –hhc “C:\Program Files (x86)\HTML Help Workshop\hhc.exe” –title “My Manual” –css “assets\help.css” –toc –index –resources “assets\images;assets\scripts” –verbose

5. Verify and refine the HTML project (optional but recommended)

  1. After running Aml2CHM, inspect the generated HTML project folder (usually next to the output).
  2. Open sample topic HTML files in a browser to check styling, image paths, and links.
  3. Edit CSS or individual HTML templates if layout or typography needs tweaking.
  4. Re-run the conversion to apply template changes.

6. Compile and test the CHM

  1. If Aml2CHM didn’t automatically run hhc.exe, run HTML Help Workshop manually on the generated .hhp project file:

Code

“C:\Program Files (x86)\HTML Help Workshop\hhc.exe” “C:\Docs\output\mymanual.hhp”
  1. Open the resulting .chm on your Windows machine and test: search, TOC navigation, index entries, and embedded links.

7. Troubleshooting common issues

  • Broken image links: Ensure image paths are relative and included in the resources option.
  • TOC missing entries: Check that headings in Aml use supported levels (H1–H6) or that the –toc option maps correctly to your heading structure.
  • Search not finding text: Confirm the topics are compiled into the project and not excluded; rebuild the CHM to refresh the index.
  • hhc.exe not found: Provide full path to –hhc or add HTML Help Workshop to PATH.

8. Tips for faster, repeatable builds

  • Use a build script (batch file or PowerShell) that runs Aml2CHM with your preferred flags.
  • Keep templates and CSS in a version-controlled folder.
  • Automate resource copying into the output folder before conversion.
  • Use the –verbose flag during setup; switch it off for regular builds.

9. Example PowerShell build script

powershell

\(aml</span><span> = </span><span class="token" style="color: rgb(163, 21, 21);">"C:\Docs\mymanual.aml"</span><span> </span><span></span><span class="token" style="color: rgb(54, 172, 170);">\)out = “C:\Docs\output\mymanual.chm” \(hhc</span><span> = </span><span class="token" style="color: rgb(163, 21, 21);">"C:\Program Files (x86)\HTML Help Workshop\hhc.exe"</span><span> </span><span>& </span><span class="token" style="color: rgb(163, 21, 21);">"C:\Tools\aml2chm.exe"</span><span> </span><span class="token" style="color: rgb(57, 58, 52);">-</span><span>i </span><span class="token" style="color: rgb(54, 172, 170);">\)aml -o \(out</span><span> </span><span class="token" style="color: rgb(57, 58, 52);">--</span><span>hhc </span><span class="token" style="color: rgb(54, 172, 170);">\)hhc title “My Manual” css “assets\help.css” toc index resources “assets\images;assets\scripts”

Closing

Following these steps you can quickly convert well-structured Aml content into a polished CHM help file. Start with clean Aml organization, include resources correctly, use Aml2CHM options to control output, and automate builds for fast iteration.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *