Page 1 of 1

screenshot command not working

Posted: 23.11.2020, 00:49
by celestia_user
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

Posted: 23.11.2020, 01:03
by Markerz
Please file the issue here with details of your set up.

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

Posted: 23.11.2020, 20:12
by onetwothree
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.

Posted: 23.11.2020, 22:56
by celestia_user
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.