Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/littledivy/autopilot-deno
:rocket: Cross-platform desktop automation module for Deno.
https://github.com/littledivy/autopilot-deno
automation autopilot corefoundation cross-platform deno desktop-automation hacktoberfest js macos rust ts windows x11
Last synced: 28 days ago
JSON representation
:rocket: Cross-platform desktop automation module for Deno.
- Host: GitHub
- URL: https://github.com/littledivy/autopilot-deno
- Owner: littledivy
- License: mit
- Created: 2020-05-22T08:46:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-22T04:55:21.000Z (over 2 years ago)
- Last Synced: 2024-05-01T16:22:15.052Z (6 months ago)
- Topics: automation, autopilot, corefoundation, cross-platform, deno, desktop-automation, hacktoberfest, js, macos, rust, ts, windows, x11
- Language: Rust
- Homepage: https://autopilot.mod.land
- Size: 2.55 MB
- Stars: 484
- Watchers: 7
- Forks: 15
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![ci](https://github.com/littledivy/autopilot-deno/workflows/ci/badge.svg)](https://github.com/littledivy/autopilot-deno/actions)
![deno version](https://img.shields.io/badge/deno-1.15.1-success)
[![nest badge](https://nest.land/badge.svg)](https://nest.land/package/autopilot)**AutoPilot Deno -** Cross-platform desktop automation framework for Deno.
### Features
- [x] **Keyboard**
- [x] Type a string using `.type`
- [x] Tap a key using `.tap`
- [x] Toggle key using `.toggleKey`- [x] **Mouse**
- [x] Simulate mouse movement using `.moveMouse`
- [x] Click using `.click`
- [x] Simulate a scroll using `.scroll`
- [x] Get mouse position using `.mousePosition`
- [x] Get mouse position pixel color `.pixelColor`- [x] **Screen**
- [x] Capture screen using `.screenshot`
- [x] Get screen size using `.screenSize`
- [x] Get number of pixels in a point using `.screenScale`- [x] **Notifications**
- [x] Native popup using `.alert`
- [x] Notifications using `.notify`### Documentation
Detailed documentation of the API is available at:
https://autopilot.mod.land
### Requirements
#### Linux
```sh
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
```sh
deno run --unstable --allow-ffi example.ts
``````typescript
// example.ts
import AutoPilot from "https://deno.land/x/autopilot/mod.ts";const pilot = new AutoPilot();
// type a string
await pilot.type("Yay! This works");
// get screen size
const screenSize = await pilot.screenSize();
// move mouse
await pilot.moveMouse(200, 400);
// take a screenshot
await pilot.screenshot("screenshot.png");
// ...and more stuff
```### License
[MIT License](LICENSE).