JavaScript Instance Tutorial (20) using HoTMetaL (3)

Source: Internet
Author: User
Tags object interface object model
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.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.