Automation with Computer Vision for Python
Project description
ok-script
- ok-script 是基于图像识别技术, 纯Python实现的, 支持Windows窗口和模拟器的自动化测试框架。
- 框架包含UI, 截图, 输入, 设备控制, OCR, 模板匹配, 框框Debug浮层, 基于Github Action的测试, 打包, 升级/降级。
- 基于开发一个工业级的自动化软件仅需几百行代码。
优势
- 纯Python实现, 免费开源, 依赖库均为开源方案
- 支持pip install任何第三方库, 可以方便整合yolo等框架
- 一套代码即可支持Windows安卓模拟器/ADB连接的虚拟机, Windows客户端游戏
- 自适应分辨率
- 使用coco管理图片匹配素材, 仅需一个分辨率下的截图就, 支持不同分辨率自适应
- 可打包离线/在线安装setup.exe, 支持通过Pip/Git国内镜像在线增量更新. 在线安装包仅3M
- 支持Github Action一键构建
- 支持多语言国际化
使用 目前仅支持Python 3.12
- 在你的项目中通过pip依赖使用
pip install ok-script
- 本地编译源码使用,
pip install -r requirements.txt # 安装编译ok-script所需的的依赖
mklink /d "C:\path\to\your-project\ok" "C:\path\to\ok-script\ok" #Windows CMD 创建软链接到你的项目中
in_place_build.bat #如修改__init__.pyx 需要编译Cython代码
文档和示例代码
- 游戏自动化入门
- 快速开始
- 进阶使用
- API文档
- 开发者群: 938132715
- pip https://pypi.org/project/ok-script
使用ok-script的项目:
- 鸣潮 https://github.com/ok-oldking/ok-wuthering-wave
- 原神(不在维护, 但是后台过剧情可用) https://github.com/ok-oldking/ok-genshin-impact
- 少前2 https://github.com/ok-oldking/ok-gf2
- 星铁 https://github.com/Shasnow/ok-starrailassistant
- 星痕共鸣 https://github.com/Sanheiii/ok-star-resonance
- 二重螺旋 https://github.com/BnanZ0/ok-duet-night-abyss
- 白荆回廊(停止更新) https://github.com/ok-oldking/ok-baijing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ok_script-1.0.12.tar.gz
(209.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ok_script-1.0.12.tar.gz.
File metadata
- Download URL: ok_script-1.0.12.tar.gz
- Upload date:
- Size: 209.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9035230267504f980230b08150b3e1bdf2eb026fd2c1e0acdb338c684a1f40e
|
|
| MD5 |
a9ade1d8a4beee6239f572593ea9e002
|
|
| BLAKE2b-256 |
aa493bb02c590682fa04630309c3f220b003c9ba12f844b45d5bd5215160a5a8
|
File details
Details for the file ok_script-1.0.12-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: ok_script-1.0.12-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3fb4cad6258e2e36834b9070d0d94ea112eadd35adad44fafc6df3346b26a7a
|
|
| MD5 |
77d4e587cae64a50abd25bf5e7bce79d
|
|
| BLAKE2b-256 |
991ff9571250d1ec9647e1fc447b7ddc5d9cd0fe971f9c102dad1404714fc4a5
|