The Python Oracle

How to increase number of clicks per second with pyautogui?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Dreamlands

--

Chapters
00:00 How To Increase Number Of Clicks Per Second With Pyautogui?
00:41 Accepted Answer Score 21
01:20 Thank you

--

Full question
https://stackoverflow.com/questions/3580...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #python3x #pyautogui

#avk47



ACCEPTED ANSWER

Score 21


You can set pyautogui.PAUSE to control the duration of the delay between actions. By default, it is set to 0.1 sec, that is why you are getting at most 10 clicks per second.

pyautogui.PAUSE = 0.01

for example will reduce the delay to allow 100 clicks per second if your hardware supports it. From the doc, you can read the following:

You can add delays after all of PyAutoGUI’s functions by setting the pyautogui.PAUSE variable to a float or integer value of the number of seconds to pause. By default, the pause is set to 0.1 seconds.