module AutoClick::User32

Overview

Windows User32 API bindings for AutoClick

This module provides Crystal bindings for the Windows User32.dll functions needed for mouse and keyboard automation.

Extended Modules

Defined in:

auto_click/user32.cr

Instance Method Summary

Instance Method Detail

def get_cursor_pos(point : Bytes) : Int32 #

Get current cursor position

  • point: Byte buffer to store the position (8 bytes for x,y coordinates) Returns: 1 on success, 0 on failure

[View source]
def get_key_state(virt_key : Int32) : Int16 #

Get the state of a virtual key

  • virt_key: Virtual key code Returns: Key state (negative if pressed, positive if toggled on)

[View source]
def get_system_metrics(index : Int32) : Int32 #

Get system metrics

  • index: System metric index (0=screen width, 1=screen height) Returns: The requested system metric value

[View source]
def send_input(inputs : Bytes, count : UInt32, input_size : Int32) : UInt32 #

Send input events to the system

  • inputs: Array of input structures
  • input_size: Size of each input structure in bytes Returns: Number of events successfully sent

[View source]
def set_cursor_pos(x : Int32, y : Int32) : Int32 #

Set cursor position

  • x: X coordinate in pixels
  • y: Y coordinate in pixels Returns: 1 on success, 0 on failure

[View source]