🪶 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.
Import Litebot
import litebot from "https://deno.land/x/litebot/mod.ts"
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 }
Example Scripts
deno run -A --unstable https://deno.land/x/litebot/examples/mouse.ts
- To view more more examples check out https://deno.land/x/litebot/examples/
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
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).
Contact
Tyler Laceby: @tylerbadger23 - Twitter
My Channel: JSimplified - YouTube
Deno Repo: https://github.com/tylerlaceby/litebot
Project Link: https://github.com/tylerlaceby/litebot