WinState

Returns the current state of a window.

Syntax:

WinState (partial-winname)

Parameters:

(s) partial-winname the initial part of, or an entire, window name.

Returns:

(i)  window state (see below).

 

"Partial-windname" is the initial part of a window name, and may be a complete window name. It is case-sensitive. You should specify enough characters so that "partial-winname" matches only one existing window. If it matches more than one window, the most recently accessed window which it matches will be used.

Possible return values are as follows.

Value Symbolic name Meaning

 

-1 @HIDDEN Specified window exists, but is hidden
@FALSE Specified window does not exist
@ICON Specified window is iconic (minimized)
@NORMAL Specified window is a normal window
@ZOOMED Specified window is zoomed (maximized)

 

This function works only with top-level (parent) application windows.

Example:

RunIcon("Notepad.exe","")
If WinState("~Notepad") == @ICON Then WinShow("~Notepad")

See Also:

Run, WinExist, WinGetActive, WinHide, WinIconize, WinItemize, WinPlace, WinPlaceGet, WinPlaceSet, WinPosition, WinShow, WinZoom, Partial Window Names, IntControl 46