javascript| Tutorial
Using JavaScript in HoTMetaL
3. What resources are appropriate for scripting
When you use HoTMetaL PRO 6.0 to write macros, you can use the following resources:
Predefined events
HoTMetaL PRO 6.0 defines several events and special user-defined macros to handle them. These macros should be named after the HoTMetaL instructions. For example, a macro on_application_open is invoked every time HoTMetaL PRO 6.0 is opened. The user needs to define the macro and add it to the MACRO/HOTMETAL.MCR file. We'll cover all the special macros in this tutorial.
A common document editing interface
A total of 8 interface simulation hotmetal graphical user interface, as follows:
Application
Document
Documents
DocumentProperty
DocumentProperties
Selection
Range
Font
Document Object Model
The hotmetal is used with the Document Object Model (DOM, the documentation objects models). The DOM is a standard model for accessing elements in a Web page.
Command bar interface
HoTMetaL provides an interface to its menu bar, which is similar to a user-defined menu bar.
COM objects
HoTMetaL PRO 6.0 supports three COM objects, and these three objects are defined in HMExtras.dll:
Hmextras.filedlg allows you to access the file dialog box, which has a wealth of commands (such as Save, SaveAs, etc.);
Hmextras.buttonmaker can enable users to create new menu buttons;
Hmextras.colorchooser allows the user to select a menu bar color.