| API | | Promise |
runtime.screen.capture({x,y,w,h}) | | {dataUrl,width,height} |
runtime.ocr.recognizeRegion({x,y,w,h}) | | string |
runtime.pin.create(image, {x,y}) | | true |
runtime.editor.open(image) | | true |
runtime.mouse.highlight() | | true |
runtime.window.clearCropLocks() | | true |
runtime.window.isFullscreen(hwnd?) | | boolean |
runtime.screen.getWorkArea() | | {x,y,w,h} |
runtime.system.getBrightness() | | number |
runtime.system.setBrightness(0–100) | | true |
runtime.system.isDarkMode() | | boolean |
runtime.keyboard.isDown(key) | | boolean |
const rect = { x: 100, y: 100, w: 400, h: 200 };
const image = await runtime.screen.capture(rect);
await runtime.pin.create(image, { x: 600, y: 100 });
await runtime.editor.open(image);
const text = await runtime.ocr.recognizeRegion(rect);
if (text) runtime.setClipboardText(text);
await runtime.mouse.highlight();
runtime.window.toggleTopmost() —
toggle_key_echo —
toggle_prevent_sleep —
toggle_keep_display_on —
runtime.internal.showQrCode(text) —
const enabled = await runtime.getConfig('key_echo.enabled');
if (typeof enabled === 'boolean') {
await runtime.setConfig('key_echo.enabled', !enabled);
}
// general.prevent_sleep / general.keep_display_on
runtime.internal.showQrCode('https://aitiy.com');