用批处理获取屏幕分辨率
2020-4-29 乱云飞
@cc_on @if (0==0) @else @rem BAT 部分 @echo off cls setlocal set width= set height= for /f "tokens=1,2" %%a in ('cscript //nologo //e:jscript "%~dpnx0"') do (set width=%%a & set height=%%b) echo.&echo 屏幕宽度:%width% echo.&echo 屏幕高度:%height% echo.&cmd /k >nul pause goto :eof @end // JScript 部分 var screen = new ActiveXObject("HTMLFile").parentWindow.screen; WScript.Echo(screen.width + ' ' + screen.height);本文链接:http://80c.cc/ez/298.html
发表评论: