Difference between revisions of "RunBatchScript"
Jump to navigation
Jump to search
imported>Haama (There's no info on the console function in the wiki, so putting up some alternative information) |
imported>Scruggs (update) |
||
| Line 7: | Line 7: | ||
==Notes== |
==Notes== |
||
*Because the batch script runs on a temporary script object, it behaves as if each script line was called from the console. Therefore, variable declarations are ignored, and reference functions require an explicit calling reference. |
|||
*The text will run as if it's been injected into that part of the script. For instance, if you have the script |
|||
*Every line in the batch file will run before control passes back to the calling script. |
|||
<pre>scn YourScript |
|||
short YourVar |
|||
begin GameMode |
|||
set YourVar to 0 |
|||
RunBatchScript "Batch.txt" |
|||
printc "YourVar is %g", YourVar |
|||
end</pre> |
|||
and in the text file |
|||
<pre>set YourVar to 1</pre> |
|||
you will see the console message ''YourVar is 1'' in-game. |
|||
[[Category: Functions]] |
[[Category: Functions]] |
||
Revision as of 09:26, 25 November 2007
A command for Oblivion Script Extender
Syntax:
(nothing) RunBatchScript
Runs a specified text file under the Oblivion directory as a script.
Notes
- Because the batch script runs on a temporary script object, it behaves as if each script line was called from the console. Therefore, variable declarations are ignored, and reference functions require an explicit calling reference.
- Every line in the batch file will run before control passes back to the calling script.