# Return To Launch Page

**URL:** <https://forum.inductiveautomation.com/t/return-to-launch-page/1991>\
**Category:** Archived Topics\
**Created:** [June 30, 2010, 3:03pm UTC](https://forum.inductiveautomation.com/t/return-to-launch-page/1991 "2010-06-30T15:03:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidamcg](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@aidamcg](https://forum.inductiveautomation.com/u/aidamcg)\
**Post date:** [June 30, 2010, 3:03pm UTC](https://forum.inductiveautomation.com/t/return-to-launch-page/1991/1 "2010-06-30T15:03:39Z")

</div>

Hi

I am trying to write a global event that will If the system is inactivate and it is not on the launch Page close all windows and return to Launch Page  
This is the code I have written.It is returning to the launch Page automatically. It is probably something simple but I cant seem to find it

`if fpmi.system.getInactivitySeconds() > 600 and fpmi.nav.getCurrentWindow() != "Launch Page":
 for OpenWindows in fpmi.gui.getOpenedWindows():
   fpmi.nav.closeWindow(OpenWindows)
fpmi.nav.openWindow('Launch Page')`

Thanks

Aidan

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [June 30, 2010, 5:44pm UTC](https://forum.inductiveautomation.com/t/return-to-launch-page/1991/2 "2010-06-30T17:44:04Z")

</div>

The script looks good, make sure the tabbing is correct:`if fpmi.system.getInactivitySeconds() > 600 and fpmi.nav.getCurrentWindow() != "Launch Page":
	for window in fpmi.gui.getOpenedWindows():
		fpmi.nav.closeWindow(window)
	fpmi.nav.openWindow('Launch Page')`

---

<div class="post-metadata">

**Author:** ![aidamcg](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@aidamcg](https://forum.inductiveautomation.com/u/aidamcg)\
**Post date:** [July 2, 2010, 10:44am UTC](https://forum.inductiveautomation.com/t/return-to-launch-page/1991/3 "2010-07-02T10:44:30Z")

</div>

Hi Travis

Thanks for that. I have read up on Indenting in python. The curly brackets from C are haunting me

Aidan
