Function MouseClick

  • Simulates a mouse click at the specified coordinates.

    Parameters

    • button: MouseButton = MouseButton.Left

      The mouse button to click. See MouseButton for details.

    • x: number = AU3_INTDEFAULT

      The X coordinate to click at.

    • y: number = AU3_INTDEFAULT

      The Y coordinate to click at.

    • clicks: number = 1

      The number of times to click.

    • speed: number = -1

      The speed of the click (1 is fast, 100 is slow).

    Returns number

    import { MouseClick } from '@ahmic/autoit-js';

    MouseClick('left', 150, 150, 2, 10);