Is running scripts from the OSX terminal possible?

All about writing scripts for Celestia in Lua and the .cel system
Topic author
Shadimius
Posts: 7
Joined: 21.12.2017
With us: 1 year 5 months

Is running scripts from the OSX terminal possible?

Post #1by Shadimius » 22.12.2017, 10:49

Should I be able to run scripts from my OSX terminal? I see on the command line part of the wiki there is nothing about it specifically. Do I need to install something else perhaps (I'm guessing GTK or KDE related, something I don't have a ton of familiarity with, though I have a bit with Linux servers..)?

$ ./Celestia --url build.celx
When I run commands in OSX It starts, but I'm trying to run a Celx script on startup.

Simply running with the --nosplash command doesn't work either.


Thanks!

Avatar
selden
Developer
Posts: 10051
Joined: 04.09.2002
With us: 16 years 9 months
Location: NY, USA

Post #2by selden » 22.12.2017, 21:33

Exactly what is it that you're trying to accomplish?

Describing your goal usually will get helpful suggestions. In your question above, you're asking about a specific solution, which might not be what's appropriate for whatever it is that you're trying do do.

Maybe explicitly specifying your own startup script would do what you want. You can set that in Ceiestia's configuration file celestia.cfg. I dunno where that's stored on a Mac.
Selden

Topic author
Shadimius
Posts: 7
Joined: 21.12.2017
With us: 1 year 5 months

Post #3by Shadimius » 23.12.2017, 18:07

Heya, thanks for the reply. I realize now part of my questions made little sense, sorry about that. Resetting a sleep schedule is apparently a thing. Anyhow..


I figured out it will run on startup by using the command:
./Celestia /Applications/Celestia.app/Contents/Resources/CelestiaResources/demo.cel

So: ./Celestia "the url to script"


I was initially wondering if it was possible or if was just missing from the wiki. So now I want to update the wiki but..
I still can't seem to run scripts in currently open instances of Celestia though. Or get nosplash to work. Or any other os's commandline options that there's info about on the wiki page.

So now I'm wondering if options are there but just undocumented. And if anyone knows of a file I could dig around in to find command line options. I've tried to look around but to no avail. Any direction is appreciated. Cheers!

Avatar
selden
Developer
Posts: 10051
Joined: 04.09.2002
With us: 16 years 9 months
Location: NY, USA

Post #4by selden » 23.12.2017, 19:21

The startup options are somewhat different for the different operating systems and GUIs. You'll have to look in Celestia's source code to find out exactly what's implemented. I'm not sure which file is used for MacOS, but for Celestia v1.6.1, the startup source code files are among those available at https://sourceforge.net/p/celestia/code/HEAD/tree ... er1_6_1/celestia/src/celestia/

I wrote some notes about what I found in the source code a long time ago. Maybe they'll help a little. Those notes are available at https://www.classe.cornell.edu/~seb/celestia/celestia_notes.html
Selden

Topic author
Shadimius
Posts: 7
Joined: 21.12.2017
With us: 1 year 5 months

Post #5by Shadimius » 23.12.2017, 19:46

Cool, thanks! If it doesn't help me now, I know it did a couple years ago when I was first figuring out Celestia. I appreciate it


Return to “Scripting”

Who is online

Users browsing this forum: 1 guest