ok-oldking/ok-script

Modern Python Computer Vision Automation Framework

What it solves

It provides a unified Python framework for automating interactions with Windows applications, Windows games, Android emulators, and ADB-connected devices. It eliminates the need to write separate automation scripts for different platforms by allowing a single set of task code to work across these environments.

How it works

The framework leverages computer vision to identify UI elements and trigger actions. It integrates several vision techniques, including OCR (Optical Character Recognition), OpenCV template matching, and YOLO-based detection. To manage visual assets, it uses the COCO format for template materials, which allows the system to automatically scale templates based on the screen resolution of the target device.

Who it’s for

It is designed for developers creating automation bots, specifically for those targeting desktop software and mobile games running on Windows or Android.

Highlights

  • Multi-platform support: Works across Windows clients, Android emulators, and ADB devices with a single codebase.
  • Flexible interface options: Can be run in headless mode, via a Qt-based desktop GUI, or through a FastAPI-based web interface.
  • Vision-integrated: Built-in support for OCR, template matching, and YOLO.
  • Resolution adaptive: Automatically scales templates to fit different screen resolutions.
  • Developer tools: Includes tools for screenshotting, input simulation, device control, and a visual debugging overlay.

Related

  • Project
  • Project
  • Project
  • Project
  • Project