Mouse Auto Click Script

saonideb

Saoni Deb

Posted on January 21, 2022

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
💖 💪 🙅 🚩
saonideb
Saoni Deb

Posted on January 21, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Python "argparse" library
python Python "argparse" library

May 19, 2024

Mouse Auto Click Script
python Mouse Auto Click Script

January 21, 2022