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_ISVISIBLE Returns TRUE if the window is visible.
  • WND_ISENABLED Returns TRUE if the window is enabled.
  • 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_FROMPOINT

Returns handle to the window that contains specified point. The default value of the parameter bool_is_ancestor_window is FALSE.

window_vlaue WND_FROMPOINT( x, y, [bool_is_ancestor_window] )

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_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".