Shows, hides, minimizes, maximizes, or restores a window.
WinSetState "title", "text", flag
Parameters
title | The title of the window to show. |
text | The text of the window to show. |
flag | The "show" flag of the executed program: SW_HIDE = Hide window SW_SHOW = Shows a previously hidden window SW_MINIMIZE = Minimize window SW_MAXIMIZE = Maximize window SW_RESTORE = Undoes a window minimization or maximization |
Return Value
None.
Remarks
WinSetState is a replacement for the badly named WinShow function. WinShow is accepted as an alias but this may be withdrawn in the future.
Related
WinActivate, WinClose
Example
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
oAutoIt.WinSetState "Untitled -", "", oAutoIt.SW_HIDE
oAutoIt.Sleep 3000
oAutoIt.WinSetState "Untitled -", "", oAutoIt.SW_SHOW