Return To Launch Page

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

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')

Hi Travis

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

Aidan