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:

Syntax:

LOOKUPERRORS /A:alpha /C /I /N:flags /P:pos /T /W:hwnd n

/A:alphaset the ‘faded’ transparency level
/Cclose any open LookupErrors dialogs
/Ienable fading when the dialog is not active
/N:flagsdisable features:
    I    fading
    T    topmost
/P:posposition on parent window (0–9)
/Tkeep the dialog on top of other windows
/W:hwndspecify the parent window
  
nthe 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 left8: top center9: top right
4: center left5: centered6: center right
1: bottom left2: bottom center3: 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:
AlphaREG_DWORDtransparency of ‘faded’ dialog, 0x30 to 0xE0
Always on topREG_DWORDboolean: nonzero if ‘topmost’ is enabled
Fade when inactiveREG_DWORDboolean: nonzero if ‘fade when inactive’ is enabled
Position on parentREG_DWORDcontrols the dialog’s position on TCC’s window; see /P:pos
XREG_DWORDdialog X coordinate; saved only if 📌︎ is checked at close
YREG_DWORDdialog 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:


VersionDateChanges
0.99.292024-05-15Permit negative error numbers on the command line and in the edit control.
0.99.28.12024-05-14Allow options to begin with a hyphen instead of a forward slash. Replaced the “Big Red X” icon with the “open book” icon.
0.99.282024-05-02If 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.