Window Get Size and Position

<< Click to Display Table of Contents >>

Navigation:  Actions > Window >

Window Get Size and Position

This action allows to save the sizes and position of the specified window into variables for further processing.

The action can save into separate variables such values as:

The horizontal coordinate of the left top corner.

The vertical coordinate of the left top corner

The height of the window.

The width of the window.

 

WindowsGetSizePos1 WindowsGetSizePos2

Window Selection Mode

Use Window Parameters. In this case it is necessary to specify parameters of a required window: Window Caption, Window Class, compliance mode, etc. (see the description below).

Use Window Handle. In this case it is necessary to specify a Window Handle. Handle is a number, an identifier of a window. It can be got, for example, in the action “Window loop”. The Window Handle uniquely identifies the window in a system, so the rest of window parameters have no sense.

Use Current Window. In this case a current active window is used. For example, if the necessary window was activated in the previous actions of a task, there is no need to specify window parameters again. Just use the current active window.

 

Use Window parameters

 

Window Caption.

If you want to search for a window by means of its caption, switch on this checkbox and input the expected window caption. You can input only part of the caption. In this case the action will check availability of the input part in the window caption.

 

Caption Must Match Exactly.

If you need the exact coincidence of a window caption, switch on this checkbox.

 

Window Class.

If you want to search the window by a window class, switch on this checkbox and input the expected name of the window class. You can input only part of the name. In this case the action will check availability of the input line in the name of the window class.

 

Class Name Must Match Exactly.

If you need the exact coincidence of a window class, switch on this checkbox. Usually it is worthwhile to search by the whole class name, because a window class is permanent and does not change its value during the "life" of the window, unlike a caption.

 

Select Window on the Screen.

When pressing this button, you turn on the mechanism of selection a window on the screen. The window, which the mouse pointer points on, highlights with a red frame. Meanwhile, you can use the mouse to perform some actions. To select the necessary window, press Ctrl. To cancel - press Esc. When selecting a window, the fields Window Caption and Window Class are filled in automatically.

 

Window Handle.

Input the expression containing a window handle. This parameter is used for the mode Use Window Handle. A window handle is just a number, identifier of a window in a current session of system work.

 

Get Position and Save to Variables

Turn on this checkbox to save the position of the left top corner of a window.

 

For X of Top-left corner

Input the variable name for the horizontal coordinate (X) of the corner from the left edge of the screen.

 

For Y of Top-left corner

Input the variable name for the vertical coordinate (Y) of the corner from the left edge of the screen.

 

Get Size and Save to Variables

Turn on this checkbox to save the height and the width of the window.

 

Height of the window

Input the variable name for the height of the window.

 

Width of the window

Input the variable name for the width of the window.

 

note Related Topics

Window Command

Check for Window

Wait for Window

Window Size and Position

Window Elements Loop