就是在win7(32位)没有获取到屏幕的分辨,造成X和Y坐标为负数了。
locoman 发表于 2020-10-21 16:20
你的代码,在 Windows 7 X64 测试正常- @echo off
- for /f "tokens=1-2" %%a in ('mshta VBScript:Execute("CreateObject(""Scripting.Filesystemobject"").GetStandardStream(1).Write(screen.width&"" ""&screen.height)"^)(close^)') do (
- set "ScreenWidth=%%a"
- set "ScreenHeight=%%b"
- echo %%a
- echo %%b
- )
复制代码
|