Python命令汇总:游戏自动化

Python命令汇总:游戏自动化



写在前面

使用目的:游戏自动化库函数调用(调用时注意函数前缀


一、模拟器参数操作

1.1 设置窗口位置

setWinPos(self, x, y)

1.2 设置窗口大小

setWinSize(self, x, y)

1.3 设置窗口最前

setWinFrount(self, hwnd)

1.4 点位确定句柄

capture_point(*args, **kwargs)

二、模拟器应用操作

1. 比色、找色

1.1 定点比色

cmpcolor(self, x, y, color, sim: int)

1.2 多点比色

cmcmpcolor(self, lists, sim: int)

1.3 获取颜色数量

getcolornum(self, stax: int, stay: int, endx: int, endy: int, des)

1.4 范围单点找色

FindColor(self, stax: int, stay: int, endx: int, endy: int, des)

1.5 范围多点找色

FindMultColor(self, stax, stay, endx, endy, des)

2. 文字

2.1 识别文字

getWord(self, stax: int, stay: int, endx: int, endy: int)

2.2 识别文字(升级版)

getWord_v1(self, stax: int, stay: int, endx: int, endy: int)

2.3 识别文字(强化显示)

stressShow(self, stax, stay, endx, endy, des, deviation: int)

2.4. 强化显示 + 识字 (时间更长,精度提升)

getWord_FromPictureStress(self, stax, stay, endx, endy, des, deviation: int)

3. 找图

3.1. 找图

find_pic(self, screen, template: str, threshold: float)

3.2. 范围找图(清理内存)

find_pic_v1(stax: int, stay: int, endx: int, endy: int, template: str, threshold: float)

3.3. 找图(后台)

find_picEx(self, screen, template: str, threshold: float)
# 测试使用 照片不删除
Test_picBack(self, screen, template: str, threshold: float)

3.4. 找图(多分辨率)

find_pic_q(self, screen, template: str, threshold: float)

3.5. 找图(后台)(多分辨率)

find_pic_qBack(self, screen, template: str, threshold: float)

3.6. 等待图片

find_picEx(self, screen, template: str, threshold: float)
# 测试使用 照片不删除
Test_picBack(self, screen, template: str, threshold: float)

3.7. 等待图片(有提示)

find_pic_q(self, screen, template: str, threshold: float)

三、模拟器模拟操作

1. 鼠标操作

1.1 模拟点击

click(self, x, y)
click_point(x: int, y: int)

1.2 模拟点击(后台)

clickBack(self, x, y)

1.3 模拟相对点击

click_window(cx, cy, hwnd)

1.4 模拟随机点击

randomClick(self, x1, y1, x2, y2)

1.5 模拟长按(后台)

HoldonBack(self, x, y)

1.6 模拟滑动

glide(self, x1, y1, x2, y2)

2. 模拟键盘操作

1.1 截取指定范围(cv2方法)

getCapture(self, stax, stay, endx, endy)

1.2 截取指定范围(openCV方法)

get_screen(self, stax: int, stay: int, endx: int, endy: int)

1.3 截取指定范围(后台)(openCV方法)

get_screenEx(self, stax: int, stay: int, endx: int, endy: int)
get_screenBack(self, stax: int, stay: int, endx: int, endy: int)
# 测试使用 照片不删除
Test_screenBack(self, stax: int, stay: int, endx: int, endy: int)

3. 模拟组合操作

3.1 模拟发信息

sendmes(self, hwnd, msg)

参考网站名称


  • 8
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值