Repository
Current version released
3 years ago
Dependencies
deno.land/x
AutoPilot Deno - Cross-platform desktop automation framework for Deno.
Features
Keyboard
- Type a string using
.type
- Tap a key using
.tap
- Toggle key using
.toggleKey
- Type a string using
Mouse
- Simulate mouse movement using
.moveMouse
- Click using
.click
- Simulate a scroll using
.scroll
- Get mouse position using
.mousePosition
- Get mouse position pixel color
.pixelColor
- Simulate mouse movement using
Screen
- Capture screen using
.screenshot
- Get screen size using
.screenSize
- Get number of pixels in a point using
.screenScale
- Capture screen using
Notifications
- Native popup using
.alert
- Notifications using
.notify
- Native popup using
Documentation
Detailed documentation of the API is available at:
Requirements
Linux
sudo apt-get update
sudo apt-get install libdbus-1-dev x11-xserver-utils wmctrl libxtst-dev cmake libc-dev libx11-dev libxcb1-dev
Usage
Running your Deno script with AutoPilot requires some flags
deno run --unstable --allow-plugin file.ts
import AutoPilot from "https://deno.land/x/autopilot/mod.ts";
const pilot = new AutoPilot();
// type a string
await pilot.type("Yay! This works");
// alert something
await pilot.alert("This is a alert");
// get screen size
const screenSize = await pilot.screenSize();
// move mouse
await pilot.moveMouse(200, 400);
// take a screenshot
await pilot.screenshot("screenshot.png");
License
See MIT License. All rights reserved. Divy Srivastava 2020.