Skip to main content
Version: 8.3 Beta 🚧

system.vision.getInactivitySeconds

Backwards Compatibility

This function replaces system.util.getInactivitySeconds. 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 number of seconds since any keyboard or mouse activity.

note

This function will always return zero in the Designer.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.vision.getInactivitySeconds()

Parameters​

Nothing

Returns​

Integer - The number of seconds the mouse and keyboard have been inactive for this client.

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.vision.getInactivitySeconds()>300 and system.vision.getCurrentWindow()!="Home":
system.vision.swapTo("Home")