screenshot command not working

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Topic author
celestia_user
Posts: 4
Joined: 05.06.2010
With us: 14 years 3 months

screenshot command not working

Post #1by celestia_user » 23.11.2020, 00:49

Hai sir,
screenshot = celestia:takescreenshot("jpg") is not working.

Sequence of commands are as below, please not that all variables in my script are working fine, I wanted to automatically store screenshot images.
obs:gotolonglat(myObject,longtbl[i],lattbl[i],disttbl[1],5)
tdb_dt = celestia:utctotdb(2010, 06, 21, 00, x, y)
celestia:settime(tdb_dt)
screenshot = celestia:takescreenshot("jpg")
pause()
Please help me

Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 29
With us: 15 years 7 months
Location: Suzhou, China

Post #2by Markerz » 23.11.2020, 01:03

Please file the issue here with details of your set up.

https://github.com/CelestiaProject/Celestia/issues

onetwothree
Site Admin
Posts: 705
Joined: 22.09.2018
With us: 5 years 11 months

Post #3by onetwothree » 23.11.2020, 20:12

From celestia.cfg:

Code: Select all

#------------------------------------------------------------------------
# The following parameter is used in Lua (.celx) scripting.
#
#   ScriptScreenshotDirectory defines the directory where screenshots
#   are to be stored. The default value is "", i.e. Celestia's
#   installation directory.
#------------------------------------------------------------------------
  ScriptScreenshotDirectory ""


You should set ScriptScreenshotDirectory to a writeable directory.

Topic author
celestia_user
Posts: 4
Joined: 05.06.2010
With us: 14 years 3 months

Post #4by celestia_user » 23.11.2020, 22:56

I had tried setting directory using for eg: D:\celestia-extras, but actually D:/celestia-extras has to be used. Thanks everyone I could save screenshots.


Return to “Help Central”