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).
- Description
- Demo
- Technologies used
- Requirements
- Compilation
- Usage
- Examples of use
- Troubleshooting
- Security and legal
- Contribute
- 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,
msbuildavailable via Developer Command Prompt for VS 2022
- Alternatively,
- Permissions: The program uses low-level hooks and input emulation. On some systems, you may need to run it as administrator.
-
Open
ColorSearch.slnin Visual Studio. -
Set Configuration to Release and Platform to x64 (or x86 depending on your Windows architecture).
- Go to Build → Build Solution or press Ctrl + Shift + B.
- The executable will be located in the build output folder: ColorSearch\x64\Release\ColorSearch.exe (x64) or ColorSearch\Release\ColorSearch.exe (x86).
-
Open Developer Command Prompt for VS 2022
-
Navigate to the project directory: cd path\to\ColorSearch. For example: cd C:\Users\User2\Desktop\ColorSearch
-
Enter the command in the terminal: msbuild ColorSearch.sln /p:Configuration=Release /p:Platform=x64 (or /p:Platform=x86 depending on your Windows architecture)
-
The executable will be located in the build output folder: ColorSearch\x64\Release\ColorSearch.exe (x64) or ColorSearch\Release\ColorSearch.exe (x86).
- 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).
- 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.
- Set the colors scatter. The minimum spread is 0 and the maximum is 254.
- 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.
-
Set the scan frequency (in seconds). Minimum frequency is 0.01.
-
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.
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.





