Skip to main content

1E SDK

Interaction.GetWindows

Method

GetWindows

Module

Interaction

Library

Core

Action

List all open windows within user sessions.

Parameters

(None)

Return values

HasFocus (boolean): Indicates whether this window currently has screen focus.

Process (integer): Process name

Processid (integer): Process id

SessionId (integer): Id associated with this session.

UserName (string): Username of this logon session.

WindowState (string): State of the window: Normal, Maximized or Minimized.

WindowTitle (string): Title of the window.

Example

@windows = Interaction.GetWindows();
@edge = SELECT 1 FROM @windows WHERE Process = "MicrosoftEdge";
IF (@edge)
    @chrome = SELECT 1 FROM @windows WHERE Process = "chrome";
    IF (@chrome)
        Interaction.ShowQuestion(Async:false,
            Title:"Browser survey",
            Description:"Do you prefer Microsoft Edge or Google Chrome?",
            PositiveChoice:"Microsoft Edge",
            NegativeChoice: "Google Chrome");
    ENDIF;
ENDIF;

Platforms

  • Windows

Notes

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