Hi to all,

I am looking how to attache a cmdline tool to a console and controll it then.

1. Is this possible?

2. How do I attache the console to the spawned process?

a) do i first spawn the process and ttache the console
b) do I first launch console and start a process
c) how do I use $CONSOLE->Aloc(); togehter with the process?
Aloc() is ment not to have anny arguments . . . .

My sample code:
#! perl -w

use strict;
use Win32;
use Win32::Console;

my $pid;
my $process = Win32::Spawn('testapp', 'testapp.exe with arguments', $pid);

my $CONSOLE = Win32::Console->new();
$CONSOLE->Alloc();

$CONSOLE->Title("Console Control");
$CONSOLE->Display() or die "Cant display Console";

sleep 30;


__END__

Reply via email to