Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter ThreeData Types and Operators (continued)

3.21 Handle Functions

3.21.1 Overview

Many function groups will employ handles to reference internally generated objects. For example, if a file is opened, a handle is returned that references an internal Basic File Object. In addition, that object will contain internal handles, for example, the actual operating system handle to the file.

Certain objects require handles to be managed by the script while others do not. Managed handles are automatically closed when the handle is locally defined as a function exits. If the handle variable is global (static), then handle closes when the script closes. When using a hook, the script may remain in memory and globally defined and handles will not be closed until the application closes unless the script expressly closes the handle or terminates.

3.21.2 Window Handles

While Legato is fairly high-level, there are times that window handles might be employed. For the operating system, every window has a unique handle which is doled out by the Windows GUI (Graphical User Interface). When edit windows within the application must be addressed, this is performed by window handles. In addition, certain low-level functions and dialog access can employ handles. There is little management involved except to note that window handles may or may not be reused, depending on the situation. These are considered unmanaged handles.

When an edit window is opened within the application, it will usually have at least three accessible windows: the container client (also known as the MDI client) and two edit views. In the case of the HTML editor, the windows will consist of an HTML layout editor (Page View) and a code editor (Code View). These handles will remain the same as long as the windows are open. On the other hand, the handle to an OK “button” control will be different each time a dialog or message box is opened. See Microsoft Developers Network (MSDN) for additional information.

3.21.3 Generic Functions

These functions operate on various handles:

Page revised 2024-12-13