I have tried following as recommended in this post (Auto - Close Error Box).
But i think something has changed in version 8.1 + from 7.9.as it no longer works.
I have manually triggered an error popup from a Vision client, then ran the following code to try understand what windows are currently open:
from java.awt import Window, Frame
from javax.swing import JFrame
print "Hostname: %s" % system.net.getHostName()
windows = Window.getWindows()
for wind in windows:
print wind
print "\n"
I get the following output:
Hostname: VMWIN10-OMRON01
javax.swing.JFrame[frame0,1070,596,419x151,invalid,hidden,layout=java.awt.BorderLayout,title=Launching,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,0,0,419x151,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
com.inductiveautomation.ignition.client.util.gui.DefaultPopupWindowParent[frame1,0,0,516x539,invalid,hidden,layout=java.awt.BorderLayout,title=Output Console,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,500x500,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.synth.SynthBorder@74a62a7a,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
com.inductiveautomation.ignition.client.util.gui.DefaultPopupWindowParent[frame2,1101,515,755x468,invalid,layout=java.awt.BorderLayout,title=Error,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,739x429,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.synth.SynthBorder@4087f750,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
com.inductiveautomation.ignition.client.util.gui.DefaultPopupWindowParent[frame3,1272,690,358x296,invalid,hidden,layout=java.awt.BorderLayout,title=Warning,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,342x257,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.synth.SynthBorder@175a9932,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
javax.swing.JFrame[frame4,-8,-8,2576x1320,invalid,layout=java.awt.BorderLayout,title=G1-Line01 - Main Window,resizable,maximized,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,2560x1281,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.synth.SynthBorder@5dbaff84,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
com.inductiveautomation.ignition.client.util.gui.DefaultPopupWindowParent[frame5,94,295,2373x865,invalid,layout=java.awt.BorderLayout,title=Diagnostics,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,2357x826,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.synth.SynthBorder@180afbb3,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
javax.swing.JDialog[dialog0,1077,575,405x176,invalid,hidden,layout=java.awt.BorderLayout,APPLICATION_MODAL,title=Update Available,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,31,389x137,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.synth.SynthBorder@59f3b76a,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
However it seems this output and all the Windows printed out is actually the same whether i have the error popup there or not…
For instance, a window with title = “Error” is there regardless.
I’ve used the following logic to close the error popup, which seems to work, but it is frustrating that the “Error” window still shows up after closing it, which makes it hard to write scripts to detect these popups properly.
for wind in Window.getWindows():
if isinstance(wind,JFrame):
logger.debug(wind.getTitle())
if wind.getTitle() == 'Error':
wind.dispose()
Is there a better Java class or something to detect the error popups more accurately…?