Screen Capture (Console Mode)


I have a script that runs an external EXE, console mode. Sometimes this EXE aborts.

On those cases, I'd like to capture a kind of a screen shot and send it to me by email. Cause I wanna see the messages it might had issued right before it ended.

@READSCR is not useful cause it can't capture the whole screen.

Other ideas ?

I'm still on version 11....

Thanks !
If he really wants an image ... there's @SNAPSHOT to get a bitmap into the clipboard ... then ...

I've read that this can be done with a windows script (WSC) and that the VB function SavePicture is involved. I found no definitive code. I imagine this will produce a BMP file ... probably pretty big.
My guess is Senhor Baltieri would prefer a text image of the screen. The batch file below might do exactly what he needs:

@echo off
echo %@consoleb[0]
on errormsg savecsb screen.dmp

and use LIST or VIEW to look at screen.dmp

The purpose of the @CONSOLEB[0] funciton is to create a new, empty console buffer, so on completion of the program under test only its output would be in the buffer.

BEWARE! NOT FULLY TESTED! The @consoleb[0] and savecsb do work. ON ERRORMSG should work if the program being tested has an exitcode other than zero (0), which may not occur even when it displays error on screen. Should that be the case, SAVECSB would need to be executed unconditionally.

Similar threads