@ahmic/autoit-js
Version: 
Node.js bindings for AutoItX3.dll
39 lines (38 loc) • 1.07 kB
TypeScript
/**
 * Checks if a process exists.
 *
 * @param process The name of the process to check (e.g., 'notepad.exe').
 *
 * @returns True if the process exists, false otherwise.
 *
 * @example
 * ```typescript
 * import { ProcessExistsSync } from '@ahmic/autoit-js';
 *
 * const exists = ProcessExistsSync('notepad.exe');
 *
 * console.log(exists); // Output: true
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/ProcessExists.htm
 */
export declare function ProcessExistsSync(process: string): boolean;
/**
 * Checks if a process exists.
 *
 * @param process The name of the process to check (e.g., 'notepad.exe').
 *
 * @returns A promise that resolves to true if the process exists, false otherwise.
 *
 * @example
 * ```typescript
 * import { ProcessExists } from '@ahmic/autoit-js';
 *
 * const exists = await ProcessExists('notepad.exe');
 *
 * console.log(exists); // Output: true
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/ProcessExists.htm
 */
export declare function ProcessExists(process: string): Promise<boolean>;