PixelLoop

One-pixel automation with instant stop control.

PixelLoop is a Windows desktop automation tool for users who need to trigger a fixed action loop based on a single screen pixel. It continuously checks one configured pixel color, clicks a defined location, performs a mouse scroll, counts loops, and stops immediately when the pixel changes. The product is for users who want a lightweight, deterministic utility with no OCR, no image recognition, and no window detection.

Business Goals

  • Achieve a 70 percent activation rate within 30 days of first launch by making the app usable in under 2 minutes.
  • Reach 40 percent weekly retention among activated users within 8 weeks by keeping the workflow simple and reliable.
  • Reduce support requests related to setup and configuration to fewer than 5 percent of installs by shipping a clear config-first onboarding flow.
  • Maintain a crash-free session rate above 99.5 percent across the first 90 days after release.
  • Convert at least 20 percent of trial users to repeated weekly usage through dependable start/stop behavior and visible counters.

User Goals

  • Start and stop the automation loop in one click.
  • Automatically read configuration from config.json at launch without manual setup.
  • Accurately detect one pixel color with a configurable tolerance.
  • See live counters for loops and captures during and after execution.
  • Stop immediately when the pixel no longer matches the target color.

Non-Goals

  • No OCR or text recognition of any kind.
  • No image matching, template matching, or computer vision.
  • No window title detection, focus detection, or game-specific integration logic.
  • No multi-step scenario editor or macro scripting language in version 1.

Power User Lucas, 29 - Lucas uses a Windows PC and wants a lightweight utility that performs the same action repeatedly while a screen condition remains true. He values deterministic behavior and low overhead.

Power User Lucas, 29

  • As a power user, I want to start the loop quickly, so that I can rely on the tool without complex setup.
  • As a power user, I want the app to stop immediately when the pixel changes, so that it never keeps running past the intended condition.
  • As a power user, I want editable config values in one file, so that I can tune coordinates and tolerance without recompiling.

Automation Tester Camille, 34 - Camille wants to validate that a repeated mouse action behaves exactly the same every time and that counters reflect the real number of iterations.

Automation Tester Camille, 34

  • As an automation tester, I want precise counters for loops and captures, so that I can verify expected output.
  • As an automation tester, I want configurable delay and scroll values, so that I can reproduce timing-sensitive behavior.
  • As an automation tester, I want clear stop behavior, so that I can confirm the tool exits the loop as soon as the condition fails.

Casual User Mehdi, 41 - Mehdi is not technical and needs a polished Windows app with a minimal interface. He wants a simple start and stop workflow with visible results.

Casual User Mehdi, 41

  • As a casual user, I want a modern GUI with only the essential controls, so that I am not overwhelmed.
  • As a casual user, I want the app to load settings automatically, so that I do not have to configure everything every session.
  • As a casual user, I want visible status feedback, so that I know whether the loop is running or has stopped.

Pixel Detection Engine · High priority

  • Continuously sample exactly one screen pixel and compare it against a target color using configurable tolerance.
  • Read pixel_x and pixel_y from config.json on startup.
  • Compare against target color #FF6600 using an adjustable tolerance value.
  • Poll at a stable interval that avoids excessive CPU usage while remaining responsive.
  • Stop evaluation immediately when the pixel no longer matches the target condition.
  • Expose the current match state to the UI for live feedback.

Action Loop · High priority

  • Execute the required mouse actions in a strict sequence while the pixel condition remains true.
  • Click at click_x and click_y when the target color is detected.
  • Wait delay milliseconds after the click before scrolling.
  • Perform one mouse wheel action using the configured scroll value.
  • Wait delay milliseconds after the scroll before the next detection cycle.
  • Increment the loop counter only after the full action sequence completes.

Counters and Results · High priority

  • Track loop count and derived capture count in real time and after stop.
  • Display Boucles as the number of completed loop iterations.
  • Display Captures as loops multiplied by multiplier from config.json.
  • Update the UI live after each completed iteration.
  • Preserve the final counts after an immediate stop.
  • Reset counters when a new session starts.

Desktop UI · Medium priority

  • Provide a clean PySide6 interface with only the required controls and status surfaces.
  • Include a Commencer button and an Arrêter button.
  • Show labels for Boucles and Captures.
  • Use a modern layout with clear typography and state colors.
  • Disable start while the loop is already running and disable stop while idle.
  • Surface simple status text such as running, stopped, and config loaded.

Configuration and Packaging · Medium priority

  • Load settings from config.json automatically and keep the project ready for PyInstaller packaging.
  • Read config.json at application startup and validate required keys.
  • Provide safe defaults only when the config file is missing or malformed.
  • Organize the app into main.py, ui.py, bot.py, and config.json.
  • Ensure the code runs cleanly as a Windows .exe built with PyInstaller.
  • Log basic startup and runtime errors to a local file for troubleshooting.

Fast Launch Setup

  • User opens the Windows app and sees the main dashboard in under 2 seconds.
  • App loads config.json automatically and validates coordinates, delay, tolerance, and multiplier.
  • The interface shows the current target values and ready state.
  • User clicks Commencer to begin monitoring and action looping.
  • Time to first loop should be under 5 seconds on a typical Windows PC.
  • If config.json is invalid, the app shows a clear error and blocks start until fixed.

1. Load Configuration

  • On launch, the app reads config.json and prepares the session using the stored coordinates and timing values.
  • Validate that all required keys exist and are numeric where expected.
  • Show a visible error state if parsing fails.
  • Apply defaults only for non-critical UI preferences, not for required action parameters.

2. Start Monitoring

  • When the user presses Commencer, the bot enters a tight monitor-action loop.
  • Lock the UI into running state and prevent duplicate starts.
  • Begin checking the configured pixel immediately.
  • Keep CPU usage modest by using a small polling interval.

3. Detect Match

  • If the sampled pixel matches #FF6600 within tolerance, the app triggers the action sequence.
  • Use the exact pixel coordinates from config.json.
  • Use the tolerance setting as a simple color delta threshold.
  • If the pixel is already out of range, stop without firing click or scroll.

4. Perform Action Sequence

  • The app performs the click, waits, scrolls, waits, and then increments the loop counter.
  • Click at click_x and click_y once per successful detection.
  • Respect the configured delay in milliseconds after each action.
  • Only increment the counter after the sequence completes successfully.

5. Stop and Report

  • If the pixel no longer matches, or the user presses Arrêter, the loop ends and final results remain visible.
  • Stop immediately on mismatch or manual stop.
  • Display Boucles as the completed loop count.
  • Display Captures as loops multiplied by multiplier and keep the values on screen until the next run.

Power User Controls

  • Manual stop hotkey as an optional future enhancement.
  • Config file validation with explicit error messages for each missing field.
  • Session log export showing start time, stop time, loop count, and final captures.
  • Optional tray icon support for users who want the app minimized.
  • High-contrast and keyboard-friendly controls for accessibility.

Modern Windows UI Principles

  • Minimal interface with two primary actions and two live counters.
  • Clear running state with color and text feedback.
  • Readable spacing and large typography suitable for quick glance usage.
  • No clutter from image preview, OCR panels, or window selection dialogs.
  • Responsive controls that remain usable even during rapid loop execution.

Lucas opens PixelLoop and the app instantly loads his config.json. He clicks Commencer and watches Boucles and Captures update as the tool repeats the exact click-and-scroll sequence whenever the target pixel stays orange.

A few minutes later, the screen state changes and the pixel no longer matches. PixelLoop stops immediately, freezes the final totals on screen, and Lucas can see exactly how many iterations completed without having to guess.

That determinism matters: he gets a tiny Windows utility that does one thing reliably, with no OCR, no image matching, and no complicated setup. The result is faster execution, fewer mistakes, and a tool that is easy to package and distribute as an .exe.

User-Centric Metrics

  • First successful run completed within 5 seconds for 85 percent of users.
  • At least 95 percent of sessions show correct live loop and capture counts.
  • Manual stop succeeds within 200 ms in 99 percent of cases.
  • Fewer than 2 percent of users report confusion about config.json after first launch.
  • 80 percent of active users complete at least one session per week after setup.

Business Metrics

  • 70 percent activation within 30 days of install.
  • 40 percent weekly retention among activated users by week 8.
  • 20 percent of users return for at least 3 separate sessions in the first month.
  • Support tickets about setup remain below 5 percent of total installs.
  • At least 30 percent of users build a packaged .exe version from the project within the first release cycle.

Technical Metrics

  • Crash-free sessions above 99.5 percent.
  • Pixel sampling and UI updates remain responsive with under 100 ms perceived delay in normal use.
  • Startup time under 2 seconds on a standard Windows 10 or 11 machine.
  • No sensitive data stored beyond local config and optional local logs.

Tracking Plan

  • app_started
  • config_loaded
  • config_invalid
  • session_started
  • pixel_match_detected
  • loop_completed
  • session_stopped_manual
  • session_stopped_mismatch
  • final_counts_displayed

Technical Needs

  • Python 3.11 or newer for the runtime.
  • PySide6 for the desktop interface.
  • pynput or pyautogui for mouse click and scroll actions.
  • mss or ctypes-based screen pixel sampling for fast single-pixel reads.
  • json-based config loader with schema validation.
  • PyInstaller build configuration for Windows .exe packaging.
  • Optional structured logging with Python logging module.

Integration Points

  • Windows desktop input APIs for mouse interaction.
  • Local config.json file in the application directory.
  • PyInstaller packaging pipeline.
  • Optional Windows file system permissions for writing logs.
  • Optional GitHub Releases for distributing binaries.

Data Storage & Privacy

  • Store only local configuration values and runtime logs on the user machine.
  • Do not transmit pixel data, screenshots, or interaction history to any server.
  • Treat config.json as user-managed local data and validate before use.
  • Keep logs minimal and avoid personal data collection.
  • Document that the app is a local-only utility with no cloud dependency.

Scalability & Performance

  • Use a lightweight polling loop to avoid high CPU consumption.
  • Keep UI updates throttled so counter refreshes do not block detection.
  • Avoid full-screen capture to minimize memory use and latency.
  • Ensure the action loop remains stable under long sessions of several thousand iterations.

Potential Challenges

  • High-frequency pixel polling could raise CPU usage; mitigate with a small sleep interval and efficient single-pixel reads.
  • Mouse input timing may vary across machines; mitigate with configurable delay and clear default values.
  • Misconfigured coordinates could break behavior; mitigate with startup validation and visible error states.
  • Unexpected OS permission issues could block input automation; mitigate with clear documentation and admin-run guidance.
  • Build packaging may miss Qt plugins; mitigate with a tested PyInstaller spec and clean dependency pinning.

Team & resourcing - Small team - 1 Python engineer, 1 UI designer, part-time QA, and part-time PM.

Phase 1: MVP Shell · Weeks 1–2

  • PySide6 window with Commencer and Arrêter buttons
  • Boucles and Captures labels
  • config.json loader and validator
  • Basic app state management and startup error handling

Phase 2: Bot Engine · Weeks 3–4

  • Single-pixel detection loop
  • Color tolerance comparison logic
  • Click, delay, scroll, delay action sequence
  • Loop counter and derived capture count

Phase 3: Stability and Packaging · Weeks 5–6

  • Manual stop handling and immediate loop exit
  • Structured logging and error recovery
  • PyInstaller build configuration for .exe output
  • Windows testing on multiple display scaling settings

Phase 4: Polish and Release · Weeks 7–8

  • UI refinement and status states
  • Config validation messaging improvements
  • Release checklist and packaging documentation
  • Regression test pass for long-run stability

Paste this into Cursor, Bolt, Lovable, or v0 to start building.

Build a Windows desktop automation app in Python called PixelLoop using PySide6.

Goal:
Create a local-only .exe-ready utility that continuously checks one screen pixel, and while that pixel matches the target color within a configurable tolerance, it clicks a fixed location, waits, scrolls, waits, increments a loop counter, and repeats. Stop immediately when the pixel no longer matches or when the user presses Arrêter.

Hard requirements:
Use only single-pixel color detection. Do not use OCR, image recognition, OpenCV template matching, window detection, or any game-specific logic beyond the pixel check and input actions.

Files:
main.py
ui.py
bot.py
config.json

Config:
Load config.json automatically at startup. Required keys:
pixel_x, pixel_y, click_x, click_y, scroll, delay, tolerance, multiplier
Use target color #FF6600 in code. Delay is in milliseconds. Tolerance is numeric and user-configurable. Multiplier is used to compute Captures = Boucles × multiplier.

UI:
Modern PySide6 interface with only these visible controls and outputs:
Commencer button
Arrêter button
Boucles label with live loop count
Captures label with live derived count
Show running/stopped and config validation state clearly.

Behavior:
When Commencer is pressed, begin a loop that samples the configured pixel continuously.
If the pixel matches #FF6600 within tolerance, do this exact sequence:
click at click_x, click_y
wait delay ms
scroll by scroll
wait delay ms
increment Boucles by 1
repeat
If the pixel no longer matches, stop immediately and keep the final counts displayed.

Architecture:
main.py launches the app and wires UI to bot logic.
ui.py contains the PySide6 window and widgets.
bot.py contains the pixel reading, loop controller, action executor, config loading, validation, and counters.
config.json contains default values and is read on startup.

Implementation details:
Use efficient single-pixel screen sampling suitable for Windows.
Use a background worker thread or Qt thread so the UI stays responsive.
Expose methods to start, stop, reset counts, and update live counters.
Handle invalid config cleanly with user-facing error messages.
Add structured logging to a local file for startup and runtime issues.

Packaging:
Prepare the project to be bundled with PyInstaller into a single Windows .exe.
Avoid external cloud dependencies.

Deliver the complete project file by file, starting with main.py, then wait for confirmation before continuing.

Business Idea

Je veux développer un logiciel Windows (.exe) en Python. Le logiciel est destiné à automatiser une manipulation dans Dofus. IMPORTANT : Je ne veux PAS utiliser d'OCR. Je ne veux PAS de reconnaissance d'image. Je ne veux PAS de détection de fenêtre. Je ne veux PAS changer la logique. Je veux uniquement reproduire exactement cette logique : 1. Vérifier en permanence le pixel : X = 490 Y = 592 2. Si la couleur du pixel est #FF6600 (avec une tolérance réglable) : - Cliquer à : X = 522 Y = 671 - Attendre 100 ms - Faire un scroll de souris de -120 - Attendre 100 ms - Ajouter 1 au compteur - Recommencer la boucle 3. Si le pixel n'est plus de la couleur #FF6600 : - Arrêter immédiatement la boucle - Afficher : Boucles = compteur Captures = compteur × 7 Je veux une interface graphique moderne avec PySide6. L'interface doit contenir : - un bouton "Commencer" - un bouton "Arrêter" - un label "Boucles" - un label "Captures" Je veux également un fichier config.json contenant : - pixel_x - pixel_y - click_x - click_y - scroll - delay - tolerance - multiplier Le programme doit lire automatiquement config.json au démarrage. Le logiciel doit être organisé proprement avec plusieurs fichiers : main.py ui.py bot.py config.json Je veux un projet propre, prêt à être compilé avec PyInstaller afin d'obtenir un .exe. IMPORTANT : Ne me donne pas des morceaux de code. Je veux le projet complet fichier par fichier. Attends ma validation avant de passer au fichier suivant. Pixel de détection X = 490 Y = 592 Couleur = #FF6600 Clique ici X = 522 Y = 671 Scroll = -120 Delay = 100 ms Tolérance = 30 Résultat = Nombre de boucles × 7 Si tu proposes une autre logique (OCR, OpenCV, reconnaissance d'image, recherche de fenêtre, etc.), refuse cette idée et reste strictement sur ma logique de détection d'un seul pixel.

Make My PRD

Design by The Resonance | Powered by GPC – The AI Transformation Company

    PRD: Je veux développer un logiciel Windows (