Skip to content

Instantly share code, notes, and snippets.

@hahwul
Last active July 10, 2022 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hahwul/78c580bda5f2fc2baffcf1b13eebeb02 to your computer and use it in GitHub Desktop.
Save hahwul/78c580bda5f2fc2baffcf1b13eebeb02 to your computer and use it in GitHub Desktop.
Mouse click via Ruby
# Dependency
# gem install rumouse
#
# Run command
# ruby click.rb <delay-second>
# e.g: ruby click.rb 60
require 'rumouse'
mouse = RuMouse.new
delay = ARGV[0]
while true
mouse.click(mouse.position[:x], mouse.position[:y])
sleep delay.to_i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment