Desmond
09-22-2003, 03:02 PM
<HTML><HEAD><TITLE>Writing Text to a File</TITLE></HEAD><BODY><h3>Writing Text to a File</h3><b>Document ID: IR10001</b><hr>The information in this article applies to:<ul><li>AutoPlay Media Studio 5.0 Standard Edition</li><li>AutoPlay Media Studio 5.0 Professional Edition</li></ul><hr><h3>SUMMARY</h3><p>This article describes how to write text to a file.</p><h3>DISCUSSION</h3><p>When writing information to a text file, there are three options:</p><ol><li>We can create a new text file and write our data to it.</li><li>Data can be "added on" to the end of an existing text file, this is known as "appending" a text file.</li><li>Data in an existing text file can be overwritten.</li></ol><p>In AutoPlay Media Studio 5.0, these different options are accomplished by toggling the Append value of the TEXT FILE > WRITE action (a new file will always be created if the target file does not exist).</p><p>As an example, we will write "Hello, my name is John Doe" to a text file, overwriting its contents. This is accomplished with the following action:</p><PRE>TextFile.WriteFromString("c:\text.txt", "Hello, my name is John Doe", false);</pre><h3>MORE INFORMATION</h3><p>For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:</p><ul><li><b>Program Reference | Actions | TextFile | TextFile.WriteFromString</b></li></ul><p>KEYWORDS: AutoPlay Media Studio 5.0, Actions, Write, Text, File, Overwrite, Append, Disk</p><hr><FONT SIZE=1>Last reviewed: September 22, 2003<br>Copyright © 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br></FONT></BODY></HTML>