Skip to content

Commit

Permalink
Merge pull request #798 from jadkinsgr/NewProject/AutoGui
Browse files Browse the repository at this point in the history
Adding AutoGui Project
  • Loading branch information
Mrinank-Bhowmick authored Feb 11, 2025
2 parents 7b07f6f + 1849180 commit 4ce34aa
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
21 changes: 21 additions & 0 deletions projects/AutoGui/AutoGui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# It might be helpful here to use a virtual environment
import pyautogui
import time

def keep_alive():
try:
while True:
# Move in a single command instead of two
pyautogui.moveRel(100, 100, duration=0.2)
pyautogui.moveRel(-100, -100, duration=0.2)

# Perform a click action
pyautogui.click()

# Adjust sleep time to control frequency of activity
time.sleep(20)
except KeyboardInterrupt:
print("Script terminated by user")

if __name__ == "__main__":
keep_alive()
9 changes: 9 additions & 0 deletions projects/AutoGui/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Mouse Activity Script

This Python script periodically moves the mouse and performs a click action. It’s useful for keeping the system active to avoid timeouts or showing as idle in applications like Microsoft Teams.

## Features
- Moves the mouse slightly every 20 seconds
- Simulates a mouse click periodically
- Prevents idle status on Microsoft Teams

0 comments on commit 4ce34aa

Please sign in to comment.