PDA

View Full Version : Group loading bat file.


Eboonysa
03-26-2014, 12:38 AM
Hey everyone.

I spent way too long writing this code so in order to save future ppl thinking the same thing some time, I thought I'd post it here:

I'm not in any way a good bat programmer and I'm sure a lot of you have better scripts out there, so feel free to update/comment/flame.

** Trevius Edit ** Do NOT post anything MQ2-related on these forums. We appreciate you wanting to share, but sharing this info is against our rules. Feel free to share it on MQ2 sites instead.

Eboonysa
03-27-2014, 09:58 PM
Removed all mention of that which cannot be named.


@ECHO OFF
:BEGIN
REM This is so our "plugin: somefile" is found, can probably use abs path instead
cd "C:\Program Files (x86)\WinEQ2\"
GOTO WINEQ2

REM Checks if we have WinEQ2 running
:WINEQ2
tasklist /FI "IMAGENAME eq WinEQ2.exe" | find /i "WinEQ2.exe"
IF ERRORLEVEL == 2 GOTO GRPSELECT
IF ERRORLEVEL == 1 GOTO STARTWINEQ2
GOTO GRPSELECT

:STARTWINEQ2
ECHO Starting WINEQ2.....
START "" /B "C:\Program Files (x86)\WinEQ2\WinEQ2.exe"
TIMEOUT 5
GOTO GRPSELECT

REM PICK 1-5 or 0 to exit. 40 second timer to pick (or exit)
:GRPSELECT
CHOICE /C 012345 /N /T 40 /D 0 /M "Which group do you want to load? [1-5 (0 Exits)]"
IF ERRORLEVEL == 6 GOTO FIVE
IF ERRORLEVEL == 5 GOTO FOUR
IF ERRORLEVEL == 4 GOTO THREE
IF ERRORLEVEL == 3 GOTO TWO
IF ERRORLEVEL == 2 GOTO ONE
IF ERRORLEVEL == 1 GOTO END
GOTO END

:ONE
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
GOTO BEGIN

:TWO
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
GOTO BEGIN

:THREE
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
GOTO BEGIN

:FOUR
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
GOTO BEGIN

:FIVE
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
TIMEOUT 5
"C:\Program Files (x86)\WinEQ2\WinEQ2.exe" /plugin:WinEQ2-EQ.dll "SomeChar"
GOTO BEGIN

:END
EXIT