Window Functions


  • WND_FROMPOINT Returns handle to the window that contains specified point.
  • WND_GETTEXT Retrieves the text of the specified window.
  • WND_GETCLASS Retrieves the class name of the specified window.
  • WND_SETTEXT Changes the text of the specified window.
  • WND_ISEXISTED Returns TRUE if the window does exist.
  • WND_ISENABLED Returns TRUE if the window is enabled.
  • WND_RESIZABLE Sets the window to be resizable or not.
  • WND_ISVISIBLE Returns TRUE if the window is visible.
  • WND_ISICON Returns TRUE if the window is minimized.
  • WND_ISZOOM Returns TRUE if the window is maximized.
  • WND_ISHUNG Returns TRUE if the window is not responding.
  • WND_FIND Finds window by the title and class name, and returns the window handle value.
  • WND_COUNT Counts the number of windows which has the specified title and class name.
  • WND_PARENT Returns the parent window of specified window.
  • WND_NEXT Returns the next or previous window of specified window.
  • WND_CHILD Returns the child window of specified window.
  • WND_RECT Retrieves the dimensions of the bounding rectangle of the specified window.
  • WND_LEFT Returns the x-coordinate of the upper-left corner of the rectangle of the specified window.
  • WND_TOP Returns the y-coordinate of the upper-left corner of the rectangle of the specified window.
  • WND_WIDTH Returns the width of the rectangle of the specified window.
  • WND_HEIGHT Returns the height of the rectangle of the specified window.

WND_FROMPOINT

Returns handle to the window that contains specified point.

window_vlaue WND_FROMPOINT( x, y [, ancestor = FALSE ] )

Parameters

  • x,y The point to be checked.
  • ancestor Optional. The ancestor window to be retrieved if this parameter is TRUE.

Example:

%=WND_FROMPOINT( mousecur_x, mousecur_y )% Retrieves the window under the current mouse position
%=WND_FROMPOINT( mousecur_x, mousecur_y, TRUE )% Retrieves the ancestor window under the current mouse position

WND_GETTEXT

Retrieves the text of the specified window.

string WND_GETTEXT( window_value )

Example:

%=WND_GETTEXT( WND_FROMPOINT( mousecur_x, mousecur_y ) )% Retrieves the window value to the window that contains mouse pointer, then returns the window text.

WND_GETCLASS

Retrieves the class name of the specified window.

string WND_GETCLASS( window_value )

Example:

%=WND_GETCLASS( WND_FROMPOINT( mousecur_x, mousecur_y ) )% Retrieves the window value to the window that contains mouse pointer, then returns the window class name.

WND_SETTEXT

Changes the text of the specified window.

boolean WND_SETTEXT( window_value, string )

Example:

%=WND_SETTEXT( WND_FROMPOINT( mousecur_x, mousecur_y ), "Hello")% Changes the window that contaiins mouse pointer to the string "Hello".

WND_ISEXISTED

Returns TRUE if the window does exist.

boolean WND_ISEXISTED( window_handle_value )

WND_ISENABLED

Returns TRUE if the window is enabled.

boolean WND_ISENABLED( window_handle_value )

WND_ISICON

Returns TRUE if the window is minimized.

boolean WND_ISICON( window_handle_value )

WND_ISZOOM

Returns TRUE if the window is maximized.

boolean WND_ISZOOM( window_handle_value )

WND_ISHUNG

Returns TRUE if the window is not responding.

boolean WND_ISHUNG( window_handle_value )

WND_RESIZABLE

Sets the window to be resizable or not. This function returns TRUE if the specified window has a sizing border.

boolean WND_RESIZABLE( window_handle_value [, resizable = FALSE, show_minimize_box = FALSE, show_maximize_box = FALSE ] )

WND_FIND

Finds window by the title and class name, and returns the window handle value. The title and class_name can be empty for ignoring the window title or class name checking.

window_value WND_FIND( window_title [, class_name = "" ] )

Example:

%=WND_FIND( "", "Notepad" )% Returns the first Notepad window which has the class name "Notepad", and does not care the window title.

WND_COUNT

Counts the number of windows which has the specified title and class name. The title and class_name can be empty for ignoring the window title or class name checking.

number WND_COUNT( window_title [, class_name = "" ] )

Example:

%=WND_COUNT( "", "Notepad" )% Returns the number of Notepad windows which have the class name "Notepad".
%=WND_COUNT( "Untitled - Notepad", "" )% Returns the number of windows which have the title "Untitled - Notepad".

WND_PARENT

Returns the parent window of the specified window.

number WND_PARENT( window_handle_value [, ancestor = FALSE ] )

Parameters

  • ancestor Optional. The ancestor window will be retrieved if this parameter is TRUE.

%=WND_PARENT( "", "Notepad" )% Returns the number of Notepad windows which have the class name "Notepad".
%=WND_COUNT( "Untitled - Notepad", "" )% Returns the number of windows which have the title "Untitled - Notepad".

WND_NEXT

Returns the next or previous siling of the specified window. The previous window is above the specified window; the next window is below.

number WND_NEXT( window_handle_value [, prev_sibling = FALSE] )

Parameters

  • prev_sibling Optional. Indicates whether to get the previous sibling window of the specified.

WND_CHILD

Returns the window handle value to identifies the child window of the specified window. If the specified window does not a window, return the number 0.

number WND_CHILD( window_handle_value [, ordinal = 0 ] )

Parameters

  • ordinal Optional. Specifies a zero based number that refers to the position of child window in the specified window.

Example:

%=WND_CHILD( v_wnd )% Returns the first child window of the v_wnd.
%=WND_CHILD( v_wnd, 1 )% Returns the second child window of the v_wnd.

WND_RECT

Retrieves the dimensions of the bounding rectangle of the specified window. The return value is a string with four numbers separated by commas. These four numbers represent X, Y, Right and Bottom coordinate of the rectangle.

string WND_RECT( window_handle_value [, offset_to_parent = FALSE ] )

Example:

%=WND_RECT( "", "Notepad" )% Returns the string "200,302,1508,800".

WND_LEFT

Returns the x-coordinate of the upper-left corner of the rectangle of the specified window.

number WND_LEFT( window_handle_value [, offset_to_parent = FALSE ] )

WND_TOP

Returns the y-coordinate of the upper-left corner of the rectangle of the specified window.

number WND_TOP( window_handle_value [, offset_to_parent = FALSE ] )

WND_WIDTH

Returns the width of the rectangle of the specified window.

number WND_WIDTH( window_handle_value [, client_area = FALSE ] )

WND_HEIGHT

Returns the height of the rectangle of the specified window.

number WND_HEIGHT( window_handle_value [, client_area = FALSE ] )