Autopilot - Cross platform desktop automation for Deno

栏目: IT技术 · 发布时间: 4年前

内容简介:AutoPilot is a simple cross-platform desktop automation library for Deno.

Autopilot - Cross platform desktop automation for Deno

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
    • Click using .click
    • Simulate a scroll using .scroll
    • 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

Autopilot - Cross platform desktop automation for Deno

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");

Env variables

CACHE
DEV

Development

  • Requires rust and cargo.
  • Requires velociraptor (script runner for Deno) - Makes life easier

Clone this repo and run cargo build to produce a development build.

Commands

  • Run tests : vr test
  • Run and produce benchmarks : vr bench
  • Format code fmt : vr fmt
  • Create development build: vr build

Contributing

Contributing code and ideas to AutoPilot is really easy! You can join the Discord server or Create an issue or PR. :)

License

See MIT License . All rights reserved. Divy Srivastava 2020.


以上所述就是小编给大家介绍的《Autopilot - Cross platform desktop automation for Deno》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

TCP/IP网络管理

TCP/IP网络管理

亨特 / 电子工业 / 2006年3月1日 / 79.00元

本书是一本架设与维护TCP/IP网络的完整指南,无论你是在职的系统管理员,还是需要访问Internet的家用系统用户,都可从本书获得帮助。本书还讨论了高级路由协议(RIPv2、OSPF、BGP),以及实现这些协议的gated软件。对于各种重要的网络服务,如DNS,Apache,sendmail,Samba,PPP和DHCP,本书都提供了配置范例,以及相关的软件包与工具的语法参考。一起来看看 《TCP/IP网络管理》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

SHA 加密
SHA 加密

SHA 加密工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具