I need script help.

22 views
Skip to first unread message

Paul Gilmartin

unread,
Jun 26, 2026, 5:07:28 PM (10 days ago) Jun 26
to Stellarium
[     0.435][INFO] [ This is Stellarium 26.2 (v26.2.0) - https://stellarium.org/ ]
    ...
[     0.436][INFO] Operating System: macOS Sequoia (15.7.7)

I've written a couple small successful scripts by copying and modifying lines
from distributed scripts.  I'm trying to learn more from  17.4 Minimal Scripts.
I copied the following and removed a couple extraneous blanks (Shame o
 LaTeχ for valuing kerning over correctness.)
core.output seems to work as described.  core.debug writes nothing to log.txt.
Am I doing something wrong?

Many distributed scripts show a summary in Configure->Scripts. The "minimal"
example doesn't quite do that.  Are the rules and examples available elsewhere?

// ////////////////////////////////
// Name : guide.ssc
// Author : Paul Filmartin
// License : Public Domain
//
// This script prints “Hello Universe” in the Script Console log window and into log.txt:
core.debug(" Hello Universe ");
// This script prints “Hello Universe” in the Script Console output window and into the file output.txt which
// you will also find in the user data directory. The absolute path to the file will also be given in log.txt.
core.output(" Hello Universe ");
// The file output.txt will be rewritten on each run of Stellarium. In case you need to save a copy of the
// current output file to another file, call
core.saveOutputAs("myImportantData.txt");
core.resetOutput();

--
Thanks,
gil

Georg Zotti

unread,
Jul 2, 2026, 9:43:25 AM (4 days ago) Jul 2
to Stellarium
core.output writes into output.txt. 
core.debug writes into the log tab in the script console, not the regular logfile, unless you enable debug log entries for the Scripting category (See User Guide 6.2.1).

Paul Gilmartin

unread,
Jul 2, 2026, 12:25:42 PM (4 days ago) Jul 2
to stell...@googlegroups.com
On 7/2/26 07:43, Georg Zotti wrote:
> core.output writes into output.txt.
> core.debug writes into the log tab in the script console, not the regular logfile, unless you enable debug log entries for the Scripting category (See User Guide 6.2.1).
>     ...
Thanks.  Not seeing an illustration or a GUI path  to that Console,
I had guest, incorrectly that it was Configuration =>Scripts/

Now I try F12 and see the script console (Why are there both? Conway's Law?)
I can't make it work/
/Applications/Stellarium.app/Contents/MacOS/stellarium
[     0.852][INFO] -------------------------------------------------------------
[     0.852][INFO] [ This is Stellarium 26.2 (v26.2.0) - https://stellarium.org/ ]
[     0.852][INFO] -------------------------------------------------------------
[     0.852][INFO] Operating System: macOS Sequoia (15.7.7)

F12 opens that Console.  Can I  access an existing script?
At the lower right, there is a button. "[...]".  I click it and get a file open dialog.
I navigate, tediously, to [user-dirr]/scripts.  thee all entries are dimmed, forbidden.
I'll try to attach screenshot.

I installed Stellarium as Administrator;  running it from a non-admin account.
Is this configuration unsupported?

Script Console appears to have its own editor.  Can I plug in an editor with which
I'm more comfortable?

--
thanks,
gil
Screenshot 2026-06-26 at 16.14.49.png

Georg Zotti

unread,
Jul 2, 2026, 12:41:45 PM (4 days ago) Jul 2
to Stellarium
you can run scripts from the config menu without editing them, or from the F12 script console. The core.debug() messages are only visible in the console. 
The F12 script console is just an editor window with syntax highlighting and the option to select a bit of code and just run that part. You can use this or any other text editor on your system, but cannot integrate an existing editor into Stellarium.
Sorry, I cannot comment on admin and user rights on Macs. 

Paul Gilmartin

unread,
Jul 2, 2026, 1:21:42 PM (4 days ago) Jul 2
to stell...@googlegroups.com
On 7/2/26 10:41, Georg Zotti wrote:
> you can run scripts from the config menu without editing them, or from the F12 script console. The core.debug() messages are only visible in the console.
> The F12 script console is just an editor window with syntax highlighting and the option to     ...
Thanks.  I am teaching myself with"'[user-dir]/scripts/Minimal.ssc'", line s copied
from guide.pdf.    core.output() writes to output.txt as described.  What are the
exact operations I must do to see its core.debug() in the F12 Console window?

--
Thanks again,
gil

Reply all
Reply to author
Forward
0 new messages