ZennoLab Assemblies Documentation
IsWindowExists Method
Example 

Type: System.String !

The header of the window.

Check for window exists.
Syntax
public static bool IsWindowExists( 
   string name
)

Parameters

name

Type: System.String !

The header of the window.

Return Value

Type: System.Boolean

The answer with information about the window existence. If current window exists, this answer is "true"; otherwise false.

Example
The following code example demonstrates uses of the IsWindowExists method.
// activate the window just show it
if (Emulator.IsWindowExists("First window"))
{
    string result = Emulator.ActiveWindow("First window");
    // if was not any errors 
    if (result == "ok" && !Emulator.ErrorDetected)
        return "Window activated";
}
return "Fail in activation window";
// activate the first window just show it
if (ZennoLab\Emulation\Emulator::IsWindowExists("First window"))
{
    $result = ZennoLab\Emulation\Emulator::ActiveWindow("First window");
    // if was not any errors 
    if ($result == "ok" && !ZennoLab\Emulation\Emulator::ErrorDetected)
        return "Window activated";
}
else return "Fail: The first window";
Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven

See Also

Reference

Emulator Class
Emulator Members
ButtonClick Method
MouseClick Method
MouseMove Method
ErrorDetected Property
CloseWindow Method

Send Feedback