Javier2013 Javier2013 - 2 months ago 18
R Question

Simulating a mouse click in R

Is there a way to simulate a left-click from the mouse using R?

I just want that after some line of code, wherever the mouse is, R will make a left click.

I am using Ubuntu - Unity.

Answer

If you have xdotool installed, you could do:

system("xdotool click 1")
Comments