--- title: "system.vision.getCurrentWindow" description: "Returns the path of the current \"main screen\" window, which is defined as the maximized window." --- # system.vision.getCurrentWindow > Returns the path of the current "main screen" window, which is defined as the maximized window. :::info Backwards Compatibility This function replaces [system.nav.getCurrentWindow](versioned_docs/version-8.1/appendix/scripting-functions/system-nav/system-nav-getCurrentWindow.md). Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility. ::: This function is used in **Python Scripting**. ## Description Returns the path of the current "main screen" window, which is defined as the maximized window. With the [Typical Navigation Strategy](ignition-modules/vision/vision-windows/navigation-strategies-in-vision/navigation-strategies-in-vision.md), there is only ever one maximized window at a time. :::note This function is available on secondary desktops via the [system.vision.desktop](system-vision-desktop.md) function. See the [Multi-Monitor Clients](ignition-modules\vision\common-tasks-in-vision\multi-monitor-clients\multi-monitor-clients.md) page for more details on secondary desktops. ::: ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.vision.getCurrentWindow()` ### Parameters Nothing ### Returns **String** - The path of the current "main screen" window - the maximized window. ### Scope Vision Client ## Code Examples ```python title="Example #1" # This code could run in a global timer script. # After a 5-minute timeout, navigate back to the home screen. if system.vision.getInactivitySeconds()>300 and system.vision.getCurrentWindow()!="Home": system.vision.swapTo("Home") ``` ```python title="Example #2" # This code could run in a global timer script. # After a 5-minute timeout, navigate back to the Over screen inside the Main Windows folder. if system.vision.getInactivitySeconds()> 500 and system.vision.getCurrentWindow()!="Main Windows/Overview": system.vision.swapTo("Main Windows/Overview") ```