Personal Notes File

Reload Commands List Command


The Reload Commands List command is used for replacing the list of command titles displayed at the end of the Tools menu. Normally this list is loaded at startup of NOTEFILE if the NOTEFILE.CMD executable file is present in the same directory where NOTEFILE executable is placed. However, if there is some error in the execution of NOTEFILE.CMD, then this loading process is silently aborted and nothing is displayed at the end of the Tools menu.

If you make changes to the NOTEFILE.CMD file while NOTEFILE is running, you may have to reload the list of command titles, so that the end of the Tools menu gets updated with the new list. This is only necessary when the list has changed, but not necessary when the code for a specific command has changed.

To reload the list of command titles from NOTEFILE.CMD executable

  1. From the Tools menu choose Reload Commands List.
  2. If there is an executable file called NOTEFILE.CMD in the same directory as the NOTEFILE executable, it will be run by giving no parameter. It is expected that NOTEFILE.CMD runs with no errors and outputs a list of the parameters and the titles of commands it supports. In such a case, the end of the Tools menu will be populated with the list of command titles. Otherwise, it will remain empty and an error message will be given.

Note: Only the first 25 command titles from the output that are properly formatted will be loaded; the rest will be ignored.

For more information about NOTEFILE.CMD file, look at the Command File help topic.

Error messages

Executable not found: path
Failed to execute: path
The NOTEFILE.CMD file should be in the same directory as the NOTEFILE executable file being run. In Linux its name should be fully in lowercase letters.
Some stderr output and/or non-zero exit code was produced during the execution of NOTEFILE.CMD. If the exit code is equal to zero, then the exit code and stdin (i.e., the selected text) is not displayed and the dialog box displays with information type.