Get window type

Hello guys,

How to get a window type from ignition scripting?

If you have any ideas please share…:slight_smile:

You have to examine the window’s properties. All windows are really the same type object under the hood, so “Main Window” versus “Popup” versus whatever is just the starting state of the window. (“start maximized”, “allow resizing”, etc.) Test those properties in your script.

Thanks for giving valuable solution… :slight_smile:

system.gui.getWindow() and system.nav.openWindow() are examples of functions returning a window type object if thats relevant for your usecase…

1 Like

Thank you

But system.gui.getWindow() is using to get a particular window with respect to given window path. We know the window path is main window or popup.

system.nav.openWindow() as well as like that.

I need a type of opened window. I think it will be get from system.gui.getOpenedWindows(). But it will return only window names in tuple

Is this question solved? :slight_smile:
-If you have more questions maybe you will provide more details for your usecase?
(You sometimes need to combine several of the system functions to get what you need…)

No, those are window objects. They just print out as the name. Use python’s type() function to see more information. And use python’s dir() function on each window to see properties.

Thanks @pturmel

It’s worked well :+1:

1 Like