Latest release: Download ScaleLogger.exe
ScaleLogger is a Windows-only native C++20 desktop utility for reading serial scale output and injecting values into the currently focused window.
- C++20
- Win32 APIs (GUI, serial, SendInput)
- CMake
- MSVC / Visual Studio 2026 x64
src/native application coderesources/icon + version resource scripttools/release helper scripts
See BUILD_WINDOWS.md.
Quick start:
cmake --preset windows-vs2026-x64
cmake --build --preset windows-releasePrerequisites:
- Visual Studio 2026 (MSVC x64 toolchain)
- CMake available in
PATH
For a fresh-clone reproducible release package, run:
ScaleLogger_build_tagged_release.batOptional:
ScaleLogger_build_tagged_release.bat [build_tag] [keep]Default behavior removes out\ after successful packaging. Add keep to preserve out\ and intermediate build artifacts.
The wrapper configures/builds in Release first, then produces:
release\ScaleLogger_<buildtag>.exerelease\SHA256SUMS.txtrelease\BUILD_MANIFEST_<version>.txt
ScaleLogger reads and writes a JSON config file (ScaleLogger.config.json) with fields such as:
config_folder,config_file_namelogs_folderlog_file_patternlog_mode(none,single_file,per_session)connect_on_startupdark_mode(main-window dark styling toggle; default isfalse)enable_startup_trace(controls early TRACE lines in fatal forensics; defaulttrue)enable_fatal_log_file(controls writing%TEMP%\\ScaleLogger_fatal.log; defaulttrue)show_crash_dialog(shows copy-friendly crash dialog on fatal crash; defaulttrue)include_trace_in_crash_dialog(includes recent fatal trace text in crash dialog; defaulttrue)- optional serial dropdown option arrays:
baud_rates,data_bits_options,parity_options,stop_bits_options
To keep schema consistency, config files also carry serial/parsing/output fields (including custom_sequence and eol) in the same single full-config file.
The single configuration file is the runtime source of truth for app-level and serial/parsing/output behavior.
When post_action is custom_sequence, the intended supported tokens are:
enter, tab, up, down, left, right (optional: esc, space).
Path rule:
config_folderandlogs_folderare treated as runtime-resolved filesystem paths.- Absolute paths are used as-is.
- Relative paths are resolved against the app data root (prefer
%USERPROFILE%\ScaleLoggeron Windows). - If user config is missing, startup fallback
default_config.jsonis resolved from the executable directory (not from the process working directory).
- No file logging (
log_mode: "none"): UI log only. - Single file (
log_mode: "single_file"): appends to one log file. - Per session (
log_mode: "per_session"): creates a timestamped file usinglog_file_pattern.
Runtime file logging flushes each line and emits a one-time visible error if file writes fail.
If your USB-serial adapter is not detected (e.g. appears as “USB-Serial Controller” in Device Manager), you may need to install the appropriate driver (CH340 / Prolific / FTDI).
ScaleLogger uses a dedicated early-startup and crash log:
- Before UI logging is initialized, startup traces are written to:
%TEMP%\\ScaleLogger_fatal.log - This file is also used for fatal crash diagnostics (via
SetUnhandledExceptionFilter) - Use this file first if the app exits or crashes before the in-app log appears
These diagnostic traces are separate from normal runtime/session logging.
On fatal crashes:
- A small native crash dialog is shown (Copy / Close)
- If dialog creation fails, a MessageBox fallback is used
- The report includes:
- exception details (when available)
- startup-crash indicator
- path to
%TEMP%\\ScaleLogger_fatal.log - optional recent trace lines
Configuration:
enable_startup_trace→ enables early startup tracingenable_fatal_log_file→ controls writing the fatal log fileshow_crash_dialog→ enables crash dialoginclude_trace_in_crash_dialog→ embeds recent trace text in dialog
You can disable startup tracing with:
enable_startup_trace=false
default_config.json uses %USERPROFILE% placeholders for folder defaults.
At runtime these placeholders are expanded to the active user profile location so builds are portable across different Windows accounts.
Use ScaleLogger_build_tagged_release.bat to create a native release folder with:
ScaleLogger_<buildtag>.exeSHA256SUMS.txtBUILD_MANIFEST_<version>.txt(version derived fromCMakeLists.txt)
Release manifest includes runtime combo option arrays sourced from default_config.json:
baud_ratesdata_bits_optionsparity_optionsstop_bits_options
MIT (LICENSE).