Skip to content

scil/node-ahk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-ahk

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

scil version

origin version is https://www.npmjs.com/package/node-ahk

what scil version change

  1. add FileEncoding, UTF-8-RAW, otherwise node can not get correct multi-byte-language string from ahk

  2. comment out Node_OnMessage because no definition for it

Installation

Use the package manager npm to install node-ahk.

npm install node-ahk --save

Setup - NodeJS

const nodeahk = require('node-ahk');
const fs = require('fs');

const gui = new nodeahk()
    .import(fs.readFileSync(__dirname + '/index.ahk'))
    .run();

Functions

NodeJS

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published