Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 4ce34aa

Browse files
Merge pull request #798 from jadkinsgr/NewProject/AutoGui
Adding AutoGui Project
2 parents 7b07f6f + 1849180 commit 4ce34aa

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

projects/AutoGui/AutoGui.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# It might be helpful here to use a virtual environment
2+
import pyautogui
3+
import time
4+
5+
def keep_alive():
6+
try:
7+
while True:
8+
# Move in a single command instead of two
9+
pyautogui.moveRel(100, 100, duration=0.2)
10+
pyautogui.moveRel(-100, -100, duration=0.2)
11+
12+
# Perform a click action
13+
pyautogui.click()
14+
15+
# Adjust sleep time to control frequency of activity
16+
time.sleep(20)
17+
except KeyboardInterrupt:
18+
print("Script terminated by user")
19+
20+
if __name__ == "__main__":
21+
keep_alive()

projects/AutoGui/ReadMe.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Mouse Activity Script
2+
3+
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.
4+
5+
## Features
6+
- Moves the mouse slightly every 20 seconds
7+
- Simulates a mouse click periodically
8+
- Prevents idle status on Microsoft Teams
9+

0 commit comments

Comments
 (0)