@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
39 lines (25 loc) • 1.41 kB
Markdown
Node.js bindings for AutoItX3.dll.
<div align="center">






</div>
AutoIt is a Windows automation tool that can be used to automate tasks on Windows. AutoIt provides its own scripting language however, it can be difficult to work with if you need to integrate Windows automation into an existing test suite.
Enter AutoIt JS.
AutoIt JS wraps the AutoItX3.dll library using [Koffi](https://koffi.dev/) to provide a simple to use interface for AutoIt. It allows you to take your existing JavaScript/TypeScript test suite powered by PlayWright/Cypress/Puppeteer/etc. and automate Windows programs with ease.
```typescript
import { Init, Run, Send, WinClose, WinWaitActive, autoit } from '@ahmic/autoit-js';
autoit.load();
Init();
Run('notepad.exe');
WinWaitActive('[CLASS:Notepad]');
Send('Hello, World!');
WinClose('[CLASS:Notepad]');
autoit.unload();
```