@ahmic/autoit-js
Version: 
Node.js bindings for AutoItX3.dll
41 lines (40 loc) • 1.36 kB
TypeScript
/**
 * Sets the transparency level of a window. 0 is fully transparent, 255 is fully opaque.
 *
 * @param windowHandle The handle of the window.
 * @param transparency The transparency level (0-255).
 *
 * @returns 1 if successful, 0 otherwise.
 *
 * @example
 * ```typescript
 * import { WinSetTransByHandleSync, WinGetHandleSync } from '@ahmic/autoit-js';
 *
 * const windowHandle = WinGetHandleSync('Untitled - Notepad');
 *
 * WinSetTransByHandleSync(windowHandle, 128);
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/WinSetTrans.htm
 */
export declare function WinSetTransByHandleSync(windowHandle: bigint, transparency: number): number;
/**
 * Sets the transparency level of a window. 0 is fully transparent, 255 is fully opaque.
 *
 * @param windowHandle The handle of the window.
 * @param transparency The transparency level (0-255).
 *
 * @returns A promise that resolves to 1 if successful, or 0 otherwise.
 *
 * @example
 * ```typescript
 * import { WinSetTransByHandle, WinGetHandle } from '@ahmic/autoit-js';
 *
 * const windowHandle = await WinGetHandle('Untitled - Notepad');
 *
 * await WinSetTransByHandle(windowHandle, 128);
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/WinSetTrans.htm
 */
export declare function WinSetTransByHandle(windowHandle: bigint, transparency: number): Promise<number>;