Console
The console is the engine's own window for diagnosing and trying things out. It shows what the engine reports (problems in your configuration, scripts that failed, plugins that fell back), shows what your scripts print, and has an editor where you can write and run a script on the spot.
Opening the console
Choose Show Console from the tray menu (The tray icon), or run the UIShowConsole builtin from an
action — for example, bind it to a hotkey. Nothing opens the console automatically unless you ask for it with
On Message (below).
If your configuration is password-protected, the console asks for the password when it opens, unless it is still
remembered (Security). While the console is open, the remembered password doesn't run out.
UIShowConsole waits until the console is open, including while the password is asked for, and gives false if
it didn't open, for example because the password prompt was cancelled.
The console is closed with its close button. Closing it frees the memory it used.
The three sections
The buttons across the top ① switch between three sections, each with its own toolbar.
| Section | What it shows | Toolbar |
|---|---|---|
| System | What the engine reports: notes about your configuration from the last load, actions and scripts that failed and why, a plugin that couldn't draw so the built-in drawing took over, and similar. | Copy, Clear, On Message |
| User | Everything your scripts print with UtilityPrint, from every action. | Copy, Clear, On Message |
| Script | A script editor above an output pane. | Execute, Stop All, Hide Console, Script Help, Copy, Paste, Clear |
Copy copies the selected text, or the whole section when nothing is selected. Clear empties the section.
While the Script section is showing, new System and User lines also appear in its output pane, so you can watch a running script without switching sections.
While the console is closed
Lines that arrive while the console is closed aren't lost: they are kept in temporary files and shown the next time you open the console. When Input.Observer exits, they are deleted, except what the Engine shutting down event prints, which the next session's console shows.
On Message ① on the System and User toolbars chooses what a new line does while the console is closed:
| Choice | What happens |
|---|---|
| Do Nothing | The line waits until you open the console. The default. |
| Show UIShowMessageBox | The line also pops up in a message box. |
| Open Console | The console opens on that section. |
With the console open, a new line is simply added; it never pops up a box or switches sections. The same choices are on the Console page as New System messages and New User messages.
Running a script
- Open the console's Script section.
- Type or paste a script in the editor. It uses Input.Observer's script language (Script language).
- Choose Execute ② or press F5. With text selected, only the selection runs; otherwise the whole editor runs.
- The output and any error appear in the output pane under the editor. Hide Console hides or shows that pane.
- A script run here works like an action: every builtin is available, and it runs until it finishes or is stopped. Stop All stops every running script and action, not just this one.
- This is the one place scripts run in Safe Mode, so you can inspect and repair things while nothing else runs (Troubleshooting).
- The editor completes builtin names as you type; Ctrl+Space lists everything, and typing an area name and a period lists that area's builtins. After you choose a builtin, a tip shows its parameters, with the current one highlighted. The right-click menu has Comment and Uncomment for the selected lines.
- The editor's text is kept between sessions in
console.toml.
Script Help ③ opens the script language reference in the help window (The help window), in the language Input.Observer uses (or English when there is no help in that language).
The Console page
Advanced mode. The Console page is hidden in Simple mode. Its settings stay in effect.
The Console page in the configuration window holds the console's settings. They take effect when you choose Apply or Save and close.
| Setting | What it does | Default | Range |
|---|---|---|---|
| Console line limit | Once a section holds this many lines, the oldest are dropped as new ones arrive. 0 keeps everything. Takes effect with the next line. | 5000 lines | 0–1000000 |
| Free memory when the console closes | Gives the console's memory back to Windows as soon as you close it. The next mouse or keyboard event after that can be very slightly slower. | On | On or off |
| New System messages | What a new System line does while the console is closed: Nothing, Message box or Open console (same as On Message above) | Nothing | — |
| New User messages | The same for User lines | Nothing | — |
| Engine window font | Font and size for the console's labels and buttons and for the engine's dialogs (password, license) | Segoe UI, 12 pt | 6–72 pt |
| Engine editor font | Font and size for the console's sections and its script editor | Consolas, 13 pt | 6–72 pt |
An open console keeps its fonts until you close it and open it again.