@ahmic/autoit-js
Version: 
Node.js bindings for AutoItX3.dll
44 lines (43 loc) • 1.22 kB
TypeScript
/**
 * The mode in which to send keys.
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/Send.htm
 */
export declare enum SendMode {
    /** Text contains special characters like + and ! to indicate SHIFT and ALT key-presses. */
    Default = 0,
    /** Keys are sent raw. */
    Raw = 1
}
/**
 * Sends simulated keystrokes to the active window.
 *
 * @param value The string of keys to send.
 * @param mode The mode to use for sending keys. See {@linkcode SendMode} for details.
 *
 * @example
 * ```typescript
 * import { SendSync } from '@ahmic/autoit-js';
 *
 * SendSync('Hello, world!');
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/Send.htm
 */
export declare function SendSync(value: string, mode?: SendMode): void;
/**
 * Sends simulated keystrokes to the active window.
 *
 * @param value The string of keys to send.
 * @param mode The mode to use for sending keys. See {@linkcode SendMode} for details.
 *
 * @example
 * ```typescript
 * import { Send } from '@ahmic/autoit-js';
 *
 * await Send('Hello, world!');
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/Send.htm
 */
export declare function Send(value: string, mode?: SendMode): Promise<void>;