Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding AutoGui Project #798

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading