@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
37 lines (36 loc) • 1.06 kB
TypeScript
/**
* Activates a window.
*
* @param windowHandle The handle of the window to activate.
*
* @returns 1 if successful, 0 otherwise.
*
* @example
* ```typescript
* import { WinActivateByHandleSync, WinGetHandleSync } from '@ahmic/autoit-js';
*
* const handle = WinGetHandleSync('Untitled - Notepad');
* WinActivateByHandleSync(handle);
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinActivate.htm
*/
export declare function WinActivateByHandleSync(windowHandle: bigint): number;
/**
* Activates a window.
*
* @param windowHandle The handle of the window to activate.
*
* @returns A promise that resolves to 1 if successful, or 0 otherwise.
*
* @example
* ```typescript
* import { WinActivateByHandle, WinGetHandle } from '@ahmic/autoit-js';
*
* const handle = await WinGetHandle('Untitled - Notepad');
* await WinActivateByHandle(handle);
* ```
*
* @see https://www.autoitscript.com/autoit3/docs/functions/WinActivate.htm
*/
export declare function WinActivateByHandle(windowHandle: bigint): Promise<number>;