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: | ||||
---|---|---|---|---|
ECW | EPW | EW |
Syntax Note:
The syntax definitions in the following text use these conventions for clarity:
BOLD CODE | indicates text which must be typed exactly as shown. |
CODE | indicates optional text, which may be typed as shown or omitted. |
Bold italic | names a required argument; a value must be supplied. |
Regular italic | names an optional argument. |
ellipsis… | after an argument means that more than one may be given. |
New Commands:
Syntax:
ECW
/A /F:
fmtstring /I /P /V /W:
width
window
/A | use ASCII characters to draw the tree structure |
/F: fmtstring | define the format string |
/I | invisible windows only |
/P | page output |
/V | visible windows only |
/W: width | set the line width |
window | the 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
/A | use ASCII characters to draw the tree structure |
/F: fmtstring | define the format string |
/I | invisible windows only |
/P | page output |
/R | recurse |
/V | visible windows only |
/W: width | set the line width |
pid | the 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"
.
Syntax:
EW
/F:
fmtstring /I /P /V /W:
width
/F: fmtstring | define the format string |
/I | invisible windows only |
/P | page output |
/V | visible windows only |
/W: width | set 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: |
---|---|
$c | the window’s class name |
$h | the window handle |
$p | the window owner’s pid |
$s | the window’s styles word |
$t | the window’s title |
$v | V for visible or I for invisible |
$x | the window’s extended styles word |
$H | the window’s height |
$S | the window’s show state |
$W | the window’s width |
$X | the window’s left edge |
$Y | the 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 |
0 | zero-pads a numeric field |
. | uses decimal instead of hex |
! | forces uppercase |
, | forces lowercase |
width | set the field’s width (decimal only) |
A few character escapes are also supported:
Escape: | Gives: |
---|---|
\e | ASCII escape |
\k | backquote |
\n | newline |
\p | percent sign |
\q | double quote |
\r | carriage return |
\t | tab |
\\ | 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.