Console#
Hint
Use ~ or : to open the console.
Since version 3.6.4, Gaia Sky includes a console feature that offers a text interface to directly call methods in the API from within the app. Both APIv1 and APIv2 are supported.
The console displaying the available API calls.#
From the console, you can call any of the scripting API methods. Additionally, there are a few shortcuts that directly link to API calls. Get a listing of all the available methods and shortcuts directly in the console with
help
You can list only the API (v1 and v2) calls with:
help api
Also, you can list only the methods for a given API version:
help apiv1
help apiv2
APIv2 is modular, so you can also list the methods of a single module:
help apiv2 time
help apiv2 scene
Or only the shortcuts with:
help shortucts
In order to call a method, input the method name (or shortcut), followed by a white spaces and a list of parameters, also white space-separated. For APIv2, the module must prefix the method name, as in time.start_clock. Within a single parameter there may be no spaces, unless it is a string. Strings containing spaces need to be delimited with double-quotes "sample string", otherwise the parsing will fail.
methodName parameter1 parameter2 parameter3
Each parameter may be of the following types:
String— either surrounded by double quotes or not. If the string contains spaces, it must be surrounded by double quotes. For instance,"This is a string"andStringWithoutSpacesare valid strings.double— a double-precision floating point number. May be a simple decimal number (3.24) or in scientific notation (3.24E10).float— a single-precision floating point number. May be a simple decimal number (3.24) or in scientific notation (3.24E10).int— a single-precision integer value.long— a double-precision integer value.boolean— a boolean value, eithertrueorfalse. Do not use capital letters.type[]— an array of any of the types above, in the format[val1,val2,val3,...]. There may be no spaces between the values.
Note
Methods that use non-string object parameters (Runnable, FocusView, Entity, etc.) can’t be used from the console. These methods are not listed in the help command and are not available.