/rumouse

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

Primary LanguageRubyMIT LicenseMIT

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'

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