If your just after capturing the text output from a script, cmdline redirection is the way to go, but if your trying to capture a graphical (bitmap) representation, then this Re: capture what's on the screen snippet from a while ago may be what you are looking for.
| [reply] |
Hmm... well I don't know about mimicing script's methods, but if you just want to send whatever the program prints you can just do simple redirection (ie. perl script.pl > holdme). But, if it's an interactive program you'll have no idea what it's asking you. Perhaps if you could provide more details on the nature of the program who's output you want to capture and its purpose, perhaps some of the good monks could suggest alternate solutions. Or you could google around for a win port of script (with a name like that it may be tricky though)
Just Another Perl Alchemist
| [reply] [d/l] |
Is simply redirecting the output into a file not sufficient?
| [reply] |
If you are in a position to write an intermediate program which is like script then you might find this article useful.
The bottom line though is that this appears to be somewhat of a holy grail among windows programmers due to the nature of the Console IO there
/J\
| [reply] [d/l] |
Would qx// do what you need? | [reply] |
You can take a screenshot to the clipboard on most Windows machines with the PrintScreen key.
Maybe there is a way you can somehow simulate the 'PrintScreen' key, and then read the contents of the clipboard.
Or maybe direct the user to press the 'PrintScreen' key themselves, and then read the contents of the clipboard. | [reply] |