wandenberg / rumouse

Port of python's PyMouse. Cross-platform simulation of mouse events.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuMouse

Gem Version

This is port of PyMouse to ruby. Cross-platform library to simulate mouse events.

Installation

Simply run:

$ gem install rumouse

or add to your Gemfile:

gem 'rumouse'

Requirements

On Linux, you must have libXtst, e.g., apt install libxtst-dev.

Usage

require 'rumouse'

mouse = RuMouse.new

# click at 10x10
mouse.click 10, 10

# move mouse to 100x100
mouse.move 100, 100

# press to drag at 10x10
mouse.press 10, 10

# release to drop at 100x100
mouse.release 100, 100

# get current position
puts mouse.position

# get screen size
puts mouse.screen_size 

About

Port of python's PyMouse. Cross-platform simulation of mouse events.

License:MIT License


Languages

Language:Ruby 98.5%Language:Makefile 1.5%