Using the Console
The console allows you to use nearly every function that is available in the GUI without using your mouse.
It provides multiple hotkeys, a history and a command-complete function to make the usage fast and easy.
The commands are interpreted by the Lua scripting language and you can use the complete Lua language in it.
It is possible to write loops, conditions or even complete functions. You can also define new functions
in the file user.lua, which is loaded at startup. If you wish to load any other Lua file, you can do so with the
"Load Lua File" button.
Using the predefined Commands
You can find a complete list of the predefined commands in the Console Reference.
Every predefined command provides a short description. To see it just type the command and use the -h flag. For example:
show -h
If you are not sure about a command, but know its first character(s), type it in and press Tab. A list of all commands starting
with that letter will show up.
Some commands work without arguments and can be issued by just typing in the name and pressing Enter. For example:
show
clear
Other commands need one or more arguments, which may be optional, to work correctly. All arguments need to be surrounded by
double quotes ("). If multiple arguments are used, they have to be surrounded by parenthesis and separated by commas(",").
For Example:
show "Basic Latin"
show("Basic Latin","Tamil")
hide("Basic Latin","Tamil")
Hints for own functions/scripts
There are a few things you have to pay attention to, when writing own scripts for Unicode Viewer.
- It is possible to use all predefined functions from the console in your own scripts.
- Arguments in your own script have to fulfill the correct Lua syntax,
especially function calls without parenthesis will not work.
- Using print() is a bit difficult, because it is buffered before its printed on the console.
The text will not show up in the console as soon as the print() function is called.
Avoid using it, especially in loops.
- Endless loops can be canceled using Ctrl+N in the console.