ok-oldking/ok-script

Modern Python Computer Vision Automation Framework

What it solves

It provides a unified Python framework for automating tasks across Windows applications, Windows games, Android emulators, and ADB devices. It eliminates the need to write separate automation logic for different platforms by offering a consistent set of tools for screen interaction and device control.

How it works

The framework uses computer vision to identify UI elements and trigger actions. It supports several recognition methods, including OCR, OpenCV template matching, and YOLO-based vision solutions. To manage visual assets, it uses the COCO format, which allows the system to automatically scale templates based on the screen resolution of the target device.

Who it’s for

Developers and automation engineers who need to create bots or automated tests for software and games that lack an official API, specifically those targeting Windows and Android environments.

Highlights

  • Multi-platform support: A single set of task code works across Windows clients, Android emulators, and ADB devices.
  • Flexible interfaces: Can be run in headless mode, via a Qt-based desktop GUI, or through a FastAPI-based web interface.
  • Vision-powered: Integrates OCR, OpenCV, and YOLO for robust element detection.
  • Resolution adaptive: Automatically scales templates to match different screen resolutions using COCO-formatted assets.
  • Developer tools: Includes built-in tools for screenshotting, input simulation, device control, and visual debugging overlays.

Related

  • Project
  • Project
  • Project
  • Project
  • Project