Jump to content

[WeiDU] append line of text to end of file being patched


Sam.

Recommended Posts

Is there not a WeiDU command to simply append a line of text to the end of the file currently being patched? APPEND_OUTER is what I want, but I'm not allowed to use it to modify a file I'm already patching...

 

I really do hate WeiDU syntax!

Link to comment

or you can use APPEND_FILE / APPEND_FILE_EVALUATE like this:

<<<<<<<< .../append.txt
blah blah blah
>>>>>>>>

COPY ~foo~ ~foo~
  APPEND_FILE ~.../append.txt~

If you need to create the new file to append as a patch command too than you can use INNER_ACTION.

COPY ~foo~ ~foo~
  INNER_ACTION BEGIN
<<<<<<<< .../append.txt
blah blah blah
>>>>>>>>
  END
  APPEND_FILE ~.../append.txt~
Link to comment

Thanks all!

 

You can do this sort of thing with INSERT_BYTES.

TEXT_SPRINT stuff_to_append ~blah blah blah~
INSERT_BYTES SOURCE_SIZE STRING_LENGTH (~%stuff_to_append%~)
WRITE_ASCIIE SOURCE_SIZE ~%stuff_to_append%~

WeiDU complained about the parenthesis, but in the end I was able to make this do what I wanted.

 

Thanks again,

Sam.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...