|Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure|
The core scripting language is ECMAScript, giving users access to all basic ECMAScript language features such as flow control, variables string manipulation and so on. Interaction with Stellarium-specific features is done via a collection of objects which represent components of Stellarium itself. See Scripting API for more details.
However StratoScript lacked many features of a real programming language - there were no variables, no flow control and no way to introspect the state of Stellarium.
The replacement scripting engine implemented in the 0.10.x series addresses these shortcomings, at the expense of a little complexity and a new language syntax.
A compatibility mode which converts StratoScript into new scripting engine on the fly is in progress.
Note: StratoScript compatibility is a build-time option. To enable this feature, Stellarium must be built using the ENABLE_STRATOSCRIPT_COMPAT=1 option to cmake.
It is possible to open, edit run and save scripts using the script console window. To toggle the script console, press F12. The script console also provides an output window in which script debugging output is visible.Script Console output window.
core.debug("Hello Universe");LabelMgr module to display "Hello Universe" the screen for 3 seconds.
LabelMgr.labelScreen("Hello Universe", 200, 200, true, 20, "#ff0000"); core.wait(3); LabelMgr.deleteAllLabels();