system.vision.getCurrentWindow
This function replaces system.nav.getCurrentWindow. Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility. Only the system.vision variations will appear in the Script Editor's autocomplete popup.
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.
This function is available on secondary desktops via the system.vision.desktop function. See the Multi-Monitor Clients page for more details on secondary desktops.
Client Permission Restrictions​
This scripting function has no Client Permission 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​
# 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")
# 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")