Pointer
10/22/22Less than 1 minute
Pointer
root_automator.Pointer
Describes one touch contact (finger / stylus) position for low-level inject APIs.
Table of contents
Properties
Properties
x
• Readonly x: number
X coordinate in pixels.
y
• Readonly y: number
Y coordinate in pixels.
id
• Readonly id: number
Pointer id starting at 0. Used with multi-touch sequences to distinguish simultaneous contacts.
Example
"nodejs";
const { createRootAutomator2 } = require("root_automator");
async function main() {
const ra = await createRootAutomator2({ root: true });
await ra.touchDown([
{ x: 100, y: 100, id: 0 },
{ x: 200, y: 200, id: 1 },
]);
await ra.touchUp();
await ra.exit();
}
main();