2025/07/19

Stellarium Script! 🌟


Hello, everyone! 🙌 I recently discovered a super cool script for Stellarium and wanted to share it with the world! 🌌

This script displays all Messier objects in the night sky with their positions and names (labels)! 🤩 I use it every time I want to plan my stargazing sessions and decide which Messier object to photograph on a particular night. It's been a nice companion for my astrophotography journey! 📸

Stellarium with Messier objects labeled

How to Use the Script:

  1. Open the Stellarium software on your computer.
  2. Press the F12 key to open the script menu.
  3. COPY and PASTE the script code below into the script editor.

Why This Script is Useful: This script is a nice tool for both beginners and experienced astronomers. It helps you:


      include("i18n.inc");
      include("common_objects.inc");
      
      LabelMgr.deleteAllLabels();
      MarkerMgr.deleteAllMarkers();
      
      var objName = ["M45","M74","M77","M31","M32","M110","M33","M76","M52","M103",
        "M34","M79","M42","M43","M78","M1","M41","M93","M47","M46",
        "M50","M48","M35","M37","M36","M38","M95","M96","M105","M65",
        "M66","M101","M63","M51","M94","M102","M3","M64","M53","M59",
        "M60","M87","M89","M90","M58","M84","M86","M88","M91","M98",
        "M99","M100","M85","M49","M61","M104","M68","M44","M83","M67",
        "M5","M13","M92","M57","M56","M29","M39","M27","M71","M107",
        "M12","M10","M14","M9","M4","M80","M19","M62","M11","M26",
        "M16","M17","M18","M24","M81","M82","M23","M21","M20","M8",
        "M25","M28","M22","M69","M70","M54","M55","M75","M6","M7",
        "M15","M2","M72","M73","M97","M108","M40","M106","M109","M30"];
      
      for (let i = 0; i < objName.length; i++) {
        LabelMgr.labelObject(objName[i], objName[i], true, 14, "#ff0000", "E", -1.0, "TextOnly", false, 0);
      }
        

After that, just hit the run button and you are good to go! 😀