#! python3
# 看起来很忙.py - 每隔10s动一下鼠标
import random, pyautogui, time
try:
while True:
x_max, y_max = pyautogui.size()
x = random.randint(1,x_max)
y = random.randint(1,y_max)
str = '移动到({x},{y}),10s再次启动!'.format(x=x,y=y)
print('\b' * len(str),end='',flush=True)
print(str,end='')
pyautogui.moveTo(x,y)
time.sleep(10)
except KeyboardInterrupt:
print('\nDone.\nWelcom Back!')
python编程快速上手办公自动化_关于看起来很忙的解答
最新推荐文章于 2024-07-18 20:05:25 发布