Easy Access to Window Path in Scripting

Hello,

Is there a easy way in scripting to get the path of the window I’m working with?

Thanks!

Brian

Assuming you have the window object in ‘w’, just use w.path. (Technically, w.getPath(), but jython simplifies getters to simple properties.)

What if you don’t have the window?

Well, you need to use one of the system.gui.* functions to get it. If there’s just one window, then getWindow() will suffice. If you are in an event, then getParentWindow() is best.

2 Likes