# Easy Access to Window Path in Scripting

**URL:** <https://forum.inductiveautomation.com/t/easy-access-to-window-path-in-scripting/11928>\
**Category:** Ignition\
**Created:** [July 13, 2016, 9:15pm UTC](https://forum.inductiveautomation.com/t/easy-access-to-window-path-in-scripting/11928 "2016-07-13T21:15:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bfaivre](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bfaivre](https://forum.inductiveautomation.com/u/bfaivre)\
**Post date:** [July 13, 2016, 9:15pm UTC](https://forum.inductiveautomation.com/t/easy-access-to-window-path-in-scripting/11928/1 "2016-07-13T21:15:41Z")

</div>

Hello,

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

Thanks!

Brian

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 14, 2016, 9:39am UTC](https://forum.inductiveautomation.com/t/easy-access-to-window-path-in-scripting/11928/2 "2016-07-14T09:39:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bfaivre](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bfaivre](https://forum.inductiveautomation.com/u/bfaivre)\
**Post date:** [July 14, 2016, 10:36pm UTC](https://forum.inductiveautomation.com/t/easy-access-to-window-path-in-scripting/11928/3 "2016-07-14T22:36:29Z")

</div>

What if you don’t have the window?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 15, 2016, 8:59am UTC](https://forum.inductiveautomation.com/t/easy-access-to-window-path-in-scripting/11928/4 "2016-07-15T08:59:42Z")

</div>

Well, you need to use one of the [system.gui.\* functions](https://docs.inductiveautomation.com/display/DOC/system.gui) to get it. If there’s just one window, then getWindow() will suffice. If you are in an event, then getParentWindow() is best.
