KB1028: How do I insert data into a file using a script?
When working with scripts, assigning to a template variable or using the 'Write'
functions (WriteByte, WriteUByte, WriteInt, WriteUInt, etc.) only overwrites data and
can not be used to insert data to a file. To insert data into a file use the 'InsertBytes' function.
This function inserts bytes with a zero value which can then be filled using
any of the 'Write' functions. For example, the following inserts 4 bytes at address 16:
InsertBytes( 16, 4 );
WriteUInt( 16, 0xffffffff );
Back to knowledgebase index
Back to main support page