welsonjs/lib/autohotkey.js

23 lines
589 B
JavaScript
Raw Normal View History

////////////////////////////////////////////////////////////////////////
// AutoHotKey API
///////////////////////////////////////////////////////////////////////
var SHELL = require("lib/shell");
exports.VERSIONINFO = "AutoHotKey (autohotkey.js) version 0.1";
exports.global = global;
exports.require = global.require;
exports.execScript = function(scriptName, args) {
2020-07-26 11:40:25 +00:00
var cmd = [
"%PROGRAMFILES%\\AutoHotkey\\AutoHotkey.exe",
scriptName + ".ahk"
];
2020-07-26 11:40:25 +00:00
if (typeof(args) !== "undefined") {
cmd = cmd.concat(args);
}
2020-07-26 11:40:25 +00:00
return SHELL.exec(cmd);
};