Documents / Manual / Table Of Contents

Under construction.


This sections covers all available configuration options.

There should be a "global_cfg.lua" file in the FPSConsole root. This file is currently loaded automatically when FPSConsole starts and it contains all default values for the config options. It also acts as a sample config file.

If you would like to load another config file, use the "load_cfg".


This table can be used to make your own command shortcuts or even new commands (which reuse old ones).

See Commands / Shortcuts and the file "global_cfg.lua" for examples.


Valid variables:


Valid Variables:

User defined keyboard bindings

Defining your own custom keyboard bindings is very easy. Here is an example:

test_binding = 
	kbd_shortcut = "CTRL+Q",
	command = "echo \"this is a test!\"",

As you see, you need to create a new table for every keyboard binding. There are two required variables that need to be defined in the table. They are:


Valid variables:


Valid variables:



Valid tables(bold)/variables:


Generic Syntax

All commands have the same syntax:

command ["arguments"]

Naturally, not all commands take arguments. The quotation marks are needed only if there are spaces or semi-commas in string. I still suggest that they should be used always, since there are some issues with the command parsing. Test and see.


Commands can be chained by adding a semi-comma to the end of the command. Example:

cls; echo "foo"; echo "bar"

The above example first clears the output control with the "cls" command and then prints the string "foo" and "bar" to it.


Command shortcuts can be used to give alternative names to commands or even to make new commands by using the old ones. I will use the following shortcut to explain how they work:

get_o =
	command = "lua \"echo ( get ('__ARGS__') ) \"",
	shortcut = "get_o", 

The "shortcut" variable contains the command that can be used to execute the binded command. The specially formated string "__ARGS__" will get replaced with the arguments that are passed to the shortcut. So the command

get_o "tmp.os"

Would look like

lua \"echo ( get ('tmp.os') ) \"

after parsing.

The above shortcut passes the given argument string to the Lua interpreter. The Lua interpreter then calls the built-in FPSConsole command "get" to retrieve the operating system description. After "get", the OS description is echoed to the output control via another built-in command "echo".


If you will replace the "echo" command with the Lua "print" command, nothing will get printed out. This is because the Lua interpreter is built-in to FPSConsole and not executed as a new process. If it would be executed as a new process, the input/output of the script would be piped to the output control (like when using a Python script with an external Python interpreter.).

Built-In Commands

Some of the built-in commands are pretty straightforward to use but there are also few commands which require their own argument syntax.

We will not go thru every built-in command and I will try to explain how to use them.


Calculates the given statement. Syntax:

calc statement

Since "calc" is directly using the Lua scripting language, you can use all of the mathematical functions (that Lua supports) in the statement! Example:

calc "math.random()+math.random()"

For more information, please refer to the Lua Reference Manual and to the Math Library Tutorial.


Clears the output control.


Echoes the given string to the output control. Syntax:

echo foo

echo "foo with some spaces and a semi-comma;"

Changing the Text Color

The text colour can be changed by adding a backward slash and a hex color value to the string. An example follows:

echo "\#24FF00Some green text!"

Note that currently only the first parsed hex colour is used, others will be ignored (So the first hex colour defines the color for the whole string, no matter where the hex value was.).


Executes the given executable. Syntax:

exec "C:/Path to / the / executable"

Prints out all available fonts. This can be useful when setting up the used font.


Returns the value of the given variable. Syntax:

get tmp.os

get colors.background_output

This command doesn't currently print the requested variable but you can easily fix that. Snippet:

get_o =
	command = "lua \"echo ( get ('__ARGS__') ) \"",
	shortcut = "get_o", 

If you add this to the "command_shortcuts" table in the config file and run it from the application, you will see that it now gets printed out. If you would like this to be the default behavior, just change value of the "shortcut" variable to "get". This will override the built-in "get" command.


Hides the application


Executes Lua statements.

Almost all built-in commands can be used via Lua. Some functions like "calc" are not available since they use Lua them self too. An example on how to execute an built-in function with Lua:

lua "echo ( get ( 'tmp.os' ) )"

The above statement first calls the "get" command to retrieve the current operating system description and then echoes it to the output control.

Files can be executed too:

lua "extensions/about.lua"

You should find the file "about.lua" in the extensions folder.

References: Lua 5.0 Manual


Loads the given config file. Syntax:

load_cfg "C:/path/to/the/config/file.foo"

Exits the application.


Reloads the previously loaded config file.


Restarts the application.


Saves the content of the output control. Syntax/Example:

save "C:/foo/bar.baz"

Sets an config value or an temporary variable. Syntax/Example:

set "keyboard_bindings.hotkey=Q"

set "tmp.foo=bar"

set "command_shortcuts.exit.command=exit"

Temporary variables are not stored to a file so they are valid while the program is running.


Shows the application (which could have been hidden with the "hide" command.). Designed for extensions.


Opens the given file to the output control. Syntax:

view "C:/path/to/the/file"

Sets the active console. Syntax/Usage:

set_active_console "NameOfTheConsole"

Creates a new console with the given name. Syntax/Usage:

new_console "NameOfTheConsole"

Prints out the list of available consoles.


Deletes the console with the given name.


Sets the next console as the active one.


Sets the previous console as the active one.


Tiles consoles horizontally.


Tiles consoles vertically.


Maximizes (and sets active) the console with the given name or the active one if no name was specified.

SourceForge.net Logo
Built With wxWidgets