Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4    Statistic    FMM    Blog  

SystemInfo.IdleTime

Returns the global idle time in seconds.

Component Version macOS Windows Linux Server iOS SDK
SystemInfo 3.3 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "SystemInfo.IdleTime" )

(old name: SystemInfo.MacGlobalIdleTime)

Parameters

none

Result

Returns value or error.

Description

Returns the global idle time in seconds.
This time comes from HID system and informs you how long no mouse or keyboard has been used.
You can check this regularly in a timer script and do things like an auto logout.

If you use EventMonitor.Install function, this function may be better with remote control.
With remote controlled PC, the local mouse and keyboard devices are not used, so the HID idle time is high. But with event monitor we see events from user and can reset idle counter.

Examples

Shows idle time:

Pause/Resume Script [Duration (seconds): 2]
Show Custom Dialog ["Info"; MBS( "SystemInfo.IdleTime" )]

See also

Blog Entries

This function is free to use.

Created 18th August 2014, last changed 28th January 2023


SystemInfo.HostName - SystemInfo.Is64bitWindows

💬 Ask a question or report a problem