Samscript

A gem to replace AHK/Futscript for RS things
Installation
This gem will only work under JRuby.
Add this line to your application's Gemfile:
gem 'samscript'
And then execute:
$ bundle
Or install it yourself as:
$ gem install samscript
Example Usage
The below script simply checks if the pixel at the mouse cursor is close to black every 100ms for 1 second, and prints true/false to console depending on the success.
require 'samscript'
Screen::wait_for_pixel(colour: java.awt.Color::BLACK,
location: Mouse.position(as: :vector)
tolerance: 10
interval: 100
timeout: 1000) { |status| puts status }
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
)
- Commit your changes (
git commit -am 'Add some feature'
)
- Push to the branch (
git push origin my-new-feature
)
- Create new Pull Request