Difference between revisions of "RunBatchScript"
Jump to navigation
Jump to search
imported>WereWolf (New page: A command for Oblivion Script Extender '''Syntax:''' (nothing) RunBatchScript Runs a specified text file under the Oblivion directory as a script....) |
imported>Scruggs (update with optional second param) |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 2: | Line 2: | ||
'''Syntax:''' | '''Syntax:''' | ||
(nothing) RunBatchScript | (nothing) ''ref.''RunBatchScript filename:string ''runOnRef:bool'' | ||
Runs a specified text file under the Oblivion directory as a script. | '''Example:''' | ||
RunBatchScript "myScripts\script.txt" ; runs script contained in Oblivion\myScripts\script.txt | |||
Runs a specified text file under the Oblivion directory as a script. If the second argument is non-zero, executes the script as if it had been called from the console while the calling reference was selected. | |||
==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. | ||
*Every line in the batch file will run before control passes back to the calling script. | |||
[[Category: Functions]] | [[Category: Functions]] |
Latest revision as of 18:18, 31 August 2010
A command for Oblivion Script Extender
Syntax:
(nothing) ref.RunBatchScript filename:string runOnRef:bool
Example:
RunBatchScript "myScripts\script.txt" ; runs script contained in Oblivion\myScripts\script.txt
Runs a specified text file under the Oblivion directory as a script. If the second argument is non-zero, executes the script as if it had been called from the console while the calling reference was selected.
Notes[edit | edit source]
- 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.