DEV Community

Saoni Deb
Saoni Deb

Posted on

4 2

Mouse Auto Click Script

Last year I faced this Google Colab issue wherein during my model training time(which took over 6 hours), my notebook kept disconnecting due to inactivity.
Wrote this small script to keep my session and in turn my system active.

from pynput.mouse import Button, Controller
import time

mouse = Controller()

while True:
    mouse.click(Button.left, 1)
    time.sleep(30)
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
alektomalee profile image
Alek Tomaich

where do I put this?

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more