JSI Tip 8569. Sysmetr freeware displays the value of a specified system metric on the CMD.EXE console.

Downloads
sysmetr.zip


Download Sysmetr.zip.

When you type sysmetr /?, you receive:

Version 1.0, Copyright (C)2001 Frank P. Westlake
Prints the value of the specified system metric to STDOUT.

SysMetr index
SysMetr /L

index Index number of system metric to query (use /L to see a list of indexes).
/L    Print a list of index values that can be queried.

The return value is the value of the system metric. The output is of the form:

      value\[tab\]description

To use the value in a batch program you have three choices, depending on your
operating system:

1) Walk through the possible ERRORLEVEL values with 'IF ERRORLEVEL n'.
2) Use the variable %ErrorLevel%.
3) Extract the value with 'FOR /F %%A IN ('sysmetr n') Do SET value=%%A'
When you type sysmetr /L, you receive:
INDEX   DEFINITION
0       Width, in pixels, of the screen.
1       Height, in pixels, of the screen.
2       Width, in pixels, of a vertical scroll bar.
3       Height, in pixels, of a horizontal scroll bar.
4       Height, in pixels, of normal caption area.
5       The width, in pixels, of a window border.
6       The height, in pixels, of a window border.
7       Thickness, in pixels, of the horizontal border of a window that has a caption but is not sizable.
8       Thickness, in pixels, of the vertical border of a window that has a caption but is not sizable.
9       Height, in pixels, of the thumb box in a vertical scroll bar.
10      Width, in pixels, of the thumb box in a horizontal scroll bar.
11      The default width, in pixels, of an icon.
12      The default height, in pixels, of an icon.
13      Width, in pixels, of a cursor.
14      Height, in pixels, of a cursor.
15      Height, in pixels, of single-line menu bar.
16      Width of the client area for a full-screen window.
17      Height of the client area for a full-screen window.
18      For double-byte character set versions of Windows, height, in pixels, of the Kanji window at the bottom of the screen.
19      TRUE or nonzero if a mouse is installed; FALSE, or zero, otherwise.
20      Height, in pixels, of the arrow bitmap on a vertical scroll bar.
21      Width, in pixels, of the arrow bitmap on a horizontal scroll bar.
22      TRUE or nonzero if the debugging version of USER.EXE is installed; FALSE, or zero, otherwise.
23      TRUE or nonzero if the meanings of the left and right mouse buttons are swapped; FALSE, or zero, otherwise.
24      SM_RESERVED1
25      SM_RESERVED2
26      SM_RESERVED3
27      SM_RESERVED4
28      Minimum width, in pixels, of a window.
29      Minimum height, in pixels, of a window.
30      Width, in pixels, of a button in a window's caption or title bar.
31      Height, in pixels, of a button in a window's caption or title bar.
32      Width of the horizontal sizing border around the perimeter of a window that can be resized.
33      Height of the vertical sizing border around the perimeter of a window that can be resized.
34      Minimum tracking width, in pixels, of a window. The user cannot drag the window frame to a size smaller than these dimensions.
35      Minimum tracking height, in pixels, of a window. The user cannot drag the window frame to a size smaller than these dimensions.
36      Width, in pixels, of the rectangle around the location of a first click in a double-click sequence.
        The second click must occur within this rectangle for the system to consider the two clicks a double-click.
37      Height, in pixels, of the rectangle around the location of a first click in a double-click sequence.
        The second click must occur within this rectangle for the system to consider the two clicks a double-click.
38      Width, in pixels, of a grid cell for items in large icon view. Each item fits into a rectangle of this size when arranged.
39      Height, in pixels, of a grid cell for items in large icon view. Each item fits into a rectangle of this size when arranged.
40      TRUE, or nonzero if drop-down menus are right-aligned relative to the corresponding menu-bar item; FALSE,
        or zero if they are left-aligned.
41      TRUE or nonzero if the Microsoft Windows for Pen computing extensions are installed; zero, or FALSE, otherwise.
42      TRUE or nonzero if the double-byte character set (DBCS) version of USER.EXE is installed; FALSE, or zero otherwise.
43      Number of buttons on mouse, or zero if no mouse is installed.
44      TRUE if security is present, FALSE otherwise.
45      Width, in pixels, of a 3-D border.
46      Height, in pixels, of a 3-D border.
47      Width, in pixels, of a grid cell for minimized windows. Each minimized window fits into a rectangle this size when arranged.
48      Height, in pixels, of a grid cell for minimized windows. Each minimized window fits into a rectangle this size when arranged.
49      Recommended width, in pixels, of a small icon. Small icons typically appear in window captions and in small icon view.
50      Recommended height, in pixels, of a small icon. Small icons typically appear in window captions and in small icon view.
51      Height, in pixels, of a small caption.
52      Width, in pixels, of small caption buttons.
53      Height, in pixels, of small caption buttons.
54      Width, in pixels, of menu bar buttons, such as multiple document (MIDI) child close.
55      Height, in pixels, of menu bar buttons, such as multiple document (MIDI) child close.
56      Flags specifying how the system arranged minimized windows
        (start)|(direction)=(0=Bottom-Left,1=Bottom-Right,2=Top-Left,3=Top-Right,8=Hide)|(0=Horizontal,4=Vertical).
57      Width, in pixels, of a normal minimized window.
58      Height, in pixels, of a normal minimized window.
59      Default width, in pixels, of a window that has a caption and sizing borders.
        The user cannot drag the window frame to a size larger than these dimensions.
60      Default height, in pixels, of a window that has a caption and sizing borders.
        The user cannot drag the window frame to a size larger than these dimensions.
61      Default width, in pixels, of a maximized top-level window.
62      Default height, in pixels, of a maximized top-level window.
63      The least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use.
64      64 undefined.
65      65 undefined.
66      66 undefined.
67      Value that specifies how the system was started: 0=Normal boot; 1=Fail-safe boot; 2=Fail-safe with network boot.
        Fail-safe boot (also called SafeBoot) bypasses the user's startup files.
68      Width, in pixels, of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before
        a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting
        a drag operation.
69      Height, in pixels, of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before
        a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting
        a drag operation.
70      TRUE or nonzero if the user requires an application to present information visually in situations where it would otherwise
        present the information only in audible form; FALSE, or zero, otherwise.
71      Width, in pixels, of the default menu check-mark bitmap.
72      Height, in pixels, of the default menu check-mark bitmap.
73      TRUE if the computer has a low-end (slow) processor, FALSE otherwise.
74      TRUE if the system is enabled for Hebrew/Arabic languages.
75      Windows NT only: TRUE or nonzero if a mouse with a wheel is installed; FALSE, or zero, otherwise.



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish