1 Star 1 Fork 0

Acytoo / JGM-Automator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

JGM Automator

这是基于 OpenCV 模板匹配的《家国梦》游戏自动化脚本。

安装与运行

以下命令中,python是指python3,使用Linux而且默认python2的同学自行修改命令。Windows请无视本行。

# 安装依赖
python -m pip install uiautomator2 opencv

# adb 连接
# 使用 MuMu 模拟器,确保屏幕大小为 1920(长) * 1080(宽)
adb connect 127.0.0.1:7555

# 获取 device 名称,并填写至 main.py
adb devices

# 在已完成 adb 连接后,在手机安装 ATX 应用
python -m uiautomator2 init

# 打开 ATX ,点击“启动 UIAutomator”选项,确保 UIAutomator 是运行的。

# 进入游戏页面,启动自动脚本。
python main.py

说明

  • 建筑编号
  • Weditor

我们可以使用 Weditor 工具,获取屏幕坐标,以及在线编写自动化脚本。

# 安装依赖
python -m pip install --pre weditor

# 启动 Weditor
python -m weditor

偷懒 - 不想使用模拟器,不想修改屏幕坐标,又没有1920x1080分辨率的手机,可以使用adb修改设备的分辨率。

adb shell wm size 1080x1920
adb shell wm density 240 (可选)

如果通过adb修改了分辨率,可以通过以下命令将手机分辨率改回去。

adb shell wm size reset
adb shell wm density reset

空文件

简介

《家国梦》游戏自动化脚本。 展开 收起
Python
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/acytoo/JGM-Automator.git
git@gitee.com:acytoo/JGM-Automator.git
acytoo
JGM-Automator
JGM-Automator
master

搜索帮助