Get Window Bounds

desktop · N040 · starter-package 7.0.1

Reads the position and size of a connected desktop window.

Read the outer edges of a window found in this run and use its current position to calculate targets relative to that window.

Inputs and settings

IDTypeConnect to
windowtextThe Window output of Find Window or Wait for Window in this run. Check Matched when using Wait for Window.

Outputs

IDTypeMeaning
xnumberHorizontal desktop pixel position measured from the left edge of the primary display.
ynumberVertical desktop pixel position measured from the top edge of the primary display.
widthnumberFull outer window width in pixels, including the frame.
heightnumberFull outer window height in pixels, including the title bar and frame.
firefireFires after a successful measurement.

What happens when it runs

This block runs on this computer through the installed add-on. Windows measures the outer rectangle of the selected window at this moment. For a target 40 pixels from its left and 60 pixels from its top, use Add on each axis, then wire the results to Click Screen Position. If the window moves between measurement and click, measure it again.

Error handling

Use Restore Window before measuring a minimized window. If the application has closed or replaced the window, find it again.