Bat file calling Bat file?

Post » Mon Dec 06, 2010 6:02 am

Can a .bat files call a .bat.. b/c I get an error like this...

like if I had a text file called:

mainDebug.txt

and it contained the lines:
bat type_of_debug.txt
bat other_type_of_debug.txt

Could I run it and expect the latter 2 bat files to run and preform the lines that they themselves contain? Ok I know that I'd get a script command error.. why? it's not a script command.. the geck even makes sure you know by telling you if you try to compile "bat" in a script.

How to achieve something along these lines?

I was actually going to put a final bat file at the end that would start it over with mainDebug.. thereby getting a loop of constant debug data separated into files (new scof at the start of each bat file). But now I'm stuck. If I can't execute a bat with a bat.. is there another way to autoexecute a bat? or at least only have to do it one? FOSE LABEL/GOTO stuff.. are scirpt commands. some kind of trigger(using the term very loosely) i can use?
User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Mon Dec 06, 2010 12:06 pm

Batch files work by running lines of code one by one as if they were typed into the console. Because of this, you'll have access to all available script and console functions (I assume this also includes "bat", although I haven't tested it specifically), but you won't be able to use any flow control structures such as conditional statements or loops. Also, if one line of code will not compile, the following lines of code will still be run as normal.

If you want to trigger a script that uses flow control structures, you won't be able to use console-only functions, but you can still trigger it easily if you set it up correctly. The easiest way would probably be to create a new quest that is not "Start Game Enabled", which you can start via http://geck.gamesas.com/index.php/StartQuest in the console.

Cipscis
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am


Return to Fallout 3