Use Javascript in hotmetal
3. What kind of resources are suitable for script writing?
When using 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 process them. These macros should be named based on hotmetal commands. For example, the macro on_application_open is called every time hotmetal Pro 6.0 is opened. You need to define the macro and add it to the macro/hotmetal. MCR file. All the special macros will be involved in this tutorial.
General document editing interface
There are a total of 8 interfaces to simulate the hotmetal graphic user interface, as shown below:
Application
Document
Documents
Documentproperty
Documentproperties
Selection
Range
Font
Document Object Model
Hotmetal uses the Document Object Model (DOM, Document Object Model. Dom is a standard model used to access elements in a webpage.
Command line interface
Hotmetal provides an interface for its menu bar, which is similar to a user-defined menu bar.
COM Object
Hotmetal Pro 6.0 supports three COM objects, which are defined in hmextras. dll:
Hmextras. filedlg allows you to access the file dialog box, which has rich commands (such as Save and saveas );
Hmextras. buttonmaker allows you to create a menu button;
Hmextras. colorchooser allows you to select the menu bar color