---
title: "windowExists"
canonical: "https://help.vicon.com/space/ShogunPost121/1253736562/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

> Macro (scroll-tablelayout)

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

### Arguments

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

### Flags

None

## Return value

boolean

> Macro (scroll-pagebreak)

## 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/ShogunPost121/pages/1253737523)
- [destroyWindow](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737183)
- [getWindowVisibility](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738689)
- [showWindow](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736492)