Posted: Mon Feb 17, 2003 7:52 pm
Restored from previous forum. Originally posted by JohanHaegg.
Would be neat if there where some way to link files into the program during compilation and then use them inside the program.
Either a resource-list where files could be included, or
a command that is removed during compilation. The command could then be called somewhat like:
StoreResource("c:\nisse.txt",1);only used in compilation, go nothing to do with the final executable
res = AllocateMemory(0,Len(Resource(1)),0) ;create memory block with size of resource
res = Resource(1) ;store data from resource to variable
PrintN(PeekS(res)) ;print the raw data resource as a string
PrintN(PeekS(Resource(1)) ;same thing, but without variable
res.s = PeekS(Resource(1)) ;and so on
Would be neat if there where some way to link files into the program during compilation and then use them inside the program.
Either a resource-list where files could be included, or
a command that is removed during compilation. The command could then be called somewhat like:
StoreResource("c:\nisse.txt",1);only used in compilation, go nothing to do with the final executable
res = AllocateMemory(0,Len(Resource(1)),0) ;create memory block with size of resource
res = Resource(1) ;store data from resource to variable
PrintN(PeekS(res)) ;print the raw data resource as a string
PrintN(PeekS(Resource(1)) ;same thing, but without variable
res.s = PeekS(Resource(1)) ;and so on