Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- SET GameArrary=Bungee, HUB, PvE, PvP, Minigames, Towny, SecQ
- FOR %%A IN (%GameArrary%) DO (
- CALL :Routine "%~1"
- )
- EXIT /B
- :Routine
- SET AppName=%~1
- SET StopApp=stop
- IF [%AppName%]==[Bungee] SET StopApp=end
- SET StopPauseSec=5
- SET StartPauseSec=10
- SET TempVBSFile=%temp%\~tmpSendKeysTemp.vbs
- IF EXIST "%TempVBSFile%" DEL /F /Q "%TempVBSFile%"
- ECHO Set WshShell = WScript.CreateObject("WScript.Shell") >>"%TempVBSFile%"
- ECHO Wscript.Sleep 900 >>"%TempVBSFile%"
- ECHO WshShell.AppActivate "%AppName%" >>"%TempVBSFile%"
- ECHO Wscript.Sleep 900 >>"%TempVBSFile%"
- ECHO WshShell.SendKeys "%StopApp%" >>"%TempVBSFile%"
- ECHO Wscript.Sleep 500 >>"%TempVBSFile%"
- ECHO WshShell.SendKeys "{ENTER}" >>"%TempVBSFile%"
- ECHO Wscript.Sleep %StopPauseSec%000 >>"%TempVBSFile%"
- ECHO WshShell.SendKeys "%%{F4}" >>"%TempVBSFile%"
- CSCRIPT //nologo "%TempVBSFile%"
- timeout /t %StartPauseSec%
- start "" "cmd /k call BungeeStartup.bat"
- GOTO :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement