mouse: Move and click the mouse

mouseR Documentation

Move and click the mouse

Description

Reposition the mouse and simulate mouse clicks.

Usage

mousemove(x, y, clearmodifiers = FALSE, sync = FALSE)
mousemovePolar(theta, distance, clearmodifiers = FALSE, sync = FALSE)
mousemoveRel(x, y, clearmodifiers = FALSE, sync = FALSE)
mousemoveRelPolar(theta, distance, clearmodifiers = FALSE, sync = FALSE)
click(button, rep=1, delay=NULL, clearmodifiers=FALSE)
mousedown(button, clearmodifiers=FALSE)
mouseup(button, clearmodifiers=FALSE)

Arguments

x

The x coordinate for the mouse move (for the Rel version, relative to the current x coordinate).

y

The y coordinate for the mouse move (for the Rel version, relative to the current y coordinate).

theta

The angle for the mouse move (0 is up and positive angles are clockwise), relative to the centre of the screen (or, for the Rel version, relative to the current mouse position).

distance

The distance for the mouse move, relative to the centre of the screen (or, for the Rel version, relative to the current mouse position).

button

The mouse button to simulate (typically, 1 is left, 2 is middle, 3 is right, 4 is wheel up, 5 is wheel down).

rep

The number of times to click.

delay

The delay between clicks (in milliseconds), if rep is more than 1.

clearmodifiers

Logical whether to clear input modifiers (such as the shift key).

sync

Whether to wait for the mouse to begin moving (will not necessarily wait for the mouse to reach its destination).

Author(s)

Paul Murrell

References

http://www.semicomplete.com/projects/xdotool/


pmur002/xdotool documentation built on Feb. 6, 2023, 4:21 p.m.