Two quick question I couldn't find an answer. Is it possible to include an external file from a celx script? It would be very useful.
Is it also possible to execute an external command (like a video player) from a script?
Thank you
Alessio Sangalli
Inlcude and execute
Re: Inlcude and execute
You can include other CELX-scripts by using the "dofile" command - check the Lua documentation for details.manoweb wrote:Is it possible to include an external file from a celx script?
In recent versions of Celestia you can also perform real I/O commands. You first have to request permission using celestia:requestsystemaccess, which will ask the user whether this should be allowed. After this you can use the Lua io & os libraries. Again see the Lua documentation for details.
Is it also possible to execute an external command (like a video player) from a script?
This too is possible with the method described above, but you'll likely have to do some tricks because the command blocks until the external command completes.
Harald