mouse
mouse copied to clipboard
How can I do mouse.click() action faster?
Now mouse.click() action need about 10-20ms, this API is faster than pynput(~20ms) and pyautogui(~ 100ms). It is awesome. But I want to write a fishing bot to some games. 10-20ms means I cannot catch the fish in 100% probability. So how can I do mouse.click() action faster?
Yeah, I want to know about this option if is possible, thank you
Hi, sorry for the late comment. Could you please attach the code you used in order to measure the time of the mouse.click() function?
Also, what operating system are you using?
Hi, I have tested the time it takes to execute the function mouse.click on Windows 10 With the following code
'''python from mouse import click import timeit
def mouseclick(): click()
execution_time = timeit.timeit(mouseclick, number = 1000) / 1000 print(("each click took on average {0} milliseconds").format(execution_time * 1000)) '''
The results were the following: "each click took on average 0.3585888 milliseconds"
Can you please attach the code you used to test the function execution time?.