Embedded Files


As you already know, all EXE files contain several sections. One section is used to store application resources. So why not use it to store files, required for the script? We call this feature - Embedded Files.


To add files, select the "Embedded Files" tab and click the "Add" button. At compile time, all files will be compressed and added to the resources section. After you run the compiled application embedded files will be unpacked before running main script and placed in a temporary folder. The environment variable %MYFILES% contains path to that folder. After running the script all the files will be removed.


For example, you want to display a program manual when you use the -HELP switch. To do this, create a text file "help.txt" with program help and add it in the embedded files. In the main script use this code:

TYPE "%MYFILES%\help.txt" 
PAUSE
Compile the project and run executable from command line with "-HELP" switch. Program will show manual and wait for user input. If the text does not fit on the screen then use the MORE command will be a good idea.