EnumWin plugin for Take Command / TCC / TCC/LE

beta version 0.27.1.1     2024-04-03

Charles Dye

Purpose:

This plugin adds commands to list windows.

Installation:

To use this plugin, copy EnumWin.dll and EnumWin.chm to some known location on your hard drive. (If you are still using the 32-bit version of Take Command, take EnumWin-x86.dll instead of EnumWin.dll.) Load the .DLL file with a PLUGIN /L command, for example:

plugin /l c:\bin\tcmd\test\enumwin.dll

If you copy these files to a subdirectory named PlugIns within your Take Command program directory, the plugin will be loaded automatically when TCC starts.

Plugin Features:

New Commands:
ECWEPWEW

Syntax Note:

The syntax definitions in the following text use these conventions for clarity:

BOLD CODEindicates text which must be typed exactly as shown.
CODEindicates optional text, which may be typed as shown or omitted.
Bold italicnames a required argument; a value must be supplied.
Regular italicnames an optional argument.
ellipsis…after an argument means that more than one may be given.

New Commands:

ECW — List child windows.

Syntax:
ECW /A /F:fmtstring /I /P /V /W:width window

/Ause ASCII characters to draw the tree structure
/F:fmtstringdefine the format string
/Iinvisible windows only
/Ppage output
/Vvisible windows only
/W:widthset the line width
windowthe window handle or title

The window is required. It may be either a window handle (use a leading 0x for hex) or a title (wildcards are supported).

If /F:fmtstring is not given, the default format string is "$08h: $v $-25c \q$t\q".



EPW — List a program’s windows.

Syntax:
EPW /A /F:fmtstring /I /P /R /V /W:width program

/Ause ASCII characters to draw the tree structure
/F:fmtstringdefine the format string
/Iinvisible windows only
/Ppage output
/Rrecurse
/Vvisible windows only
/W:widthset the line width
pidthe program ID: decimal, or hex with a leading 0X

program is either an executable name or a process ID. If program is not given, the default is the current instance of TCC.

If /F:fmtstring is not given, the default format string is "$08h: $v $-25c \q$t\q".



EW — List top-level windows.

Syntax:
EW /F:fmtstring /I /P /V /W:width

/F:fmtstringdefine the format string
/Iinvisible windows only
/Ppage output
/Vvisible windows only
/W:widthset the line width

If /F:fmtstring is not given, the default format string is "$08h: $v $-25c \q$t\q".



Format String:

These are the tokens supported in the format string:

Token:Gives:
$cthe window’s class name
$hthe window handle
$pthe window owner’s pid
$sthe window’s styles word
$tthe window’s title
$vV for visible or I for invisible
$xthe window’s extended styles word
$Hthe window’s height
$Sthe window’s show state
$Wthe window’s width
$Xthe window’s left edge
$Ythe window’s top edge
$$dollar sign

You can use modifiers between the dollar sign and the letter to change how the value is displayed:

Modifier:Changes the value:
-left-aligns a field
0zero-pads a numeric field
.uses decimal instead of hex
!forces uppercase
,forces lowercase
widthset the field’s width (decimal only)

A few character escapes are also supported:

Escape:Gives:
\eASCII escape
\kbackquote
\nnewline
\ppercent sign
\qdouble quote
\rcarriage return
\ttab
\\backslash

Startup Message:

This plugin displays an informational line when it initializes. The message will be suppressed in transient or pipe shells. You can disable it for all shells by defining an environment variable named NOLOADMSG, for example:

set /e /u noloadmsg=1

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.

EnumWin 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 plugin from http://charlesdye.net/dl/enumwin.zip.