FILE -- open a file for later use (V2.0)
@FILE id, filename$[, table]
This preprocessor command can be used to open a file so you can use it later. The file will not be loaded completely into memory, it will just be opened as if you called OpenFile(). The file will always be opened in read-only mode. You cannot use this preprocessor command to write to files.

The innovative feature of the @FILE preprocessor command is that when you compile your script, the file will be linked to it and you can still access it in the same way as if it were a normal file on your harddisk, i.e. you can use the normal functions of the DOS library on the file.

The third argument is optional. It is a table that can be used to set further options for the operation. The following fields of the table can be used:

Set this field to False if you do not want to have this file linked to your executable/applet when you compile your script. This field defaults to True which means that the file is linked to your executable/applet when Hollywood is in compile mode.

This tag allows you to specify one or more file adapters that should be asked to open the specified file. This must be set to a string containing the name(s) of one or more adapter(s). Defaults to the adapter set using SetDefaultAdapter(). See Loaders and adapters for details. (V6.0)

This tag can be used to specify additional data that should be passed to file adapters. If you use this tag, you must set it to a table of key-value pairs that contain the additional data that should be passed to plugins. See User tags for details. (V10.0)

If you want to open the file manually, please use the OpenFile() command.

a value that is used to identify this file later in the code
the file you want to have opened
optional: a table containing further options
@FILE 1, "Highscore.txt"
The declaration above opens the file "Highscore.txt" for further processing in the script.

Show TOC