MIAMEX 157: Find Window

xcall MIAMEX, MX_FINDWINDOW, handle, title {,class}

(Windows) MX_FINDWINDOW is used to search for a window with the specified window title and/or class and/or handle. If both class and title are blank and handle is non-zero, then it searches for the window by its window handle, returning the title and class. If both class and title are blank and handle is zero, then it returns the handle of the A-Shell window (the current modal dialog, if there is one, else the main A-Shell window).

Parameters

handle  (B,4 or F)  [out]

returns the window handle if the window is found (or zero if not found).

title  (String)  [in/out]

can be loaded with the window title (as shown on the title bar) of the window to search for.

class  (String)  [in/out]

can be loaded with the window class to search for. If both class and title are both non-blank, it will only locate a window matching both.

History

2009 September, A-Shell 5.1.1159:  Modified to support returning data into dynamic variables, such that they expand as needed. Previously, the output data was being truncated to the current size of the variable, or 0 for uninitialized.

2006 January, A-Shell 4.9.948:  Routine added to A-Shell.