Melchior FRANZ wrote:

* Mike Kopack -- Tuesday 31 January 2006 17:26:
Is there any way through either the HTTP or Telnet Property interfaces
to force a  screenshot to be taken?

That's easy. On a very recent CVS (= development) version write this into
a file $FG_ROOT/Nasal/local.nas:

 INIT = func {
     setlistener("/sim/screenshot", func { fgcommand("screen-capture", 
props.Node.new()) });
 }
 settimer(INIT, 0);



Then set property "/sim/screenshot" via telnet to an arbitrary value.
On older systems you write this into that file and set /sim/screenshot
to a positive value:

 screenshot = nil;
 loop = func {
     if (screenshot.getBoolValue()) {
         fgcommand("screen-capture", props.Node.new());
         screenshot.setBoolValue(0);
     }
     settimer(loop, 0.05);
 }

 INIT = func {
     screenshot = props.globals.getNode("/sim/screenshot", 1);
     screenshot.setBoolValue(0);
     loop();
 }
 settimer(INIT, 0);

If screen-capture is the exposed function name, then you should also be able to just setup the telnet interface, telnet in, and type "run screen-capture".

Curt.

--
Curtis Olson        http://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:        2f585eeea02e2c79d7b1d8c4963bae2d



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to