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