Files
F6--/其它系统脚本/Python PyautoGUI 图形界面自动化.py
T
2026-01-30 11:28:35 +08:00

24 lines
836 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#! python3
import pyautogui, sys,time
#功能说明:用于记录需要操作的位置信息
#输入:鼠标移动到需要记录信息的位置
#输出:位置代表的含义,位置x,y坐标信息
print('程序说明:三秒后程序开始记录位置,每次位置记录间隔为5秒')
# try:
# while True:
# x, y = pyautogui.position()
# positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
# print(positionStr, end='')
# print('\b' * len(positionStr), end='', flush=True)
# except KeyboardInterrupt:
# print('\n')
time.sleep(3)
try:
while True:
print('请移动鼠标至需要的位置!')
Point = pyautogui.position()
str = input("请输入位置代表的含义:")
print(str,'',Point)
time.sleep(5)
except:
print('\n')