Skip to content
/ op Public
forked from WallBreaker2/op

Windows消息模拟,gdi,dx,opengl截图,找图,找字(OCR)

License

Notifications You must be signed in to change notification settings

icyboxs/op

This branch is up to date with WallBreaker2/op:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5f4ec11 · Feb 16, 2025
Jul 2, 2021
Jun 6, 2021
Jun 13, 2021
Nov 4, 2023
May 18, 2024
Mar 26, 2023
Aug 21, 2023
Nov 19, 2023
Dec 31, 2018
Mar 3, 2022
Apr 21, 2024
Apr 21, 2024
Jun 20, 2020
Feb 16, 2025
Jan 21, 2019
Dec 17, 2019
May 7, 2021
May 7, 2021
May 7, 2021
May 7, 2021
Apr 4, 2020

Repository files navigation

OP 自动化插件

GitHub Release License

📖 项目概述

OP(Operator & Open)是一款开源自动化工具,专为Windows平台设计。核心功能包括:

  • 🔍 窗口自动化:键鼠消息模拟/后台截图
  • 🖼️ 图像处理:智能找图/色值识别
  • OCR引擎:传统算法+AI引擎双模式
  • 🛠️ 平台支持:原生32/64位双版本

架构图

🚀 核心特性

自动化控制

  • Windows消息级键鼠模拟
  • 多渲染引擎(GDI/DirectX/OpenGL)截图
  • 主流安卓模拟器最小化截图

图像识别

  • 智能模糊匹配(支持偏色/透明度)
  • 多区域并行搜索
  • 自适应屏幕缩放识别

OCR引擎

# 双模式文字识别示例
text = op.Ocr(0,0,2000,2000,"eng",0.8)  # Tesseract引擎
legacy_text = op.OcrEx(0,0,500,500,"sysfont")  # 传统算法(最大255x255点阵)

## 📦 快速开始

### 环境准备
1. 下载最新发行版:[GitHub Releases](https://github.com/WallBreaker2/op/releases)
2. 注册COM组件管理员权限):
```powershell
regsvr32 op_x86.dll  # 32位
regsvr32 op_x64.dll  # 64位

Python示例

from win32com.client import Dispatch

op = Dispatch("op.opsoft")
print(f"SDK版本: {op.Ver()}")

# 图像搜索(返回坐标元组)
found, x, y = op.FindPic(
    0, 0, 1920, 1080,
    "button.png",
    "101010",  # 偏色值
    0.9,       # 相似度
    0          # 搜索模式
)

🛠️ 开发指南

编译要求

组件 版本要求
Visual Studio 2022 (MSVC 143)
CMake ≥3.24
Windows SDK 10.0.19041.0

依赖管理

# 配置环境变量
set BLACKBONE_ROOT="D:\libs\Blackbone"
依赖库 编译方式 备注
Blackbone 静态链接 进程注入核心
Kiero 源码集成 DirectX Hook实现
Tesseract 动态链接 OCR引擎(默认包含)

💬 社区支持

📜 开源协议

本项目基于 MIT License 开源,特别感谢:

  • TSPLUG - Windows部分函数参考实现
  • Kiero - DirectX注入方案

About

Windows消息模拟,gdi,dx,opengl截图,找图,找字(OCR)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 79.2%
  • C 18.5%
  • Python 1.3%
  • CMake 0.9%
  • Batchfile 0.1%
  • SWIG 0.0%