Returns the state of a window.
Though the original AutoIt function returns a bitmask, this function returns an object with boolean properties for each state for ease of use.
The title of the window to check.
Optional text found in the window.
A WindowState object containing the state of the window.
WindowState
import { WinGetStateSync } from '@ahmic/autoit-js';const state = WinGetStateSync('Untitled - Notepad');console.log(state.exists); // true if the window existsconsole.log(state.visible); // true if the window is visible Copy
import { WinGetStateSync } from '@ahmic/autoit-js';const state = WinGetStateSync('Untitled - Notepad');console.log(state.exists); // true if the window existsconsole.log(state.visible); // true if the window is visible
https://www.autoitscript.com/autoit3/docs/func/WinGetState.htm
Returns the state of a window.
Though the original AutoIt function returns a bitmask, this function returns an object with boolean properties for each state for ease of use.