system.nav.getCurrentWindow
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, there is only ever one maximized window at a time.
Client Permission Restrictions​
This scripting function has no Client Permission restrictions.
Syntax​
system.nav.getCurrentWindow()
Parameters​
Nothing
Returns​
String - The path of the current "main screen" window - the maximized window.
Scope​
Vision Client
Code Examples​
Example #1
# This code could run in a global timer script.
# After a 5-minute timeout, navigate back to the home screen.
if system.util.getInactivitySeconds()>300 and system.nav.getCurrentWindow()!="Home":
system.nav.swapTo("Home")
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.util.getInactivitySeconds()> 500 and system.nav.getCurrentWindow()!="Main Windows/Overview":
system.nav.swapTo("Main Windows/Overview")