1.0.1 ā€¢ Published 3 years ago

mousebot v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

MouseBot

Computer automating package that can control the mouse and keyboard.

NPM

MouseBot is an automating package that lets you programatically control the mouse and keyboard of your device. MouseBot was built with native Rust bindings using neon. Check out the API documentation!

Building

Please make sure you have installed the global dependencies:

  • Python v2.7 is recommended, although Python v3.5, v3.6, or v3.7 may work.
  • npm i -g node-pre-gyp

Install

npm i mousebot

Examples

import { Bot } from 'mousebot';
//or
const { Bot } = require('mousebot');

/**
 * Create an instance of the class. 
 * Each member function of the class is an async function that returns a promise.
 */

let bot = new Bot();

//Move the mouse to the coordinates x=400, y=500. 
bot.mouse.move(400, 500);

//Move the mouse from x=300, y=400 to x=600, y=500 smoothly.
bot.mouse.moveSmooth(300, 300, 600, 500);

//Type "Hello World!"
bot.keyboard.write("Hello world!")

//Chain the alt and f5 keys to perform an ALT+F5 to refresh a page.
bot.keyboard.keyChain("alt", "f5");

//Directly use some implemented shortcuts.
bot.shortcuts.altTab();

//Chain functions using an async function.
let chain = async () => {
    await bot.mouse.moveSmooth(300, 300, 600, 500);
    await bot.keyboard.write("Hello world!")
}
chain();

Known Issues

Currently all of the features work on Windows and Linux. On MacOS some mouse features work while most keyboard features do not work.

Author

šŸ‘¤ Ibrahim Berat Kaya

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check the issues page.

Show your support

Give a ā­ļø if this project helped you!

1.0.1

3 years ago

1.0.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago