MacOS
A library for interacting with your Mac through ruby.
Installation
gem install macos
Usage
Screen
require 'macos'
screen = MacOS.screen
screen.capture do |tempfile|
# ...
end
Mouse
require 'macos'
mouse = MacOS.mouse
mouse.move(x: 0, y: 0)
sleep 0.1
x, y = mouse.position
sleep 0.1
mouse.left_mouse_click(x:, y:)
mouse.right_mouse_click(x:, y:)