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