• Stars
    star
    5
  • Rank 2,852,009 (Top 57 %)
  • Language
    Ruby
  • License
    MIT License
  • Created 11 months ago
  • Updated 8 months ago

Reviews 5.0 (1)

10 months ago by Kirill Leonov

top

Repository Details

🐭 Mini library for mouse control

Boaw

Build Status Gem Gem Version

Mouse manipulation library

Description

The library will allow you to create auto-clickers for Unix systems. This library allows you to perform automatic mouse manipulations. It is essentially a wrapper over xdotool. Therefore, you will need it for the normal operation of the gem.

Requirements

You need the xdotool library. You can install it using the command from the example below.

sudo apt install xdotool

WARNING: The library may not work correctly in Wayland

Installation

gem 'boaw'

And then execute:

bundle install

Or install it yourself as:

gem install boaw

Require if necessary:

require 'boaw'

Usage

You can use the library to create various auto-clickers.

boaw = Boaw.new
position = boaw.position # current mouse position {x:1,y:2}
boaw.left_click(position) # clicks with the left mouse button
boaw.right_click(position) # clicks with the right mouse button

An example of a simple autoclicker that will allow you to always stay online in any messenger

require 'boaw'

mouse = Boaw.new

loop do
  # get current position
  position = mouse.position
  # click at position
  mouse.left_click(position)
  sleep 3
end

Contribution

If you would like to contribute to the development, submit a pull request with your changes. We welcome any contributions that improve the service. You can also view the current project board here. You can also contribute by reporting bugs or suggesting new features. Please use the GitHub issues for that.