Skip to content

About

Visual programmable auto-clicker and automation for Windows: blocks, functions, screen-image conditions, global hotkeys. One small EXE, no dependencies (EN/PL)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

PixelLogic

PixelLogic

A visual, programmable auto-clicker for Windows. No code, no installation, no dependencies.

English · Polski

Main window

Run it

Download PixelLogic.exe from Releases and start it. That is all: one file of about 300 KB that uses only what Windows 10 (1903 or newer) and Windows 11 already contain. The file is not code-signed, so SmartScreen may ask once: More info → Run anyway.

Try it in a minute: menu ⋯ → Load the example and practice window, then press Start (F6). Stop with F8.

Default hotkey Action
F6 Start / Resume
F7 Pause
F8 Emergency Stop - ends all loops and functions at once and releases held keys

They work while the window is hidden and can be changed in Settings, which reports conflicts at once.

What it can do

  • Blocks instead of code - click or drag blocks into the flow, edit them on the right. Rare options stay folded under Randomization, Advanced, Safety and Tolerance. Undo / redo, copy, duplicate, disable, notes, Run only this block.
  • Control flow - If / Else If / Else, For, While, Do-While, Break, Continue, Return, reusable functions with parameters and return values.
  • Time - Sleep, Every X seconds (cooldown), Wait until, named timers and an Elapsed time condition.
  • Mouse - click, double click, press / hold / release, drag, scroll, at a point or at the cursor. Repeat N times, while a condition holds or until stopped; frequency in ms or clicks per second, ± ms variance, random position offset (rectangle or radius) that never leaves the monitor.
  • Keyboard - keys and shortcuts such as Ctrl+Shift+S or Q+W, hold time, the same repeat options, typing text.
  • Screen conditions - region matches an image, pixel color, and others; each can be reversed with If NOT and combined with AND / OR.
  • Alerts - built-in sounds, .wav / .mp3, a Windows notification and optional auto-pause.
  • Variables - numbers and true / false. Every number field also accepts a variable or arithmetic: hp - 10, random(1, 5), match_x.
  • Tray - state color, tooltip with the active step, Start / Resume, Pause, Emergency Stop, Open window, Exit.
  • Files - profiles and exported functions are readable JSON with the reference images inside.
  • English and Polish interface.

Live preview

How image matching works

Select a region on the frozen screenshot; its content becomes the reference image. Test / live preview shows the current similarity, the threshold, the verdict and an outline on the screen. Use either Min. similarity 90% or Max. difference 10% - they mean the same.

Method Similarity Good for
Matching pixels (default) share of pixels whose R, G and B each differ by at most the tolerance (24) bars, icons, indicators: a health bar that is 70% full is about 70% similar
Average color difference 100 · (1 − √MSE / 255) over all color channels noisy or slightly animated content. Values are high: 90% is already a visible difference
Find the image nearby normalized cross-correlation (ZNCC) of brightness, searched in and around the region things that move. The center of the match is stored in match_x, match_y

If a condition cannot be checked (no image selected, wrong size), the whole condition counts as false, also with NOT, and the log says why. Games must run in windowed or borderless mode; exclusive full screen cannot be captured.

Example workflow

examples/practice-heal-and-click.json runs against the built-in practice window:

If NOT pixel (121, 161) is #3B7DF0        → log a hint and stop (practice window missing)
Click the target                          → gives it the keyboard focus
Start timer "session"
While the active window is "PixelLogic practice"   (limit 600 s)
  If image [CAPTCHA] matches ≥ 90%        → alarm sound + notification, then pause
  Else
    Call "Heal if needed" (presses = 3)
      If NOT image [full HP bar] ≥ 70%    → press 1, "presses" times, every 250 ± 60 ms
    Every 2 s                             → 5 clicks, 8 per second ± 25 ms, position ± 60 × 30 px
  If timer "session" ≥ 120 s              → alert, Break

Safety

  • While, Do-While and repeat while stop after 10 000 repeats or 3600 s by default. Change it in Settings or per block; 0 = unlimited.
  • Until stopped and Repeat until stopped run until F8 - that is their purpose.
  • Pause freezes timers, releases held keys and presses them again on resume.
  • Windows does not let a normal program control one running as administrator. If clicks have no effect there, start PixelLogic as administrator too.
  • Follow the rules of the programs and games you use; many online games forbid automation.

Resource use

Measured on the author's PC: window ready in 0.2 s, 0% CPU when idle, about 65 MB of private memory (about 10 MB working set in the tray), about 2% of one core while running the example, including the practice window. How it stays low:

  • every wait sleeps on an event, so there are no busy loops and Stop is immediate;
  • only the rectangle a condition needs is copied, and never more often than the scan interval (150 ms by default);
  • the engine has its own thread, the window refreshes only while something runs, and the interface does not use the GPU.

Why this stack

C# + WPF on .NET Framework 4.8. It is part of Windows, so the program is one small file with nothing to install. It gives direct access to the native functions that matter here: SendInput (virtual key and scan code, physical pixels, per-monitor DPI), RegisterHotKey, BitBlt of small regions and the notification area. Electron or a bundled Python would need 50-150 MB for the same job.

Build from source

No Visual Studio or SDK: the script uses the C# compiler that comes with Windows.

powershell -ExecutionPolicy Bypass -File .\build.ps1          # bin\PixelLogic.exe
powershell -ExecutionPolicy Bypass -File .\build.ps1 -Test    # build and run the tests
Folder Content
src/Core model, block catalog (Specs.cs), engine, image matching, JSON. Knows nothing about Windows; another platform implements Platform.cs
src/Windows input, screen capture, sounds, hotkeys, startup entry
src/UI flow view, inspector, live preview, region picker, settings, practice window
src/App startup, tray, settings, editor state, translations
tests engine tests on a simulated platform, translation check, screenshots, live test

A new block needs an entry in Specs.cs, a case in Engine.cs and a summary in Describe.cs; the form, JSON format and palette follow by themselves.

Settings live in %APPDATA%\PixelLogic. Run at Windows startup is off by default and is a single value under HKCU\Software\Microsoft\Windows\CurrentVersion\Run. To uninstall, switch it off and delete the file and that folder.

License

CC BY-NC-SA 4.0

About

Visual programmable auto-clicker and automation for Windows: blocks, functions, screen-image conditions, global hotkeys. One small EXE, no dependencies (EN/PL)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages