From 75a42ec54dbf721caa659ddf02c1f46fc2cb4bef Mon Sep 17 00:00:00 2001 From: mlot Date: Fri, 6 Jun 2025 13:40:57 -0400 Subject: initial commit for archiving --- Chap18PracLookingBusy.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Chap18PracLookingBusy.py (limited to 'Chap18PracLookingBusy.py') diff --git a/Chap18PracLookingBusy.py b/Chap18PracLookingBusy.py new file mode 100644 index 0000000..f445645 --- /dev/null +++ b/Chap18PracLookingBusy.py @@ -0,0 +1,19 @@ +#! python3 + +# Chapter 18 Practice Looking Busy +# Moves the mouse cursor ever 15 seconds to trick the computer into +# thinking you are still busy working. + +import time +import pyautogui + + +print('Press CTRL-C to End') + +try: + while True: + pyautogui.moveRel(-100, 0) + pyautogui.moveRel(100, 0) + time.sleep(15) +except KeyboardInterrupt: + print('\nEnded') -- cgit