hm_getwindowarea

Returns the x, y, width and height of a window.

Syntax

hm_getwindowarea

Type

HyperMesh Tcl GUI

Description

This command returns the x and y coordinates that define the upper left corner along with the width and height of a window. The x and y values are relative to the upper left corner of the HyperMesh window, not the entire screen. This command is only available and supported on Windows.

Inputs

option
interactive – allows you to define the window by pressing the left mouse button and dragging a selection.
bywindow – allows you to select an existing window by using the left mouse button.

Example

To prompt you to drag a window and copy the window area to the clipboard:

foreach {x y w h} [hm_getwindowarea interactive] {
    hm_windowtoclipboard $x $y $w $h
}

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

9.0