Skip to content

Instantly share code, notes, and snippets.

@andriusch
Last active December 24, 2015 15:58
Show Gist options
  • Save andriusch/6824159 to your computer and use it in GitHub Desktop.
Save andriusch/6824159 to your computer and use it in GitHub Desktop.
require 'java'
@robot = java.awt.Robot.new
def click(x, y)
@robot.mouseMove(x, y)
@robot.mousePress(java.awt.event.InputEvent::BUTTON1_MASK)
sleep 0.05
@robot.mouseRelease(java.awt.event.InputEvent::BUTTON1_MASK)
sleep 0.05
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment