Creating a script that executes in a loop

Feedback
2005-09-13
2012-10-09
  • Paolo Amoroso
    Paolo Amoroso
    2005-09-13

    Here is how to create a script that executes in a loop, i.e. it starts again after it finishes. It may be useful, for example, if Stellarium is used for an unattended multimedia kiosk at a museum or similar setting.

    Suppose your script is called "myscript.sts". As the last action, add a command that reloads it, like this:

    # myscript.sts - This is my script

    .
    . # Various commands
    .

    script filename "myscript.sts" action play

    This requires Stellarium 0.7.0 or later. Press CTRL-C to stop the script.

    Paolo Amoroso

     
    • Johan Meuris
      Johan Meuris
      2005-09-13

      If you come up with good scripts, it could be interesting if I put them on the Stellarium website. Some people might need an example to get started with scripting. Thanks, and keep experimenting!

       
    • Hi (Ciao Paolo)

      Neither the
      <script filename "myscript.sts" action play> function
      nor the
      <image filename "myimage.png" action load > function
      work on my system (Win XP)...

      Any idea ?

      @+
      Vincent

       
    • All the files were in there. I solved the problem : I had to add a blank line ([enter]) after the <script filename "myscript.sts" action play> function...
      That's strange, but now it works !
      And that a real pleasure to play with script in Stellarium...

      @+
      Vincent

       
    • Paolo Amoroso
      Paolo Amoroso
      2005-09-14

      I don't use Windows, so I can only suggest checking that the files are in the correct directories mentioned in this posting by Rob Spearman:

      https://sourceforge.net/forum/message.php?msg_id=3333764

      Paolo Amoroso

       


Anonymous


Cancel   Add attachments