AutoClick
Inherits AutoClick::Keyboard < AutoClick::Mouse
AutoClick - Windows GUI automation library for Crystal
This library provides mouse and keyboard automation capabilities by interfacing with Windows User32 API functions.
Usage:
# Method 1: Include the module
include AutoClick
left_click()
mouse_move(100, 100)
input_text("Hello World")
# Method 2: Use as namespace
AutoClick.left_click
AutoClick.mouse_move(100, 100)
AutoClick.input_text("Hello World")
Constants
VERSION = {{ (`shards version /tmp/tmp.EMBKmP/src/src/auto_click`).chomp.stringify }}
Instance methods
Move cursor to specified coordinates
- x: X coordinate in pixels
- y: Y coordinate in pixels
Move cursor using percentage of screen dimensions
- x_percent: X position as percentage (0.0 to 1.0)
- y_percent: Y position as percentage (0.0 to 1.0)
screen_resolution
Get current screen resolution
Returns an array containing [width, height] in pixels