If I have two window instances open and I use system.gui.getOpenedWindows() then I get two window objects that have the same name. How do I distinguish between the two? Is there a unique property that I can read from the window object? Also, can I read a property that will tell me the type of window (ie. main or popup)?
windows = system.gui.getOpenedWindows() for window in windows: print window.getTitle(), window.getPath(), window.getName(), window.hashCode()
window.hashCode() will give you a unique id for each otherwise identical window.
window.isStartMaximized() should give you a good idea of whether it’s a popup window or not.
Is there any difference between a main and popup window other than by default the main window opens maximized?
They’re both variations on the same object; popups are just set to ‘Maximizable’ but not ‘Start Maximized’ by default. The other changes between the two are entirely cosmetic.