Skip to main content

Contributors Stargazers Issues LinkedIn


🪶 Litebot 🤖

Litebot is a Deno package for interacting with the mouse 🖱️ keyboard ⌨️ and screen 💻. The focus of Litebot is to provide a fast and simple API for writing bots and programs that need fine control over the keyboard and mouse. OSX & Windows only.

Docs · Report Bug · Request Feature





Getting Started

This is an example of how you can get started with Litebot.

  1. Import Litebot

    import litebot from "https://deno.land/x/litebot/mod.ts"
  2. Using Litebot Sub-Modules

    import litebot from "https://deno.land/x/litebot/mod.ts"
    litebot.mouse.cursor_pos() // { x: number, y: number }
    // Or by importing mouse directly
    import { mouse } from "https://deno.land/x/litebot/mod.ts"
    mouse.cursor_pos() // { x: number, y: number }
  3. Example Scripts

    deno run -A --unstable https://deno.land/x/litebot/examples/mouse.ts

(back to top)

Usage

Using Litebot is as simple as importing the function / module you want to use and then calling a attached method.

The required dynamic libraries will be installed upon startup so there is no need to worry about OS specific dependecies.

Lets demonstrate how to use some common Litebot functions.

import litebot, { mouse } from "https://deno.land/x/litebot/mod.ts";

// Get the cordinates of the mouse. Works with multi monitors as well.
const { x, y} = mouse.cursor_position ();
console.log(`Mouse Position x: ${x}, y: ${y}`);

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • Mouse Position - OSX

  • Color @ Pixel - OSX / Win

    • Color @ Cursor
    • RGB & Hex Support
  • Mouse Actions - OSX / Win

    • Left Click
    • Right Click
    • Double Click
      • Delayed Click
  • Keyboard Actions - OSX / Win

    • sendKey (keyCode : Litebot.Keycode )
    • sendKeys ( message : string )
    • keyPress (key : Litebot.Keycode | char )
    • keyRelease (key : Litebot.Keycode | char )
  • Macro’s OSX / Win

    • Macro.startRecordMacro ()
    • Macro.endRecordMacro ()
    • Macro.playBack ()
    • Macro.erase ()
    • Macro.saveMacro () : Litebot.Action []

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contact

Tyler Laceby: @tylerbadger23 - Twitter

My Channel: JSimplified - YouTube

Deno Repo: https://github.com/tylerlaceby/litebot

Project Link: https://github.com/tylerlaceby/litebot