-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #798 from jadkinsgr/NewProject/AutoGui
Adding AutoGui Project
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|