Scripting Additions Guide

CHAPTER 2
Scripting Addition Commands
68 Command Definitions
Write 2
The Write command writes data to a specified file, beginning at the file mark. It
is one of several commands provided by the Read/Write Commands scripting
addition. For more information about these commands, see “Using Read/Write
Commands,” which begins on page 71.
SYNTAX
write dataToWrite
to referenceToFile
[ for bytesToWrite
] ¬
[ starting at startingByte ]
PARAMETERS
dataToWrite The data to be written. The format of the data should match the
file type.
Class: (varies among applications)
referenceToFile
A reference of the form file nameString or alias nameString,
or a file reference number previously obtained with the Open
for Access command (see “Notes”).
Class: Reference or integer
bytesToWrite The number of bytes to write. The Write command returns an
error if you pass a negative number in this parameter.
Class: Integer
–1705 Operation involving a list item failed.
–1708 <reference> doesn't understand the <commandName> message.
–1718 Reply has not yet arrived.
Error
number Error message