WinItemizeEx

Returns the full name of window(s) matching a partial window name.

Syntax:

WinItemizeEx (partial-winname, multiple, hidden [, return-type])

Parameters:

(s) partial-winname specifies a partial window name to look for. It can be a blank string (""), in which case it will
match any window.

(i) multiple @TRUE or @FALSE. See below.

(i) hidden @TRUE or @FALSE See below.

(i) return-type [optional] specifies the format in which the list of windows will be returned.

Returns:

(s) list of the titles of all open windows.

 

If 'multiple' is @TRUE, then this function returns a tab-delimited list of all open windows that match 'partial-winname'. If 'multiple' is @FALSE, then it returns the name of the first open window found that matches 'partial-winname'. If no appropriate matching windows are found, it returns a blank string ("").

If 'hidden' is @TRUE, then hidden windows are included in the list of returned windows. If 'hidden' is @FALSE, then hidden windows are not included. If 'hidden' is @FALSE and 'multiple' is @FALSE, then this function returns the name of the first visible (non-hidden) open window found that matches 'partial-winname'.

"return-type" specifies the format in which the list of windows will be returned, and can be one of the following:

 

Type

Meaning

0

Tab-delimited list of window titles (default)

1

Tab-delimited list of window ID's

2

List of window titles and their corresponding window ID's,in the form:
"window1-name|window1-ID|window2-name|window2-ID|..."

 

The "return-type" values are numbered differently than in WinItemProcID.

Window ID's

The window ID is a specially formatted string that represents a 'pseudo-handle' of the window, that only WinBatch recognizes.

Windows ID's are recognized by all functions that also accept a partial window name.

You can use cWinIdConvert ( Control manager Extender) to convert between a true Windows handle and a Window Id (pseudo-handle). If you pass in a Windows handle, the function returns the corresponding Window ID. Conversely, if you pass in a Window ID, the function returns the corresponding Window handle.

Note: This function does not accept a Window ID as the 'partial-winname' parameter.

Example:

; Find all windows that are not hidden
wins = WinItemizeEx("",@TRUE,@FALSE)
mywind = AskItemlist("Windows", wins, @TAB, @UNSORTED, @SINGLE, @FALSE)
WinActivate(mywind)
See Also:

DirItemize, FileItemize, AskItemList, WinClose, WinGetActive, WinItemNameId, WinItemProcID, WinName, WinPlaceGet, WinPosition, WinItemize, Partial Window Names