@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
21 lines (18 loc) • 1.25 kB
JavaScript
import './@types/point.js';
import './@types/rect.js';
import { VOID, HWND, LPCWSTR, LPWSTR, INT } from './@types/win32.js';
import { autoit } from './lib/autoit.js';
import { createUnicodeBuffer, unicodeBufferToString } from './util/buffer.util.js';
import 'node:util';
function ControlTreeViewByHandleSync(windowHandle, controlHandle, command, option1 = '', option2 = '', characterCount = 1024) {
const [buffer, length] = createUnicodeBuffer(characterCount);
autoit.invoke('AU3_ControlTreeViewByHandle', VOID, [HWND, HWND, LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, INT], [windowHandle, controlHandle, command, option1, option2, buffer, length]);
return unicodeBufferToString(buffer);
}
async function ControlTreeViewByHandle(windowHandle, controlHandle, command, option1 = '', option2 = '', characterCount = 1024) {
const [buffer, length] = createUnicodeBuffer(characterCount);
await autoit.invokeAsync('AU3_ControlTreeViewByHandle', VOID, [HWND, HWND, LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, INT], [windowHandle, controlHandle, command, option1, option2, buffer, length]);
return unicodeBufferToString(buffer);
}
export { ControlTreeViewByHandle, ControlTreeViewByHandleSync };
//# sourceMappingURL=control-tree-view-by-handle.js.map