An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# ColorSearch




Releases


License


## 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).


## Demo

![ColorSearchGame2](https://github.com/user-attachments/assets/3c9373bd-233d-40d8-a128-419bd5a7c9b4)

![ColorSearchGame1](https://github.com/user-attachments/assets/e4c6a2ce-8df5-44a8-9e60-03a47571a101)

## 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)


### Technologies used

* **WinAPI**;

* **GDI**;

* **System hooks**;

* **Bitwise image analysis**;

* **Input emulation**;


## Requirements

- **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.


## Compilation


### Visual Studio

1. Open `ColorSearch.sln` in Visual Studio.

2. Set Configuration to **Release** and Platform to **x64** (or **x86** depending on your Windows architecture).


Sprite-0001


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).


### Command prompt

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).


## Usage

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).


Sprite-0003

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.


Sprite-0004

3. Set the colors scatter. The minimum spread is 0 and the maximum is 254.


Sprite-0005

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.


Sprite-0002

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.).

![ColorSearch](https://github.com/user-attachments/assets/6a313158-9a57-4a93-892a-556e867bc6c5)


## Examples of use

* **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.


## Security and legal

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.**


## Contribute

* Found a bug or want a new feature? Let me know via [Issues](https://github.com/H-D-OWL/ColorSearch/issues).


## Download