mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
23 lines
589 B
JavaScript
23 lines
589 B
JavaScript
////////////////////////////////////////////////////////////////////////
|
|
// 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) {
|
|
var cmd = [
|
|
"%PROGRAMFILES%\\AutoHotkey\\AutoHotkey.exe",
|
|
scriptName + ".ahk"
|
|
];
|
|
|
|
if (typeof(args) !== "undefined") {
|
|
cmd = cmd.concat(args);
|
|
}
|
|
|
|
return SHELL.exec(cmd);
|
|
};
|