Retrieves the state of a given window.
WinGetState ( "title" [, "text"] )
| title | The title of the window to read. See Title special definition. |
| text | [optional] The text of the window to read. |
| Success: | Returns a value indicating the state of the window. Multiple values are added together so use BitAND() to examine the part you are interested in: |
| 1 = Window exists | |
| 2 = Window is visible | |
| 4 = Window is enabled | |
| 8 = Window is active | |
| 16 = Window is minimized | |
| 32 = Window is maximized | |
| Failure: | Returns 0 and sets @error to 1 if the window is not found. |
; Check if a new notepad window is minimized
Local $state = WinGetState("[CLASS:Notepad]", "")
; Is the "minimized" value set?
If BitAND($state, 16) Then
MsgBox(0, "Example", "Window is minimized")
EndIf