• bat脚本自定义魔兽warIII运行分辨率,去黑边


      我们一般平时安装完WarIII后运行时的分辨率默认是800*600,导致有黑边的存在。所以我写了一个bat脚本来自定义WarIII的运行分辨率。需要以管理员身份运行。

    下载链接:

      链接:https://pan.baidu.com/s/1v-ZWjkhkVQTaXunEJs8ThQ
      提取码:m17p

    WarIII_Screen_Setting.bat脚本:

    @echo off
    
    if not "%OS%"=="Windows_NT" exit
    title WarIII Screen Setting
    chcp 65001>nul
    cd /D %~dp0
    echo WarIII Screen Setting
    echo ====================================
    echo Author:feiquan
    echo Create:2019/2/28 10:00
    echo UpdataDate:2019/2/28 13:03 
    echo Version:1.0v
    echo Function:
    echo     WarIII Screen Auto Setting
    echo           Plese Run as Administrator.
    echo           Auto backup WarIII reg to current path warIII_Old.reg .
    echo =====================================
    pause
    cls
    
    
    setlocal enabledelayedExpansion
    set reg_war=hkcuSoftwareBlizzard EntertainmentWarcraft IIIVideo
    reg query "%reg_war%" >nul
    if not %errorlevel%==0 (
        echo Not find Warcraft III .Please intasll Warcraft III try again .... & timeout /t 5 /nobreak &exit
    ) else (
        echo Find Warcraft III success.
        echo.
    )
    echo Current War3 Screen width and height :
    for /F "skip=2 usebackq tokens=3" %%i in (`reg query "%reg_war%"  /v reswidth`) do set /a w=%%i & echo W: !w!
    for /F "skip=2 usebackq tokens=3" %%i in (`reg query "%reg_war%"  /v resheight`) do set /a h=%%i & echo H: !h!
    
    echo.
    set /p question=Do you wart to change WarIII Screen ? (Y/N)
    if /i not "%question%"=="Y" exit
    echo Start backup WarIII reg :
    reg export "%reg_war%" warIII_Old.reg /y  >nul
    if %errorlevel%==0 ( 
        echo WarIII_Reg backup to %cd%warIII_Old.reg 
    ) else (
        echo WarIII backup defeat.
        set /p question=Do you wart to continue set WarIII Screen ? (Y/N)
        if /i not "%question%"=="Y" exit
    )
    :setting
    echo.
    echo Start set WarIII Screen :
    set /p SW=Please input WarIII screen width :
    set /p SH=Please input WarIII screen height :
    echo.
    reg add "%reg_war%" /v reswidth  /t reg_dword /d %SW%  /f >nul
    if %errorlevel%==0 (
        echo Add new width success. 
    ) else (
        echo Add new width defeat. 
    )
    reg add "%reg_war%" /v resheight  /t reg_dword /d %SH%  /f >nul
    if %errorlevel%==0 (
        echo Add new heigth success. 
        echo You can restat warIII.
        timeout /t 3 /nobreak
        exit
    ) else (
        echo Add new heigth defeat. 
        goto setting
    )

    运行结果:

    然后重启warIII就可以了。

    如果在运行脚本时有任何问题,请在下方留言,我会修正。

  • 相关阅读:
    Direct3D光与材质的颜色值
    Direct中灯光的注意事项
    DirectInput:poll轮询理解
    GetAsyncKeyState函数返回值
    关于PeekMessage中hwnd参数
    VS链接MySql需注意的一些问题(C/C++)
    Windows配置:环境变量是个什么玩意儿?
    项目中ofstream 打开当前文件夹下内容失败原因
    hdoj--2073--无限的路(数学规律)
    hdoj--1205--吃糖果(规律)
  • 原文地址:https://www.cnblogs.com/feiquan/p/10449803.html
Copyright © 2020-2023  润新知