Skip to main content

1E 8.1 (on-premises)

Interaction.GetInteractionState

Method

GetInteractionState

Module

Interaction

Library

Core

Action

Display the User Interaction state for all user sessions.

Parameters

(None)

Return values

DoNotDisturb (boolean): Indicates whether this user session has been set to Do Not Disturb mode.

FocusedExecutable (string): The executable image filename for the process that is in the foreground.

This may be empty if there is no active foreground window.

LastInteractionTime (string): The last time that input was received for this user session. Typically the last time mouse or keyboard input was received.

LastNotificationShown (string): The last time that the 1E Client displayed a notification or pop-up for this user session.

LastStateChangeTime (string): The last time that a session state change was detected, such as screen lock or unlock.

LogonTime (string): The logon time for this session.

NotificationState (string): Current Notification state, which will be one of:

  • Available - Notifications can be freely sent.

  • NotPresent - A screen saver is displayed, the machine is locked, Do Not Disturb has been set or a non-active Fast User Switching session is in progress.

  • Busy - A full-screen application is running or Presentation Settings are applied. Presentation Settings allow a user to put their machine into a state fit for an uninterrupted presentation, such as a set of PowerPoint slides.

  • FullScreen - An application is running in full-screen (exclusive) mode.

  • Presenting - An application has entered presentation mode, which will suppress notifications and pop-ups.

  • QuietTime - The user is in their first hour of activity, having logged into this device for the first time. During this time, notifications should not be sent or shown (to allow the user to get used to this device)

SessionId (integer): Id of the logon session for this user.

StartupTime (string): Start up time of the 1E Client UI in this session.

UserName (string): Username of the logon session.

Example

@interaction = Interaction.GetInteractionState();

SELECT  "Last interaction from " || UserName || " was " 
        || CAST((JULIANDAY(DATETIME("now")) - JULIANDAY(DATETIME(LastInteractionTime))) * 1440 AS INTEGER)
        || " minutes ago" AS LastActivity
FROM    @interaction;

Platforms

  • Windows

Notes

Use of this method may have user privacy implications (please observe local regulations).