1 Star 3 Fork 4

MarshallMeng / mir3_pyautogui_tools_传奇3自动挂机

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mir3_is_item.py 853 Bytes
一键复制 编辑 原始数据 按行查看 历史
MarshallMeng 提交于 2022-05-05 03:56 . main文件为启动文件
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time :2022-5-3 23:30
# @Author :Mengxh
# @File :mir3_is_item.py
import pyautogui
import mir3_init
import threading
def is_item(item, pos_list):
t = pyautogui.locateOnScreen('%s' % item, region=mir3_init.region_main, confidence=0.6)
if t is not None:
pos = pyautogui.center(t)
print(item,pos)
pos_list.append(pos)
def multi_thread():
print('start')
threads = []
pos_list= []
for item in mir3_init.itemlist:
threads.append(
threading.Thread(target=is_item, args=(item, pos_list))
)
for thread in threads:
thread.start()
for thread in threads:
thread.join()
print('end')
return pos_list
if __name__ == '__main__':
multi_thread()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/marshallmeng/mir3_pyautools.git
git@gitee.com:marshallmeng/mir3_pyautools.git
marshallmeng
mir3_pyautools
mir3_pyautogui_tools_传奇3自动挂机
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891