UNPKG

@ahmic/autoit-js

Version:
41 lines (40 loc) 1.36 kB
/** * Sets whether a window is on top of all other windows. * * @param windowHandle The handle of the window to set on top. * @param onTop Whether to set the window on top or not. * * @returns 1 if the operation was successful, 0 otherwise. * * @example * ```typescript * import { WinSetOnTopByHandleSync, WinGetHandleSync } from '@ahmic/autoit-js'; * * const windowHandle = WinGetHandleSync('Untitled - Notepad'); * * WinSetOnTopByHandleSync(windowHandle, true); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/WinSetOnTop.htm */ export declare function WinSetOnTopByHandleSync(windowHandle: bigint, onTop: boolean): number; /** * Sets whether a window is on top of all other windows. * * @param windowHandle The handle of the window to set on top. * @param onTop Whether to set the window on top or not. * * @returns A promise that resolves to 1 if the operation was successful, or 0 otherwise. * * @example * ```typescript * import { WinSetOnTopByHandle, WinGetHandle } from '@ahmic/autoit-js'; * * const windowHandle = await WinGetHandle('Untitled - Notepad'); * * await WinSetOnTopByHandle(windowHandle, true); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/WinSetOnTop.htm */ export declare function WinSetOnTopByHandle(windowHandle: bigint, onTop: boolean): Promise<number>;