现在的位置: 首页 > 综合 > 正文

“一不做,二不休”, 干脆把开局库更换的批处理文件也调试好放出来…

2013年10月13日 ⁄ 综合 ⁄ 共 4191字 ⁄ 字号 评论关闭

下载编译成.exe文件的演示版: http://att.newsmth.net/att.php?p.34.22537.326.rar

@echo off
:start
color 0a

set /a a=6
set /a b=10
set /a GUIexist=1

:re
set /a a+=2
set /a b+=5
@mode con: cols=%b% lines=%a%

if %a% lss 23 goto re
mode con lines=24 cols=60
set/a a1=1
set/a a2=1
set/a a3=1
set/a a4=1

title 象棋旋风开局库更换
echo Cyclone GUI Openbook Changer v1.0
echo @Copyright 2010
echo ---------------------------------------------------
echo Use this program to select different Openbooks.
echo Select [c,g,d,j,k,x] or [1,2,3,4,5,6] for:
echo.
echo [1]. 情人库; [2]. 天涯库;
echo.
echo [3]. 江南库730; [4]. 江南库630
echo.
echo ---------------------------------------------------
if NOT exist "cyclone 情人.obk" (set/a a1=0)
if NOT exist "cyclone 天涯.obk" (set/a a2=0)
if not exist "cyclone 江南630.obk" (set/a a4=0)
if not exist "cylone 江南.obk" (set/a a3=0)

set/a obookExist=0
if exist cyclone.obk (set/a obookExist+=1)
set/a nbookExist=0
set/a nbookExist+=a1
set/a nbookExist+=a2
set/a nbookExist+=a3
set/a nbookExist+=a4
set/a BookExist=0
set/a BookExist+=obookExist
set/a BookExist+=nbookExist
if %bookExist% lss 1 (echo. && echo. No Openbook exists in current directory. && echo. && echo Program will be terminated. && ping -n 3 127.1>nul 2>nul && goto endendend)

tasklist|find /i "象棋旋风v3.0.exe" >nul 2>nul || echo Cyclone GUI is not in use.
echo.
if errorlevel 1 (set CycloneOn=0) else (taskkill /F /IM 象棋旋风v3.0.exe && set CycloneOn=1) >nul 2>nul
:next

set /p input=
echo.
rem you selected %input%
if '%input%'=='1' (goto qingren)
if '%input%'=='q' (goto qingren)
if '%input%'=='Q' (goto qingren)
if '%input%'=='2' (goto tianya)
if '%input%'=='t' (goto tianya )
if '%input%'=='T' (goto tianya)
if '%input%'=='3' (goto jiangnan730 )
if '%input%'=='j' (goto jiangnan730 )
if '%input%'=='J' (goto jiangnan730 )
if '%input%'=='4' (goto jiangnan630)
if '%input%'=='g' (goto jiangnan630 )
if '%input%'=='G' (goto jiangnan630 ) else (cls
echo.
echo.
echo.
echo Undefined Choice.
echo.
echo Restart in 3 seconds...
ping -n 3 127.1>nul 2>nul
goto start)

@echo off
  :qingren
echo 情人库.obk selected.

  if not exist "%cd%/cyclone 情人.obk" (if exist "%cd%/cyclone.obk" (
echo The current Openbook is 情人库 or 情人库 does NOT exist.
goto end))

if not exist "%cd%/cyclone.obk" goto xqingren
if not exist "%cd%/cyclone 天涯.obk" (@rename cyclone.obk "cyclone 天涯.obk">nul 2>nul)
if not exist "%cd%/cyclone 江南.obk" (@rename cyclone.obk "cyclone 江南.obk">nul 2>nul)
:xqingren
@rename "cyclone 情人.obk" cyclone.obk >nul 2>nul || echo. Change into 情人库 failed.

echo.
if errorlevel 1 goto error
  echo Openbook has been set as 情人库.obk
ping -n 3 127.1>nul 2>nul
goto end

  :tianya
echo 天涯库.obk selected.

  if not exist "%cd%/cyclone 天涯.obk" (if exist "%cd%/cyclone.obk" (
echo The current Openbook is 天涯库 or 天涯库 does NOT exist.
goto end))

if not exist "%cd%/cyclone.obk" goto xtianya
if not exist "%cd%/cyclone 情人.obk" (@rename cyclone.obk "cyclone 情人.obk">nul 2>nul)
if not exist "%cd%/cyclone 江南.obk" (@rename cyclone.obk "cyclone 江南.obk">nul 2>nul)
:xtianya
@rename "cyclone 天涯.obk" cyclone.obk >nul 2>nul || echo. Change into 天涯库 failed.

echo.
if errorlevel 1 goto error
  echo Openbook has been set as 天涯库.obk
ping -n 3 127.1>nul 2>nul
goto end

:jiangnan730
echo 江南库.obk selected.

  if not exist "%cd%/cyclone 江南.obk" (if exist "%cd%/cyclone.obk" (
echo The current Openbook is 江南库 or 江南库 does NOT exist.
goto end))

if not exist "%cd%/cyclone.obk" goto xjiangnan
if not exist "%cd%/cyclone 天涯.obk" (@rename cyclone.obk "cyclone 天涯.obk">nul 2>nul)
if not exist "%cd%/cyclone 情人.obk" (@rename cyclone.obk "cyclone 情人.obk">nul 2>nul)
:xjiangnan
@rename "cyclone 江南.obk" cyclone.obk >nul 2>nul || echo. Change into 江南库 failed.

echo.
if errorlevel 1 goto error
  echo Openbook has been set as 江南库.obk
ping -n 3 127.1>nul 2>nul
goto end

:jiangnan630
echo 江南库630.obk selected but 江南库.obk will be used.

goto jiangnan730

:error
echo. The desired Openbook file does not exist, or
echo. The target cyclone.obk is being in use.
echo.
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo Engine changing failed!!!!!!!!!!!!!!!
echo.
pause >nul

:end
if exist 象棋旋风v3.0.exe (start 象棋旋风v3.0.exe)
if errorlevel 1 (set GUIexist=0)
::ping -n 3 127.1>nul 2>nul
if %CycloneOn% equ 1 (echo. && echo Openbook changed and Cyclone GUI restarted.) else (echo. && echo Cyclone GUI started.)
ping -n 5 127.1>nul 2>nul
:endendend
set/a a=24
set/a b=60
:rre
set /a a-=2
set /a b-=5
@mode con: cols=%b% lines=%a%
if %a% geq 9 goto rre
exit

 

 

抱歉!评论已关闭.