@echo off
echo -----------------------------------------------------------------
echo 俀僾儘僙僗梡乽偝偒傘偽偡乿帺摦曄姺僶僢僠僼傽僀儖    Ver.1.1
echo 丂僈僀僟儞僗晅偒
echo 丂儅儖僠僐傾CPU丄僽儔僂僓嫟桳愝掕偑昁恵偱偡乮懡暘乯
echo -----------------------------------------------------------------

:偙偺峴偵懕偔峴偼柍帇偟偰寢峔偱偡丅
IF "%1"=="" GOTO Setup
IF NOT "%~1"=="0" GOTO RUN1START
:Setup
echo.
SET /P ANS=乽偝偒傘偽偡乿偱僆僾僔儑儞愝掕丒僽儔僂僓嫟桳愝掕傪偟傑偟偨偐丠[Y/N]
IF /I "%ANS%"=="Y" goto RUN0_START
echo.
ECHO 僆僾僔儑儞愝掕丒僽儔僂僓嫟桳愝掕傪偟偰壓偝偄丅
echo.
SET /P DMY=堦搙庤摦偱僟僂儞儘乕僪偲曄姺傪妋擣偡傞偺傪悇彠偟傑偡丅OK丠
java -jar Saccubus.jar
:RUN0_START
echo.
SET /P ANS=%~nx0 傪曇廤偟傑偟偨偐丠[Y/N]
IF /I "%ANS%"=="Y" goto RUN0_END
echo.
SET /P DMY=%~nx0 傪曇廤偟偰壓偝偄丅OK丠
EXIT
:RUN0_END
echo.
echo 搑拞偱拞抐偡傞偵偼丄僐儅儞僪僾儘儞僾僩夋柺傪廔椆屻
echo 僞僗僋儅僱乕僕儍乕偐傜ffmpeg僾儘僙僗俀偮傪廔椆偝偣傑偡丅
echo.
echo 儅儖僠僐傾僾儘僙僢僒乕悇彠偱偡丅
echo.
echo 廔椆屻偺僔儍僢僩僟僂儞偺愝掕偼弌棃傑偣傫丅偛椆彸壓偝偄丅
if "%1"=="0" (
echo.
echo 儘僌偼 auto2log_[1,2].txt 偵婰榐偝傟傑偡丅
)
echo.
SET /P ANS=帺摦曄姺傪幚峴偟傑偡丅[Y/N]丠
IF /I "%ANS%"=="N" goto EOF
:RUN1START

:仭仭仭仭廔椆屻偵僔儍僢僩僟僂儞偺愝掕偼弌棃傑偣傫丅偛椆彸壓偝偄丅
:set SHUTDOWN=NO
:仭仭仭仭伀儊乕儖傾僪儗僗伀僽儔僂僓嫟桳愝掕嵪傒側傜丄偦偺傑傑偱OK
set MAILADDR=doremi@mahodo.co.jp
:仭仭仭仭伀僷僗儚乕僪伀僽儔僂僓嫟桳愝掕嵪傒側傜丄偦偺傑傑偱OK
set PASSWORD=steeki_tabetai
:偙偺峴偵懕偔峴偼柍帇偟偰寢峔偱偡丅
set CMD=java -jar Saccubus.jar %MAILADDR% %PASSWORD%
IF "%~1"=="" (
start %~nx0 1
java -cp Bin.jar Sleep 5
start %~nx0 2
EXIT
)
IF "%1"=="0" (
start AUTO2PROCDEBUG.BAT %~nx0 1
java -cp Bin.jar Sleep 5
start AUTO2PROCDEBUG.BAT %~nx0 2
EXIT
)
IF NOT "%~1"=="1" GOTO RUN1END

:仭仭仭仭仭仭仭仭壓婰偺偄偔偮偐偺帠崁傪曄峏偟偰丄僟僽儖僋儕僢僋両偱偡傛丅仭

:埲崀丄
:%CMD% <摦夋ID> <夁嫀儘僌>
:偺傛偆側宍偱曄姺偟偨偄摦夋傪巜掕偟偰彂偄偰偔偩偝偄丅夁嫀儘僌偼柍偔偰傕壜丅
:傕偪傠傫壗峴偱傕壜擻偱偡丅
:埲壓偼夁嫀儘僌桳傝偺椺
:%CMD% sm123456789 2011/7/1
:%CMD% sm123456789 "2011/1/1 10:10"

:仭仭仭仭仭仭仭仭伀伀伀埲壓偺峴偼僾儘僙僗侾偺張棟傪巜掕偟偰壓偝偄丅伀伀伀仭
:婰弎椺偼2011/8/12偺儃僇儘儔儞僉儞僌忋埵摦夋丄夁嫀儘僌側偟偱偡
:僾儘僙僗俀偲廳暋偟側偄傛偆偵拲堄偟偰壓偝偄
%CMD% sm15255755
:%CMD% sm15230821
:仭仭仭仭仭仭仭仭仾仾仾埲忋偺峴偼僾儘僙僗侾偺張棟傪巜掕偟偰壓偝偄丅仾仾仾仭


:偙偺峴偵懕偔峴偼柍帇偟偰寢峔偱偡丅
GOTO RUN_END
:RUN1END
IF NOT "%~1"=="2" GOTO RUN2END

:仭仭仭仭仭仭仭仭伀伀伀埲壓偺峴偼僾儘僙僗俀偺張棟傪巜掕偟偰壓偝偄丅伀伀伀仭
:婰弎椺偼2011/8/12偺儃僇儘儔儞僉儞僌忋埵摦夋丄夁嫀儘僌側偟偱偡
:僾儘僙僗侾偲廳暋偟側偄傛偆偵拲堄偟偰壓偝偄
%CMD% sm15261599
:%CMD% sm15172108
:仭仭仭仭仭仭仭仭仾仾仾埲忋偺峴偼僾儘僙僗俀偺張棟傪巜掕偟偰壓偝偄丅仾仾仾仭

GOTO RUN_END
:RUN2END
:RUN_END
:偙傟偱偍傢傝丅
echo.
echo 偡傋偰廔椆偟傑偟偨丅
Exit
:EOF
