Pro text/hex editor
with Binary Templates

SweetScape Knowledgebase

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 );



Newsletter - Receive special offers, tips, tricks and news. Join now

010 Editor v15.0 is here!
What's new?



E-mail: info@sweetscape.com