val = Peek(id, offset[, type, len, endian])
type
specifies the data type for which you want to look. This
can be #BYTE
, #SHORT
, #INTEGER
, #FLOAT
, #DOUBLE
or #STRING
. #BYTE
will
read one byte from the block, #SHORT
reads two bytes, #INTEGER
and #FLOAT
four bytes, #DOUBLE
eight bytes, and #STRING
reads from the memory block
until it encounters a non-graphical character or a NULL
character.
Starting with Hollywood 2.5, you can specify the optional parameter
len
. This parameter can only be used with type #STRING
. If specified,
Peek()
will read exactly len
bytes from the specified memory block
location and return it as a string. You can use this to read raw data
from memory blocks because Peek()
will not terminate at non-graphical
or NULL
characters any more if len
is specified. If len
is 0, which
is the default setting, Peek()
will read bytes until it encounters a
non-graphical or NULL
character.
Starting with Hollywood 6.0 there is a new endian
parameter which
allows you to specify the byte order that should be used when reading
the data from the memory block. This can be set to the following
types:
#BIGENDIAN:
#NATIVEENDIAN:
#LITTLEENDIAN:
#INTEGER
)#STRING
) (defaults to 0 which means read until
a non-graphical or NULL
character) (V2.5)#BIGENDIAN
) (V6.0)#STRING
)