# Get the name of the window currently in use via script

**URL:** <https://forum.inductiveautomation.com/t/get-the-name-of-the-window-currently-in-use-via-script/37260>\
**Category:** Ignition\
**Tags:** ignition80, scripting\
**Created:** [July 31, 2020, 2:23pm UTC](https://forum.inductiveautomation.com/t/get-the-name-of-the-window-currently-in-use-via-script/37260 "2020-07-31T14:23:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pandreoli](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@pandreoli](https://forum.inductiveautomation.com/u/pandreoli)\
**Post date:** [July 31, 2020, 2:23pm UTC](https://forum.inductiveautomation.com/t/get-the-name-of-the-window-currently-in-use-via-script/37260/1 "2020-07-31T14:23:30Z")

</div>

So its a pretty simple task, I just cant find the right function to do it.

Im aware of [system.nav.getCurrentWindow()](https://docs.inductiveautomation.com/display/DOC79/system.nav.getCurrentWindow), but I believe this gets the name of the current _main screen_ window. I would like to know the name of the window a function was called from (for example, a popup). I think theres a property in the window that I can use to view the name, but it doesnt exactly fulfill my needs (as outlined below).

So heres what Im trying to accomplish. I am writing a function that is shared across many projects. The function will be called in the `except` scope of a try. Originally I set up this function to take a window path as a parameter, but I’d like to see if I can skip this by getting it automatically with a function. Im not in dire need of this, to enter the window path manually is easy, but I’ll bite at any step I can skip.

Does anyone know of a simple way of doing this?

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [July 31, 2020, 2:45pm UTC](https://forum.inductiveautomation.com/t/get-the-name-of-the-window-currently-in-use-via-script/37260/2 "2020-07-31T14:45:58Z")

</div>

```auto
system.gui.getParentWindow(event).getPath()

```

Works for me in 8.0.10.
