---
title: "windowExists"
canonical: "https://help.vicon.com/space/Shogun112/31228012/windowExists"
format: markdown
---
# Description

Determines whether or not a given docking window exists.

This is useful for custom GUI work inside of Shogun Post. This command can be used to check if a specified user window exists. This could be used before creating a user window to check if creating or destroying a window with a specified name would cause an error.

## Functional area

User Window

# Command syntax

## Syntax

|  |
| --- |
| `windowExists "windowName"` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `windowName` | string | yes | The name of the user window. |

### Flags

None

> Macro (scroll-pagebreak)

## Return value

boolean

## Examples

```plaintext
//code from AutoPropVST script
//check at start of operation for existence of the AutoPropVST window
//if it exists, destroy it so that it can be recreated in default form 
if(`windowExists "AutoPropVST"`)
{
destroyWindow "AutoPropVST";
}
```

# Additional information

## Related commands

- [createWindow](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31233347)
- [destroyWindow](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31232163)
- [getWindowVisibility](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31228794)
- [showWindow](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31229038)