# Get Title from Windows?

**URL:** <https://forum.inductiveautomation.com/t/get-title-from-windows/14263>\
**Category:** Ignition\
**Created:** [May 11, 2017, 4:14pm UTC](https://forum.inductiveautomation.com/t/get-title-from-windows/14263 "2017-05-11T16:14:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abishur](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/abishur/32/9096_2.png) [@abishur](https://forum.inductiveautomation.com/u/abishur)\
**Post date:** [May 11, 2017, 4:14pm UTC](https://forum.inductiveautomation.com/t/get-title-from-windows/14263/1 "2017-05-11T16:14:46Z")

</div>

I’m setting up a script to populate a drop down box with a list of available windows. So far, the script correctly finds all the windows in a specific folder and displays the path of the window.

What I’d like to do is .name property off the window as that holds a more descriptive name of the window. Is there a way to get that property name without the window being open? The only method I know if is the system.gui.getWindow(name), but that only works provided the window is already opened.

(I’m using Ignition 7.6, but would be interested in know if later one could do it as well)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 11, 2017, 6:37pm UTC](https://forum.inductiveautomation.com/t/get-title-from-windows/14263/2 "2017-05-11T18:37:59Z")

</div>

Looking into it, I think the technique(s) in [this](http://forum.inductiveautomation.com/t/access-template-size/12708/4) thread might be the only option - though I will reiterate as I did there that something you get working in 7.6 has no guarantee of working on a newer version of Ignition. Plus, adapting Nick’s project to 7.6 could be its own set of headaches.

---

<div class="post-metadata">

**Author:** ![abishur](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/abishur/32/9096_2.png) [@abishur](https://forum.inductiveautomation.com/u/abishur)\
**Post date:** [May 11, 2017, 6:54pm UTC](https://forum.inductiveautomation.com/t/get-title-from-windows/14263/3 "2017-05-11T18:54:07Z")

</div>

Hmm… thanks Paul, that certainly is an impressive way of doing it. I do want to make sure this stays largely future resilient, for the time being I’m giving my window names more descriptive titles. For now at least I’m using this basic setup that runs once when the screen is first loaded

```auto
# Populate the Dropdown menu
#Get all windows in project
windows = system.gui.getWindowNames()
dDown = system.gui.getParentWindow(event).getComponentForPath('Root Container.PIC_SELECT.Dropdown')

#create an index variable
i = 0

# Examine each Window and only add it to dropdown menu provided it is 
# in the "Screens" folder
for path in windows:
	# Examine only the first 7 characters
	if path[:7] == "Screens":
		# Index Value, Screen Name, Path to screen
		newRow = [i, path[8:], path]
		# Add row to Dropdown Box
		dDown.data = system.dataset.addRow(dDown.data, newRow)
		# Increment index location
		i += 1

```
