Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter SeventeenApplication Integration Functions (continued)

FindEditWindowView Function

Overview

The FindEditWindowView function returns a window handle to a view based on a number of options. This function principally allows for locating a view by a window name (caption or tab name).

Syntax/Parameters

Syntax

handle = FindEditWindowView ( handle hwTarget | int index | string filename,
                                int view | string viewname );

Parameters

hwTarget

An optional handle. If hwTarget is specified, then index or filename cannot be specified. Or,

index

An optional int specifying an edit window index. If index is specified, then hwTarget or filename cannot be specified. Or,

filename

An optional string specifying a filename to find. If filename is specified, then hwTarget or index cannot be specified. One of hwTarget, index or filename parameters must be provided.

view

An int specifying a zero-based view index position. If view is specified, then viewname cannot be specified.

viewname

A string specifying the window caption to match. Not all views have captions. The caption is the same as a tab index or tab rack name (for example, “XBRL Fields”). If viewname is specified, then view cannot be specified.

Return Value

Returns a handle for the view if found or NULL_HANDLE if no corresponding view can be found or on failure. Use the GetLastError function to retrieve error information.

Remarks

The return value is a Windows handle, which is managed by the Edit Manager and the operating system. It is not a handle to a managed Legato object. Window handles are assigned by the operating system and uniquely identify a window. These handles can be used to access information and perform various functions within Legato. Messages can also be directly sent to windows but programmers are cautioned that this is an advanced operation that requires understanding of Windows messaging dynamics. It is also possible to adversely affect the application by performing certain windows commands without working through published script functions. Window handle values are persistent as long as the window is open.

If the window is closed and reopened, the handle value will change. Since a window handle is managed by Windows, it does not need to be closed, and if the CloseHandle function is called, it will essentially do nothing.

Note that view names do not have to be unique and are case-sensitive. Some views, such as XBRL View, will not allow duplicate names. However, the Edit Manager generally does not ensure the names are unique.

If the window is specified as a handle, the request is sent directly to the window.

Unlike most SDK functions, incorrectly specified parameters can result in returned errors rather than runtime errors.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE