Last active
December 24, 2019 11:19
-
-
Save BigBang1112/7fc72f3913600e4283a1ba2e50953cb3 to your computer and use it in GitHub Desktop.
The first step for the first automated world record tracking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET login=[your_maniaplanet_login] | |
SET password=[your_maniaplanet_password] | |
SET maniaplanet_exe_location=C:\Program Files\ManiaPlanet | |
SET title=TMStadium@nadeo | |
SET loop=true | |
SET /A loop_interval=60 | |
SET /A close_interval=60 | |
echo LeaderboardRefresher v.0.0.1 | |
echo by BigBang1112 | |
echo "" | |
:LOOP | |
SET maniaplanet_exe=%maniaplanet_exe_location%\ManiaPlanet | |
echo Starting %maniaplanet_exe%... | |
set start_with_pid=wmic process call create "%maniaplanet_exe% /login=%login% /password=%password% /title=%title% /url=maniaplanet:///:leaderboards" | |
for /f "tokens=3 delims=; " %%a in ('%start_with_pid% ^| find "ProcessId"') do set PID=%%a | |
echo Started ManiaPlanet on PID %PID% | |
SET /A interval=%loop_interval%*60-%close_interval% | |
TIMEOUT %close_interval% /NOBREAK | |
TASKKILL /PID %PID% /F | |
TIMEOUT %interval% /NOBREAK | |
GOTO LOOP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment