@SCREENRES
— Returns the
current settings for the specified monitor.
Syntax:
%@SCREENRES[
monitor,
info]
monitor | zero-based number of the monitor to examine |
info | what to return: |
0 or I — all info in one long string | |
1 or X — screen width (pixels) | |
2 or Y — screen height (pixels) | |
3 or C — color depth (bits per pixel) | |
4 or R — refresh rate (Hz) | |
8 or T — horizontal and vertical only |
If you do not specify a monitor, the primary monitor will be examined by default.
Instead of a number, you may specify the info to return as a letter or word; only the first letter is significant.
rem Get display settings for the primary monitor:
set screenwidth=%@screenres[,1]
set screenheight=%@screenres[,2]
set screenbpp=%@screenres[,3]
See also: the SCREENRES
command, which
displays or changes the current screen resolution.