summaryrefslogtreecommitdiff
path: root/Chap18PracLookingBusy.py
diff options
context:
space:
mode:
Diffstat (limited to 'Chap18PracLookingBusy.py')
-rw-r--r--Chap18PracLookingBusy.py19
1 files changed, 19 insertions, 0 deletions
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')