@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
34 lines (31 loc) • 1.81 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';
import 'node:util';
var TreeViewCommand;
(function (TreeViewCommand) {
TreeViewCommand["Check"] = "Check";
TreeViewCommand["Collapse"] = "Collapse";
TreeViewCommand["Exists"] = "Exists";
TreeViewCommand["Expand"] = "Expand";
TreeViewCommand["GetItemCount"] = "GetItemCount";
TreeViewCommand["GetSelected"] = "GetSelected";
TreeViewCommand["GetText"] = "GetText";
TreeViewCommand["IsChecked"] = "IsChecked";
TreeViewCommand["Select"] = "Select";
TreeViewCommand["Uncheck"] = "Uncheck";
})(TreeViewCommand || (TreeViewCommand = {}));
function ControlTreeViewSync(windowTitle, windowText, controlId, command, option1 = '', option2 = '', characterCount = 1024) {
const [buffer, length] = createUnicodeBuffer(characterCount);
autoit.invoke('AU3_ControlTreeView', VOID, [LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, INT], [windowTitle, windowText, controlId, command, option1, option2, buffer, length]);
return unicodeBufferToString(buffer);
}
async function ControlTreeView(windowTitle, windowText, controlId, command, option1 = '', option2 = '', characterCount = 1024) {
const [buffer, length] = createUnicodeBuffer(characterCount);
await autoit.invokeAsync('AU3_ControlTreeView', VOID, [LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, INT], [windowTitle, windowText, controlId, command, option1, option2, buffer, length]);
return unicodeBufferToString(buffer);
}
export { ControlTreeView, ControlTreeViewSync, TreeViewCommand };
//# sourceMappingURL=control-tree-view.js.map