aut

autorobo

simulate mouse and keyboard input, take/save screenshots

Showing:

Popularity

Downloads/wk

17

GitHub Stars

0

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

1

Size (min+gzip)

24.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

autorobo

A node module which simulates mouse and keyboard input, and take screenshots.

Installation

$ npm install autorobo

See requirements for: https://github.com/joeferner/node-java

Docs

Documentation

Example

var robo = require("autorobo");


// move the mouse to coordinates
robo.mouse.move(100, 400);

// click left mouse
robo.mouse.click(robo.mouse.left);

// click and hold right mouse for 1 second
robo.mouse.click(robo.mouse.right, 1000);

// press middle mouse, move, and release.
robo.mouse.press(robo.mouse.middle);
robo.mouse.move(150, 400);
robo.mouse.release(robo.mouse.middile);

// perform a keystroke
// (http://docs.oracle.com/javase/7/docs/api/java/awt/event/KeyEvent.html#field_summary)
robo.key.stroke(robo.key.VK_PAGE_DOWN);

// hold a key for 1 second
robo.key.press(robo.key.VK_W);
robo.sleep(1000);
robo.key.release(robo.key.VK_W);

// get the screen size
var size = robo.screen.size();
console.log(size.width, size.height);

// save a screenshot to file
robo.screen.capture("photo.png");

// save a region of the screen starting at (20, 20), with a size of (50, 50)
robo.screen.capture("photo.png", robo.screen.rect(20, 20, 50, 50));

// Get the color of a pixel
console.log(robo.screen.pixel(40, 40)); // > { r: 0, b: 20, g: 255 }

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100