Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

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