UNPKG

@ahmic/autoit-js

Version:
37 lines (36 loc) 1.01 kB
/** * Forces a window to close. * * @param windowTitle The title of the window to close. * @param windowText Optional text found in the window. * * @returns 1 if successful, 0 otherwise. * * @example * ```typescript * import { WinKillSync } from '@ahmic/autoit-js'; * * WinKillSync('Untitled - Notepad'); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/WinKill.htm */ export declare function WinKillSync(windowTitle: string, windowText?: string): number; /** * Forces a window to close. * * @param windowTitle The title of the window to close. * @param windowText Optional text found in the window. * * @returns A promise that resolves to 1 if successful, or 0 otherwise. * * @example * ```typescript * import { WinKill } from '@ahmic/autoit-js'; * * await WinKill('Untitled - Notepad'); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/WinKill.htm */ export declare function WinKill(windowTitle: string, windowText?: string): Promise<number>;