How can I make my mouse auto-click every 5 seconds?

Edit: xdotool click --delay 5000 --repeat 200 1

For 200 clicks with mouse


Open terminal, install xdotool

sudo apt-get install xdotool

Also, open the window you want to click side by side with terminal. Select terminal (as active window) and move the mouse over the point where you want to click. In terminal type (try not to move the mouse)

xdotool getmouselocation

You will need the x:XXX and y:YYY (bottom). You can move the mouse from here, but let windows stay where they are. Type

gedit script

Paste the following on gedit (change the XXX and YYY for the numbers you got before)

#!/bin/bash
while [ 1 ]; do
  xdotool mousemove XXX YYY click 1 &
  sleep 5
done

Save and close it. Then

chmod +x script

To execute it,

./script

To get less, simply change the 5 after sleep to less.

Source: http://manpages.ubuntu.com/manpages/lucid/man1/xdotool.1.html and http://ubuntuforums.org/showthread.php?t=925217


I went to this page and downloaded the xautoclick_0.20-1~ppa1_amd64.deb (14.3 KiB) and it works great :D

enter image description here

Thanks to Kat Amsterdam for finding xautoclick


In Lucid 10.04 LTS

  1. Open Ubuntu Software Center
  2. In the search box, type in autoclick
  3. Download xautoclick

    For Precise 12.04LTS the package has been removed from the Ubuntu Repositories and is only available via GetDeb.

    xautoclick instructions for install in precise

    or via Christoph Korn's PPA (who is a member of GetDeb):

    sudo apt-add-repository ppa:c-korn/ppa

  4. Download xautoclick via the software center (or if you are handy with the terminal)

    sudo apt update && sudo apt upgrade && sudo apt install xautoclick

  5. Read the instructions on xautoclick man xautoclick
  6. Under Programs, Accesories choose xautoclick
  7. Change the Interval to 5000 (the value is milliseconds)
  8. Click Start
  9. Move the mouse over what you would like to click
  10. Enjoy!

    xautoclick

To enable the GetDeb repositories:

wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu precise-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'

Tags:

Mouse