🪶 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. Windows only - OSX / Linux Coming soon
Docs
·
Report Bug
·
Request Feature
Getting Started
This is an example of how you can get started with Litebot.
Import Litebot
import * as litebot from "https://deno.land/x/litebot/mod.ts";
Using Litebot Sub-Modules
import { getMousePos } from "https://deno.land/x/litebot/mod.ts"; getMousePos(); // { x: number, y: number }
Example Scripts
deno run -A --unstable https://deno.land/x/litebot/examples/mouse/mouse.ts
- To view more more examples check out https://deno.land/x/litebot/examples/
- Mouse Related https://deno.land/x/litebot/examples/mouse/
- Keyboard Related https://deno.land/x/litebot/examples/keyboard/
- Macros Related https://deno.land/x/litebot/examples/macros/
Usage
Currently this library will only work for windows machines. OSX & Linux support are in development.
Lets demonstrate how to use some common Litebot functions.
import { getMousePos, setMousePos } from "https://deno.land/x/litebot/mod.ts";
// Get current position of mouse
const { x, y } = getMousePos();
// Setting the mouse position
setMousePos(0, 0);
setMousePos(-20000, 20398); // unsuccessful call results in the mouse being at the endge of the screen on the x and y
For more examples, please refer to the Documentation
Roadmap
Mouse Moving Relative - OSX / WIN
- mouseUp (px?: number)
- mouseLeft (px?: number)
- mouseRight (px?: number)
- mouseDown (px?: number)
- mouseMove (pxX: number = 1, pxY: number) – move the mouse vertically and horicontaly at same time
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).
Contact
Tyler Laceby: @tylerbadger23 - Twitter
My Channel: JSimplified - YouTube
Deno Repo: https://github.com/tylerlaceby/litebot
Project Link: https://github.com/tylerlaceby/litebot