# Auto - Close Error Box

**URL:** <https://forum.inductiveautomation.com/t/auto-close-error-box/12786>\
**Category:** General Discussion\
**Created:** [March 14, 2017, 5:31pm UTC](https://forum.inductiveautomation.com/t/auto-close-error-box/12786 "2017-03-14T17:31:45Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![Caleb\_Gamble](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Caleb\_Gamble](https://forum.inductiveautomation.com/u/Caleb_Gamble)\
**Post date:** [January 30, 2024, 6:52pm UTC](https://forum.inductiveautomation.com/t/auto-close-error-box/12786/21 "2024-01-30T18:52:41Z")

</div>

This code works well:

```auto
from java.awt import Window, Frame 
from javax.swing import JFrame 
for wind in Window.getWindows(): 
	if isinstance(wind,JFrame): 
		if wind.getTitle() == 'Error': 
			wind.dispose()

```

All that is needed is to drop it in a client timer script and it will auto close all Error pop ups.

[Previous page](https://forum.inductiveautomation.com/t/auto-close-error-box/12786.md?page=1)
