Comments

SonyPJM wrote on 4/17/2003, 2:58 PM
A new feature in 4.0b allows you to simply use the the print function
in JScripts. But you'll need to specify the output file name using a
script configuration file. If your script is named MyScript.js, the
configuration file should be in the same directory and should be named
MyScript.xml. The configuration file should contain the following:


<?xml version="1.0" encoding="UTF-8" ?>
<ScriptSettings>
<PrintOption>Output.txt</PrintOption>
</ScriptSettings>


This specifies that the strings passed to the print function will be
written to the file Output.txt which will be created in the same
directory as the script. The print function is simple, it takes a string
argument and appends it (along with a '\n') to the output file.


Alternatively, you can use the System.IO.File.CreateText method to
write to any file specified in your script or by the script user via a
file dialog (see the .NET Framework docs for more info) . This
approach does not require a script configuration file.
Tofu wrote on 4/17/2003, 4:28 PM
That really helps for understanding how it all works n stuff.
Thanks a bunch!