https://github.com/h-d-owl/colorsearch
A WinAPI-based console application for detecting specific pixel colors on your screen and automating interactions.
https://github.com/h-d-owl/colorsearch
autoclick automation automation-tools color-detection console-app cpp game-automation gui-automation hooks pet-project pixelscan screen-capture screen-scraping triggerbot winapi windows
Last synced: about 2 months ago
JSON representation
A WinAPI-based console application for detecting specific pixel colors on your screen and automating interactions.
- Host: GitHub
- URL: https://github.com/h-d-owl/colorsearch
- Owner: H-D-OWL
- License: mit
- Created: 2025-08-07T11:37:56.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-09-11T10:53:30.000Z (10 months ago)
- Last Synced: 2025-09-11T13:28:08.798Z (10 months ago)
- Topics: autoclick, automation, automation-tools, color-detection, console-app, cpp, game-automation, gui-automation, hooks, pet-project, pixelscan, screen-capture, screen-scraping, triggerbot, winapi, windows
- Language: C++
- Homepage:
- Size: 68.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ColorSearch
## Description
A console application that uses WinAPI to determine specific colors of pixels on the screen and perform certain actions (moving the cursor to the found color, emulating pressing a specific key, and a combination of these actions).


## Table of Contents
- [Description](#description)
- [Demo](#demo)
- [Technologies used](#technologies-used)
- [Requirements](#requirements)
- [Compilation](#compilation)
- [Visual Studio](#visual-studio)
- [Command prompt](#command-prompt)
- [Usage](#usage)
- [Examples of use](#examples-of-use)
- [Troubleshooting](#troubleshooting)
- [Security and legal](#security-and-legal)
- [Contribute](#contribute)
- [Download](#download)
* **WinAPI**;
* **GDI**;
* **System hooks**;
* **Bitwise image analysis**;
* **Input emulation**;
- **OS:** Windows 10 / 11
- **IDE / Build tools:** Visual Studio 2022 (or newer) with the **Desktop development with C++** workload installed
- Alternatively, `msbuild` available via **Developer Command Prompt for VS 2022**
- **Permissions:** The program uses low-level hooks and input emulation. On some systems, you may need to run it as administrator.
1. Open `ColorSearch.sln` in Visual Studio.
2. Set Configuration to **Release** and Platform to **x64** (or **x86** depending on your Windows architecture).
3. Go to **Build → Build Solution** or press **Ctrl + Shift + B**.
4. The executable will be located in the build output folder: ColorSearch\x64\Release\ColorSearch.exe (x64) or ColorSearch\Release\ColorSearch.exe (x86).
1. Open **Developer Command Prompt for VS 2022**
2. Navigate to the project directory: **cd path\to\ColorSearch**. For example: cd C:\Users\User2\Desktop\ColorSearch
3. Enter the command in the terminal: **msbuild ColorSearch.sln /p:Configuration=Release /p:Platform=x64** (or **/p:Platform=x86** depending on your Windows architecture)
4. The executable will be located in the build output folder: ColorSearch\x64\Release\ColorSearch.exe (x64) or ColorSearch\Release\ColorSearch.exe (x86).
1. Define the scanning area (Set two points between which there will be a rectangular scanning area):
* To set a point, move the cursor to the desired location and press F1. The points should not be on the same line (horizontal or vertical).
2. Define colors to search:
* To set a color, hover over it and press F2. You must define at least 1 color.
* To finish defining a color, press F3.
3. Set the colors scatter. The minimum spread is 0 and the maximum is 254.
4. Select the action that will happen when detect color:
* F4: Move the cursor to the location of the detected color.
* F5: Press the button you specified.
* F6: Move the cursor to the location of the detected color and press the button you specified.
* If you selected: F5 or F6 actions (which use keystroke simulation), the next key you press (except F1 - F12) will become the key for simulation.
5. Set the scan frequency (in seconds). Minimum frequency is 0.01.
6. Press F7 to start/stop scanning. Press F8 to hide/show the program. Press F9 to stop the program (F1–F9 keystrokes are constantly monitored. You can start/stop scanning (and all other F1–F8 key actions) even if the program is not in focus or show.).

* **Automation in games or apps**: Automatically perform a click or key press when a specific color appears on the screen—useful for fast or repetitive visual cues.
* **Visual notifications**: Set the program to react when a visual indicator (color) appears—trigger actions such as cursor movement or button press automatically.
## Troubleshooting
When you close the program you should hear a sound, otherwise make sure the program is not in Tack Manager->Processes.
If an error occurs while working in the application (for example: Error: Failed to install key hook.)
* Try running the application as an administrator.
* Add the program to the exceptions of the antivirus or antivirus software.
This tool uses low-level interception and emulation of keyboard and mouse input. Using it with third-party software (including games) may result in blocking. **The author is not responsible for the illegal or incorrect use of the program.**
* Found a bug or want a new feature? Let me know via [Issues](https://github.com/H-D-OWL/ColorSearch/issues).