Page 1 of 1

IncludeBinary?

Posted: Fri May 07, 2004 6:01 pm
by CopperCircle
Hi, is it possible to include a .txt within an exe and then use the ReadString() command to get data from it?

Posted: Fri May 07, 2004 6:17 pm
by Kale
Do it like this:

Code: Select all

Debug PeekS(?File)
Debug "String is " + Str(MemoryStringLength(?File)) + " bytes long."

DataSection
    File:
    IncludeBinary "sample.txt"
EndDataSection
Remember about the >64k issue when using strings. If your strings are bigger than 64k you might run into problems, see: viewtopic.php?t=10759