Scripting Additions Guide

CHAPTER 2
Scripting Addition Commands
Command Definitions 53
more than one short value, Read returns a list of shorts. If the
data is text, you can specify the delimiters used in the data with
the using delimiter parameter, and the Read command
attempts to coerce each item between delimiters to a short.
as boolean
If the data consists of a 1-byte Boolean value, Read returns the
Boolean value. If the data consists of more than one Boolean
value, Read returns a list of Boolean values.
as data Read returns the data as an uninterpreted stream of hexa-
decimal bytes.
You can also specify other types by enclosing the appropriate four-character
code in quotation marks. Here’s an example.
read file "Hard Disk:myFile" as "PICT"
--returns data as type 'PICT'
ERRORS
Error
number Error message
–38 File <<name>> wasn't open.
–39 End of file error.
–50 Parameter error.
–51 File reference number error.
–108 Out of memory.
–1700 Can't make some data into the expected type.
–1701 Some parameter is missing for <commandName>.
–1704 Some parameter was invalid.
–1705 Operation involving a list item failed.
–1715 Some parameter wasn't understood.
–1718 Reply has not yet arrived.