_WindowIsState

Returns if window is in given state

#include "Window, Screen, Mouse and Control.au3"
_WindowIsState( $hGUI, $iState )

parameters

$hGUI Window GUI handle
$iState Window state (1 = $WIN_STATE_EXISTS, 2 = $WIN_STATE_VISIBLE, 4 = $WIN_STATE_ENABLED, 8 = $WIN_STATE_ACTIVE, 16 = $WIN_STATE_MINIMIZED, 32 = WIN_STATE_MAXIMIZED)

Remark: You have to use the integer values because these constants are not defined as suggested in the manual (probably will in future AutoIt versions).

return value

boolean value True = In state $State, False = Not

related

example

If Not _WindowIsState( $hMyGUI, 2 ) Then WinSetState( @SW_SHOW )