Get(WindowTop)

Returns the vertical distance, in points, of the outer edge of the window on which the script is acting, relative to the top edge of the screen in Windows, or the bottom edge of the menu bar in macOS.

Format 

Get ( WindowTop )

Parameters 

None

Data type returned 

number

Originated in version 

7.0

Description 

Except for card windows, the origin of the reference coordinate system is at the leftmost corner of the screen below the menu bar in macOS. In Windows, the origin is the top edge of the screen. A negative value indicates the portion of the top part of the window that is hidden behind the menu bar.

For card windows, the origin is the top of the layout in the parent window. A negative value indicates the portion of the top part of the card that is above the top of the layout in the parent window.

Notes 

  • The window on which the script is acting may not necessarily be the foreground window.

  • In FileMaker WebDirect, this function is supported only for cards.

  • In the Windows operating system, a window has a border with a width and a height. Functions and script steps that work with windows refer to the outer edges of a window, outside the border. However, when a window is maximized, the Windows operating system pushes the border outside the edges of the screen. Therefore, for a maximized window, Get(WindowTop) and Get(WindowLeft) each return -8 if the border is 8 points wide.

Example 1 

Returns 52 when the outer edge of the active window is 52 points from the top edge of the screen (Windows) or from the bottom of the menu bar (macOS).

Returns 0 when the outer edge of the active window just touches the top edge of the screen (Windows) or bottom of the menu bar (macOS).

For an example script, see New Window script step.