Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
92
rated 0 times [  92] [ 0]  / answers: 1 / hits: 171778  / 2 Years ago, sun, september 11, 2022, 12:41:49

I want to click on something for hours. How can I make a script or use an application so the mouse will auto-click every 5 seconds or less?


More From » mouse

 Answers
6

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


[#35984] Tuesday, September 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ngthmated

Total Points: 12
Total Questions: 115
Total Answers: 113

Location: Saint Vincent and the Grenadines
Member since Wed, Apr 21, 2021
3 Years ago
;