Reload PScript Command
Purpose
The Reload Scripts command is used to replace the Pascal scripts stored in memory with new contents from PSCRIPT.TXT file. Normally the PSCRIPT.TXT file is loaded at NOTEFILE startup (if present). Later if you make changes to this file while NOTEFILE is running, you can use this command to reload its contents.
To reload the PSCRIPT.TXT file contents
- From the PScript menu, choose Reload Scripts.
- If there is a file named PSCRIPT.TXT in the same directory as the NOTEFILE executable file, any previously loaded Pascal scripts will be cleared from memory and the scripts from the file will then be loaded. Otherwise, an error message will be displayed.
Note: Only the first 25 scripts in the file will be loaded; the rest will be ignored.
For more information about the PSCRIPT.TXT file, look at the PScript File help topic.
Security
The automatic loading process of the PSCRIPT.TXT file can be
a security risk. For this reason,
a special environment variable named
NOTEFILE can be used to disable this behavior. You can set this
environment variable to contain some strings separated by
colons (:) or semicolons (;). If the string
NOPSCR is present among them, then the automatic loading
at startup will be skipped. However, manually reloading is always possible
later as long as the PSCRIPT.TXT file is present.
Error messages
- Pascal Script File PSCRIPT.TXT not found!
- The PSCRIPT.TXT file should be in the same directory as the NOTEFILE executable file being run. The Linux version of NOTEFILE requires its name to be in lowercase.
- Pascal Script File may not be longer than number bytes.
- There is a 20 KiB limit on the length of the PSCRIPT.TXT file being loaded. If your file exceeds this limit, please remove unneeded scripts from the file or try to simplify its contents.
- Error reading Pascal scripts from PSCRIPT.TXT: System message
- An I/O error occurred while reading the file.