This is a memo-post for me, hope useful to someone else too.
The need is to have autoclick on your desktop to automate some recurring task.
To do this I installed xdotool
sudo apt-get install xdotool
Ater the installation place your mouse on the desktop and get mouse location:
- x and y: screen coordinates;
- screen: screnn number, useful if you have more than one monitor/screen;
- window: application window ID.
gmellini@SandTigerShark:~$ xdotool getmouselocation
x:758 y:512 screen:0 window:54525959
Test it executing the standalone command.
gmellini@SandTigerShark:~$ xdotool mousemove 1242 998 click 1
And iterate (following commad sleeps 5 seconds between the commands).
gmellini@SandTigerShark:~$ while [ true ]; do xdotool mousemove 1242 998 click 1; sleep 5; done