MessageBoxEx

A message with custom colors, font, image and timers

MessageBoxEx.exe
Version
1.10.0.10
System
Windows, 32-bit (runs on 64-bit too)
Source
github.com/pedromagician/CMD_MessageBoxEx

No installation: unzip anywhere (ideally into a folder on your PATH) and run it from the command line or a batch file.

MessageBoxEx

MessageBoxEx is the big brother of MessageBox: a message window where almost everything can be set. Colors, font, image, number and labels of buttons, position, plus timers. The window can close by itself after a time or when a certain file appears on disk, so it also works as a “please wait” window during a long script.

Features

Usage

MessageBoxEx.exe -t "Hello" -m "This is a message"
MessageBoxEx.exe -m "Line 1\nLine 2\nLine 3" -l 3
MessageBoxEx.exe -m "Operation completed \u{1F44D}"
MessageBoxEx.exe -t "Warning" -m "Be careful!" -p FF0000 -b 000000 -i warning.bmp

A “working” window that disappears when the script creates done.flag:

start "" MessageBoxEx.exe -m "Working..." -button 0 -file done.flag -deleteFile
rem ... long work ...
echo.>done.flag

Options

SwitchDescription
-title, -tWindow title.
-noTitle, -ntNo title bar.
-message, -mMessage text, supports \n and \u{XXXX}.
-font, -fMessage font.
-fontsize, -fsFont size in points.
-lines, -lNumber of lines for the message (window height).
-width, -wWindow width in pixels.
-pen, -pText color (#RRGGBB or RRGGBB), default white.
-background, -bBackground color, default black.
-brush, -brFill color behind the text, default black.
-icon, -iBMP image in the window.
-iconsizeImage size in pixels.
-iconborderBorder around the image.
-iconappApplication icon (ICO or BMP) in the title bar and taskbar.
-buttonNumber of buttons: 0–3.
-widthbuttonsExtra width for each button.
-centerCenters the button text.
-b1, -b2, -b3Button labels.
-default, -dDefault button (Enter): 1–3.
-monitor, -monMonitor: Primary, Mouse, MousePointer or an index (0, 1, 2 …).
-position, -posPlacement: Center, Top, Bottom, Left, Right, Pointer, xy.
-x, -yOffset in pixels.
-topmostKeeps the window above other windows.
-blockThe parent process waits until the window closes.
-windowsReturnCode, -wrcWindows MessageBox style exit code of the pressed button.
-quietDoes not print the result to the console.
-minimumDisplayTime, -mdtThe window stays visible for at least the given milliseconds.
-timeToCompletion, -ttcThe window closes by itself after the given milliseconds.
-fileRequiredForCompletion, -frfc, -fileThe window closes once the given file appears on disk.
-deleteFileRequiredForCompletion, -dfrfc, -deleteFileDeletes that file after the window closes.
-help, -h, -?Help.