外观
MacOS
约 98 字小于 1 分钟
2025-10-24
获取按扭座标
import pyautogui
try:
while True:
x, y = pyautogui.position()
print(f'X: {x} Y: {y}', end='\r') # 在同一行动态更新坐标
except KeyboardInterrupt:
print('\n程序结束。')MacOS 使用 Accessibility Inspector 获取座标 x: 281.38461538461536 y: 665.2511848341233
循环点击按扭
brew install cliclick
while true; do
cliclick c:x,y # 替换为按钮坐标(如 c:100,200)
sleep 1 # 点击间隔
done