summaryrefslogtreecommitdiff
path: root/Chap18PracLookingBusy.py
blob: f4456454673c5ba21f5e4673838dd577f18105b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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')