# node-ahk

> node-ahk is a library that allows **NodeJS** to communicate with **autohotkey**.

Latest version **1.0.7** (published 2020-09-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-ahk
pnpm add node-ahk
yarn add node-ahk
bun add node-ahk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2020-09-14 |
| First published | 2020-09-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 18.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Niiko |
| Maintainers | niiko |

## Links

- npm: https://www.npmjs.com/package/node-ahk
- npm.io page: https://npm.io/package/node-ahk

## Dependencies (2)

- [ms](https://npm.io/package/ms.md) ^2.1.2
- [read-ini-file](https://npm.io/package/read-ini-file.md) ^3.0.0

## Recent versions

- 1.0.7 (latest) — 2020-09-14
- 1.0.6 — 2020-09-14
- 1.0.5 — 2020-09-14
- 1.0.3 — 2020-09-11
- 1.0.2 — 2020-09-11
- 1.0.1 — 2020-09-11
- 1.0.0 — 2020-09-11

## README

# node-ahk

node-ahk is a library that allows **NodeJS** to communicate with **autohotkey**.

## Installation

Use the package manager [npm](https://www.npmjs.com/) to install node-ahk.

```
npm install node-ahk --save
```

## Setup - NodeJS

```js
const nodeahk = require('node-ahk');
const fs = require('fs');

const gui = new nodeahk()
    .import(fs.readFileSync(__dirname + '/index.ahk'))
    .run();
```

## Functions

### NodeJS

```js
gui.import("string");                        // Imports this string as autohotkey.
gui.write("event", "message");               // Send a buffer to autohotkey.
gui.run();                                   // Runs the autohotkey script.
gui.on("message", (event, message) => {})    // Event Listener.
```

### Autohotkey

```
Node_Write("event", "message")               ;; Send a buffer to nodejs.
Node_OnMessage(event, message) {}            ;; Event Listener.
```

##  Credits

#### Creator: [*Niiko*](https://www.youtube.com/bryxz/)

---
_Source: https://npm.io/package/node-ahk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
