SUMMARY: Screen capture

Ernie Oporto Ernie.Oporto "at" viragelogic.com
Mon, 10 Sep 2001 22:50:23 +0000


I ended up getting a program called AutoIt
(http://www.hiddensoft.com/AutoIt/) to do this script which snaps a screen
capture of just the application window, and then saves it into an area of
the web server.  A PHP page there displays the images with a timestamp of
the last time the image changed.  A bit of a kludge, but it seems to be
working nicely right now.  It only works with IE as the web browser at the
moment, but my next step is to add a line to convert to jpg so everyone can
view it.

Ernie


farm.aut:
---------
start:
IfWinExist, simulation, simulation in progress, Goto, snap
; if we get here, smartspice is not running on the screen
; copy the "No Simulation Window" bitmap
Run, xcopy "G:\\web\\server\\farm\\no_sim.bmp"
"G:\\web\\server\\farm\\%ComputerName%.bmp" /cevyq
Goto, end

snap:
WinActivate, simulation
WinWait, simulation
SEND, #{ALTDOWN}#{PRINTSCREEN}#{ALTUP}
SLEEP, 2000
WinMaximize, untitled - Paint
WinWaitActive, untitled - Paint
SLEEP, 2000
SEND, #{CTRLDOWN}#v#{CTRLUP}
SEND, #{ALTDOWN}#f#{ALTUP}#s
SEND, "G:\\web\\server\\farm\\%ComputerName%.bmp"#{ENTER}#{TAB}#{ENTER}
SLEEP, 2000
SEND, #{CTRLDOWN}#n#{CTRLUP}
SLEEP, 2000
WinMinimize, untitled - Paint
Goto, end



index.php:
----------
<html>
<head>
<title>
    server status
</title>
</head>
<body>
<?
      function figuredatetime ($timestring)
      {
           $time=date( "F d Y H:i:s",$timestring );
           return $time;
      }
      function tableout($machinename)
      {
           echo "<center>" . $machinename . "<br>";
           echo "<img src=\"" . $machinename . ".bmp\"><br>";
           echo "last changed:  " . figuredatetime(filemtime($machinename .
".bmp"));
           echo "</center>";
      }
?>
    <table border=1>
        <tr>
            <td>
                <? tableout("cowboys"); ?>
            </td>
            <td>
                <? tableout("devils"); ?>
            </td>
        </tr>
        <tr>
            <td>
                <? tableout("falcons"); ?>
            </td>
            <td>
                <? tableout("niners"); ?>
            </td>
        </tr>
        <tr>
            <td>
                <? tableout("ravens"); ?>
            </td>
            <td>
                <? tableout("saints"); ?>
            </td>
        </tr>
        <tr>
            <td>
                <? tableout("steelers"); ?>
            </td>
            <td>
                <? tableout("titans"); ?>
            </td>
        </tr>
    </table>
</body>
</html>

> -----Original Message-----
> From: owner-vnc-list "at" uk.research.att.com
> [mailto:owner-vnc-list "at" uk.research.att.com]On Behalf Of Ernie Oporto
> Sent: Wednesday, August 29, 2001 4:17 PM
> To: vnc-list "at" uk.research.att.com
> Subject: Screen capture
>
>
> I'm interested in whether anyone knows of a Win32 app that connects to
> machines running VNCserver and captures an image of the screen to
> save to a
> file.
>
> My main interest is taking images of screens on a Win2k server farm and
> putting them where they can be accessed by a web server.  I've
> been asked to
> allow users to directly connect to the vncservers on those
> machines so they
> can check on the status of running jobs, but I know they'll all be
> perpetually connected and possibly playing with the setup of the machines.
>
> Alternately, if someone knows of a screencap tool that can run at a
> commandline, I could just use the Task Scheduler to get the pic every 5
> minutes.
>
> --
> Ernest A. Oporto, Systems Administrator
> Virage Logic Corporation
> http://www.viragelogic.com
> Perryville Corporate Park, Bldg 3, Clinton, NJ 08809
> Phone:(908)735-1932   Fax:(908)735-1999
> mailto:Ernie.Oporto "at" viragelogic.com
>
> [demime 0.97b removed an attachment of type text/x-vcard which
> had a name of Ernie Oporto.vcf]
> ---------------------------------------------------------------------
> To unsubscribe, send a message with the line: unsubscribe vnc-list
> to majordomo "at" uk.research.att.com
> See also: http://www.uk.research.att.com/vnc/intouch.html
> ---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------