A few days ago, I received an email message asking if a Diary addon might be available for Celestia, similar to what was described in a 4th season episode of NCIS. I've managed to implement it for Windows, but I don't have a Mac or Linux system to test it on.
Diary editing is provided in the Addon by a Lua script which runs a text editor and opens a file. Unfortunately, different editors and different commands need to be used under the different operating systems.
Below is a CelX script which implements the necessary functionality under Windows. Although this script is the bare minimum, the entire Addon is more elaborate, including a book that you can goto and unlock.
Code: Select all
celestia:requestsystemaccess()
wait(0)
status = os.execute("start notepad my_diary.txt")
I think an equivalent script for Linux is
Code: Select all
celestia:requestsystemaccess()
wait(0)
status = os.execute("emacs my_diary.txt &")
I would greatly appreciate it if people could test these .celx scripts and let me know if they work. Also, if a Mac user could suggest (and try) an alternative to emacs, it'd help a lot.
Under Windows (after Celestia starts), you'll see a brief flicker as a CMD window opens briefly and then closes. Notepad should then open, asking if you want to create the file "my_diary.txt".
Thanks for whatever help people can provide.