The Console: Command Line and Script Editor
To open the console, choose Tools > Console.
On the left half of the console window you can see 4 areas. Starting from the top, there is the log area, with the history
of the current session; under it there is the input area;
further below the output area, border-less and gray. At the bottom there can be an
optional double row of shortcut buttons.
On the right you can see the controls. This page describes the actions associated with these controls,
but first the actions associated with a few special keys of the keyboard that ease your work.
| Command | Key on the Keyboard |
|---|---|
| Redraw spectrum. Many commands that modify the spectrum don't update the display. | Esc |
| Previous commands. Bring back the previous input instructions in the input area. | Up and Down Arrows |
| Next/Previous line | Control - Arrows |
| New line. | Control - Carriage Return |
| Copy Output to Input. | Page Up or Page Down |
| Execute code. | Return |
| Command | Console Button |
| To apply every command on all the spectra simultaneously. When executing a script, if this option is on, every command is performed on all the open documents before moving on to the next statement. Functions that return a value represent an exception, because they return the value from the foremost spectrum only. |
For All Documents |
| Save the current session (limited to the last 20 statements) in the active document, unless the document already contains a saved script, in which case it will appear in your default editor. | Disk Icon |
| Reload the session saved in a document. | Folder Icon |
| Amplify / De-amplify the spectrum. | Little Arrows |
| Copy the text of the log area (the history of the session). | Copy |
| Consult the list of iNMR commands. The web contains the list of the basic Lua functions. |
Question Mark |
| Resize the Console. | Zoom or Resize |
| Execute the chunk of code in the input field. | Run |
With the command line you have great FREEDOM, including the freedom of doing something irreversible. Since console actions can be irreversible, remember to save your documents frequently. If something goes wrong, you can revert to the most recently saved copy.