Subject:
[Flightgear-devel] Re: Triggering snapshot via the HTTPD/Telnet interfaces?
From:
Melchior FRANZ <[EMAIL PROTECTED]>
Date:
Tue, 31 Jan 2006 17:47:52 +0100
To:
flightgear-devel@lists.sourceforge.net
To:
flightgear-devel@lists.sourceforge.net

* 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);

m.


  



Ok, I was able to get this to work. Now my last question: How can I either keep the notification dialog box from popping up, or somehow automatically close it after the snapshot is taken so it doesn't appear in the next snapshot I take x seconds later?

Thanks!

--Mike

Reply via email to