python - 如何将坐标从文本文件导入 Python 程序并使用 Pyautogui 单击这些坐标
问题描述
嘿,我想知道我在标题中描述的内容是否可行?我现在拥有的代码,但这给了我错误是这样的:
首先我有我的文本文件,其中存储了一些坐标
516, 440
971, 443
1186, 439
1402, 441
1630, 449
299, 681
518, 684
这是我的 Python 代码:
import pyautogui
f = open("chrome_profiles.txt", "r")
line = f.read().splitlines()
cords= line[0]
pyautogui.click(cords)
解决方案
推荐阅读
- php - PHP 下载使用 ziparchive 创建的 zip
- c# - C#图像到字节数组错误错误
- perl - CSV 规范 - 字段开头和结尾的双引号
- c# - End Coroutine if one of two conditions becomes true
- powershell - 需要巧克力证书
- field - Kentico 报告 - 来自依赖字段 B 的参考字段 A 值
- c# - Unity Multiplayer 向合作伙伴 socket.io 发送位置和更新
- android - Android:用动画显示飞溅
- php - Gmail api php 回复并包含原始附件
- mysql - Mysql事务同时发生