UNPKG

@ahmic/autoit-js

Version:
37 lines (36 loc) 1.03 kB
/** * Forces a window to close. * * @param windowHandle The handle of the window to close. * * @returns 1 if successful, 0 otherwise. * * @example * ```typescript * import { WinKillByHandleSync, WinGetHandleSync } from '@ahmic/autoit-js'; * * const handle = WinGetHandleSync('Untitled - Notepad'); * WinKillByHandleSync(handle); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/WinKill.htm */ export declare function WinKillByHandleSync(windowHandle: bigint): number; /** * Forces a window to close. * * @param windowHandle The handle of the window to close. * * @returns A promise that resolves to 1 if successful, or 0 otherwise. * * @example * ```typescript * import { WinKillByHandle, WinGetHandle } from '@ahmic/autoit-js'; * * const handle = await WinGetHandle('Untitled - Notepad'); * await WinKillByHandle(handle); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/WinKill.htm */ export declare function WinKillByHandle(windowHandle: bigint): Promise<number>;