GithubHelp home page GithubHelp logo

webhacking / autopilot-deno Goto Github PK

View Code? Open in Web Editor NEW

This project forked from littledivy/autopilot-deno

0.0 1.0 0.0 4.27 MB

Cross-platform desktop automation library for Deno.

Home Page: https://autopilot.divy.work

License: MIT License

TypeScript 20.78% Rust 79.11% Batchfile 0.11%

autopilot-deno's Introduction

stars issues ci version deno version vr scripts

AutoPilot is a simple cross-platform desktop automation library for Deno.

NOTE: Works with Deno v1.0.5 or up.

Features

  • Keyboard

    • Type a string using .type
    • Tap a key using .tap
    • Toggle key using .toggleKey
  • Mouse

    • Simulate mouse movement using .moveMouse
    • Get mouse position using .mousePosition
    • Get mouse position pixel color .pixelColor
  • Screen

    • Capture screen using .screenshot
    • Get screen size using .screenSize
    • Check if point out of bounds using .pointVisible
    • Get number of pixels in a point using .screenScale
    • Screen recording
  • Notifications

    • Native popup using .alert
    • Notifications using .notify
  • Monitors

    • Get the number of monitors using .getMonitors
  • Window management (only for linux)

    • Get window title using .getWindow
    • Transform windows size using .transformByIndex

Join Discord

Documentation

Detailed documentation of the API is available at:

https://autopilot.divy.work

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 -A file.ts

NOTE: Prebuilt binaries are automatically downloaded the first time you import Autopilot in your project and are cached.

import AutoPilot from 'https://deno.land/x/autopilot/mod.ts';

// create a new AutoPilot instance.
var pilot = new AutoPilot();

// type a string
pilot.type("Yay! This works");

// alert something
pilot.alert("This is a alert");

// get screen size
pilot.screenSize();

// move mouse
pilot.moveMouse(200, 400);

// take a full-screen screenshot
pilot.screenshot("screenshot.png");

autopilot-deno's People

Contributors

littledivy avatar tionis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.