AboutSupportDeveloper GuideVersion 1.1.0

Interface CombinedStrategy

A combined strategy combining different mechanisms for detecting windows belonging to the application. Supports multi-process, multi-window applications.

interface CombinedStrategy {
    expectedWindowCount?: number;
    matchClassRegex?: string;
    matchNameRegex?: string;
    multiProcess?: boolean;
    timeoutMs?: number;
    type: "combined";
}

Properties

expectedWindowCount?: number

An optional number of windows to look for. If provided, the search will be abandoned once this number is surpassed. If not provided, there will be no limit to the number of windows found, in which case the search will continue until either the timeout is reached (if provided), or for the lifetime of the application.

matchClassRegex?: string

An optional (Rust-evaluated) regular expression string to match the window class against. If not provided, any window class will match. N.B. if both matchClassRegex and matchNameRegex are provided, then windows will need to match BOTH the caption AND class regexes.

matchNameRegex?: string

An optional (Rust-evaluated) regular expression string to match the window caption against. If not provided, any window caption will match. N.B. if both matchClassRegex and matchNameRegex are provided, then windows will need to match BOTH the caption AND class regexes.

multiProcess?: boolean

Whether to include windows that belong to processes descending from the parent. If false, only windows belonging to the launched process will be included.

timeoutMs?: number

Optional timeout period in milliseconds. If provided, the search will be abandoned after this timeout. If not provided, the search will continue until either the expectedWindowCount is achieved (if provided), or for the lifetime of the application.

type: "combined"