WindowList

Description:

baWindowList returns a list of the handles of open windows. These handles can then be used in other window management functions.

Platforms:

Windows and Macintosh

Usage:

Result = baWindowList( Class/Creator, Caption, MatchCaption )

Arguments:

String, string, integer.
On Windows, Class is the Class name of the windows to find.
On Macintosh, Creator is the four character creator code of the application.
Caption is the Caption of the windows to find.
If MatchCaption is true, then Caption must match the window caption exactly (apart from case). If it is false, then any window which contains Caption will be returned. If Caption is an empty string, then MatchCaption is ignored.
The function can use either or both Class and Caption arguments. If one of the arguments is empty, then only the other argument will be used in searching for the windows.

Returns:

List
Returns a list or string of all matching window handles.

Examples:

Director:
WndList = baWindowList( "" , "Netscape" , false ) -- return list of all windows with a caption containing "Netscape"

Authorware:
WndList := baWindowList( "Notepad" , "" , false ) -- return list of all Notepad windows
 

Notes:

The windows will be listed in front-to-back order - the first window in the list will be the one at the front, while the last one in the list will be behind all other windows in the list.
 

See also:

baFindWindow
baChildWindowList
baGetWindow