HX3 Foren

HX3 Foren (https://hx3.de/)
-   Software & Hardware (https://hx3.de/software-hardware-80/)
-   -   Hilfe mit Batch Datei (https://hx3.de/software-hardware-80/hilfe-batch-datei-22606/)

b1n4ry 30.05.2013 17:32

Hilfe mit Batch Datei
 
Hallo Leute! :D

Ich hab aus Spaß eine kleine Batch Datei gemacht um ArmA 2 zu starten.
JA, mir ist klar das es mit einem Launcher einfacher wäre, aber ich hatte einfach mal Lust sowas selbst zu machen.

Nuja, der Code ist unten. Was nicht funktioniert ist folgendes:

Der erste set befehl macht den choice befehl kaputt. Also, wenn er da ist kommt beim Starten die Meldung
Zitat:

Zitat von CMD.exe
Der Befehl "Choice" ist entweder falsch geschrieben oder konnte nicht gefunden werden

Wenn ich den ersten set Befehl auskommentiere, funktioniert der choice Befehl einwandfrei.

Desweiteren wollte ich noch z.B. die Parameter in eine Varible packen und die 2. Abfrage irgendwie weg machen, aber da kümmer ich mich später drum. Erstmal will ich dass das funktioniert. ^^

Hoffe der Code ist selbsterklärend.
Könnt natürlich gerne mal selbst Ausprobieren. xD

cheers,
B1n4ry
Code:

@echo off

set "Path=C:\Program Files (x86)\Steam\SteamApps\common\arma 2 operation arrowhead"

set "ArmA=%Path%\arma2oa.exe"
set "ArmABeta=%Path%\Expansion\beta\arma2oa.exe"

set /p CMods=<"%Path%\ClientMods.txt"
set /p ACE=<"%Path%\ACEMods.txt"
set /p TeamMods=<"%Path%\TeamMods.txt"

cd /D "%Path%"

echo Druecke die entsprechende Taste. Schliessen oder Strg+C zum abbrechen.
echo (1) ArmA2 CO Vanilla
echo (2) ArmA2 CO Vanilla+Customs
echo (3) ArmA2 CO ACE+Customs
echo (4) ArmA2 CO Teamabend

Choice /n /c "1234"
pause
if errorlevel 4 goto Team
if errorlevel 3 goto ACEC
if errorlevel 2 goto VanC
if errorlevel 1 goto Van

:Van
        CHOICE /n /c "12" /M "Mit Beta? (1)Ja,(2)Nein"
                if errorlevel 2 goto VanN
                if errorlevel 1 goto VanJ
               
                :VanJ
                        start "" "%ArmABeta%" "-nosplash" "-nofilepatching" "-skipintro" "-showscripterrors" "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-beta=expansion\beta;expension\beta\expansion;"
                                       
                :VanN
                        start "" "%ArmA%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6"
                       
:VanC       
        CHOICE /n /c "12" /M "Mit Beta? (1)Ja,(2)Nein"
                if errorlevel 2 goto VanCN
                if errorlevel 1 goto VanCJ       
               
                :VanCJ
                        start "" "%ArmABeta%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-beta=expansion\beta;expension\beta\expansion;" "-mod=%CMods%"
                                       
                :VanCN
                        start "" "%ArmA%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-mod=%CMods%"               
                                               
:ACEC
        CHOICE /n /c "12" /M "Mit Beta? (1)Ja,(2)Nein"
                if errorlevel 2 goto ACECN
                if errorlevel 1 goto ACECJ
               
                :ACECJ
                        start "" "%ArmABeta%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-beta=expansion\beta;expension\beta\expansion;" "-mod=%ACE%"
                               
                :ACECN
                        start "" "%ArmA%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-mod=%ACE%"       
                                               
:Team
                        start "" "%ArmABeta%" -nosplash -nofilepatching -skipintro -showscripterrors "-maxmem=2047" "-maxvram=1024" "-world=empty" "-cpucount=6" "-mod=%TeamMods%"



Alle Zeitangaben in WEZ +1. Es ist jetzt 00:28 Uhr.

Angetrieben durch vBulletin, Entwicklung von Philipp Dörner & Tobias


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119