@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
42 lines (39 loc) • 1.82 kB
JavaScript
import './@types/point.js';
import './@types/rect.js';
import { VOID, LPCWSTR, LPWSTR, INT } from './@types/win32.js';
import { autoit } from './lib/autoit.js';
import { createUnicodeBuffer, unicodeBufferToString } from './util/buffer.util.js';
var Command;
(function (Command) {
Command["IsVisible"] = "IsVisible";
Command["IsEnabled"] = "IsEnabled";
Command["ShowDropDown"] = "ShowDropDown";
Command["HideDropDown"] = "HideDropDown";
Command["AddString"] = "AddString";
Command["DelString"] = "DelString";
Command["FindString"] = "FindString";
Command["GetCount"] = "GetCount";
Command["SetCurrentSelection"] = "SetCurrentSelection";
Command["SelectString"] = "SelectString";
Command["IsChecked"] = "IsChecked";
Command["Check"] = "Check";
Command["UnCheck"] = "UnCheck";
Command["GetCurrentLine"] = "GetCurrentLine";
Command["GetCurrentCol"] = "GetCurrentCol";
Command["GetCurrentSelection"] = "GetCurrentSelection";
Command["GetLineCount"] = "GetLineCount";
Command["GetLine"] = "GetLine";
Command["GetSelected"] = "GetSelected";
Command["EditPaste"] = "EditPaste";
Command["CurrentTab"] = "CurrentTab";
Command["TabRight"] = "TabRight";
Command["TabLeft"] = "TabLeft";
Command["SendCommandID"] = "SendCommandID";
})(Command || (Command = {}));
function ControlCommand(windowTitle, windowText, controlId, command, option = '', characterCount = 1024) {
const [buffer, length] = createUnicodeBuffer(characterCount);
autoit.invoke('AU3_ControlCommand', VOID, [LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, INT], [windowTitle, windowText, controlId, command, option, buffer, length]);
return unicodeBufferToString(buffer);
}
export { Command, ControlCommand };
//# sourceMappingURL=control-command.js.map