mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
25 lines
704 B
JavaScript
25 lines
704 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 commandOptions = [];
|
|
|
|
commandOptions.push("\"%PROGRAMFILES%\\AutoHotkey\\AutoHotkey.exe\"");
|
|
commandOptions.push(scriptName + ".ahk");
|
|
|
|
if(typeof(args) !== "undefined") {
|
|
for(var i in args) {
|
|
commandOptions.push(args[i]);
|
|
}
|
|
}
|
|
|
|
return SHELL.exec(commandOptions.join(' '));
|
|
};
|