UNPKG

@ahmic/autoit-js

Version:
37 lines (36 loc) 1 kB
/** * Closes a window. * * @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 { WinCloseSync } from '@ahmic/autoit-js'; * * WinCloseSync('Untitled - Notepad'); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/WinClose.htm */ export declare function WinCloseSync(windowTitle: string, windowText?: string): number; /** * Closes a window. * * @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 { WinClose } from '@ahmic/autoit-js'; * * await WinClose('Untitled - Notepad'); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/WinClose.htm */ export declare function WinClose(windowTitle: string, windowText?: string): Promise<number>;