LookupErrors utility
beta version 0.99.29 2024-05-15
Charles Dye
Purpose:
This utility displays the text for a Windows error code. It’s a functional replacement for the LookupErrors.exe included with Take Command v22 and later. You can use it in TCC/LE and in earlier versions of Take Command either by putting it in your search path somewhere, or by creating an alias to launch it. You can even use it from cmd.exe.
Features:
- Accepts error codes in decimal, or hexadecimal with a leading
0x
- Can look up error values in the range 12001 — 12199 (WinInet.dll, WinHttp.dll)
- Single-instance; the dialog may be shared among multiple shells or Take Command tabs
- Adds an option to make the dialog transparent when focus is lost
- Saves settings to the registry when the dialog is closed, and restores them when it is reopened
- Can optionally save the dialog’s screen position to the registry at close, and reopen in the same position
- Settings may be changed from the command line
- Recognizes Windows Terminal, Console2, and ConEmu windows, as well as Take Command and console windows
Syntax:
LOOKUPERRORS
/A:
alpha /C /I /N:
flags /P:
pos /T /W:
hwnd
n
/A: alpha | set the ‘faded’ transparency level |
/C | close any open LookupErrors dialogs |
/I | enable fading when the dialog is not active |
/N: flags | disable features: |
I fading | |
T topmost | |
/P: pos | position on parent window (0–9) |
/T | keep the dialog on top of other windows |
/W: hwnd | specify the parent window |
n | the Windows error code to look up |
n may be decimal, or hexadecimal with a leading 0x
.
/A:
alpha sets the transparency level
of the LookupErrors dialog when it’s not active and the ‘Fade when
Inactive’ option is set. The range allowed for alpha
is 48 (very faint) to 240 (nearly opaque); the default is 224.
/I
, /N:I
, /T
, and /N:T
enable and disable the ‘fade when inactive’ and ‘topmost’
options. The colon after /N
is optional. Note that I and T
are the accelerator keys for these options in the dialog box.
/P:
pos:
The ‘Position on parent’ value controls how the LookupErrors dialog
is positioned on the parent window when no valid position values are found in
the registry. The default is 9, at the upper right of TCC’s window.
7: top left | 8: top center | 9: top right |
4: center left | 5: centered | 6: center right |
1: bottom left | 2: bottom center | 3: bottom right |
/W:
hwnd is for compatibility
with Take Command; this option is not likely to be useful at the command
line. If /W:
is specified and no valid window position is
found in the registry, the dialog will be positioned on the specified window.
The colon may be omitted; the window handle may be either decimal or hex
with a leading 0x
. (If there is no valid window position in
the registry and no /W:
hwnd was
given, the dialog will be positioned on TCC’s window.)
Dialog Position:
The 📌︎ tick box at the upper right corner controls whether the dialog’s screen position is saved. If it is checked when you close the LookupErrors dialog, the dialog’s screen position will be saved to the registry, and the dialog will reopen at the same position the next time you run the program.
If the 📌︎ tick box is not checked when you close the dialog, any screen position will be deleted from the registry. The next time you run LookupErrors.exe, the dialog will be positioned on TCC’s window.
Registry Use:
LookupErrors setting are stored in the registry under HKEY_CURRENT_USER\Software\JPPlugins\LookupErrors.
Value Name: | Type: | Description: |
---|---|---|
Alpha | REG_DWORD | transparency of ‘faded’ dialog, 0x30 to 0xE0 |
Always on top | REG_DWORD | boolean: nonzero if ‘topmost’ is enabled |
Fade when inactive | REG_DWORD | boolean: nonzero if ‘fade when inactive’ is enabled |
Position on parent | REG_DWORD | controls the dialog’s position on TCC’s window; see /P: pos |
X | REG_DWORD | dialog X coordinate; saved only if 📌︎ is checked at close |
Y | REG_DWORD | dialog Y coordinate; saved only if 📌︎ is checked at close |
Acknowledgments:
The “open book” icon is by Freepik, https://www.freepik.com/. I downloaded it from FlatIcon: https://www.flaticon.com/free-icon/open-book_9809619/
Changes:
Version | Date | Changes |
---|---|---|
0.99.29 | 2024-05-15 | Permit negative error numbers on the command line and in the edit control. |
0.99.28.1 | 2024-05-14 | Allow options to begin with a hyphen instead of a forward slash. Replaced the “Big Red X” icon with the “open book” icon. |
0.99.28 | 2024-05-02 | If the parent window specified via /W is
invisible, entirely offscreen, or of class “PseudoConsoleWindow”, ignore it. |
Status and Licensing:
Consider this beta software. It may well have issues. Try it at your own risk. If you find a problem, you can report it in the JP Software support forum.
LookupErrors is currently licensed only for testing purposes. I may make binaries and source code available under some free license once I consider it ready for use.
Download:
You can download the current version of the program from http://charlesdye.net/dl/lookuperrors.zip.