Pathologically Eclectic Rubbish Lister | |
PerlMonks |
in reply to Open a second DOS window
One problem I see is with the console window title bars. The second console gets a nice title "perl", but the original program gets a pretty ugly title, consisting of the whole command line bar the pipe symbol, of the program it just started. It actually appears on the wrong console window. Oh well.
Now it's just a matter of building a tiny module that does whatever needs to be done. In the meantime, you can play with this:
#!perl -wl open FOO, qq[| start "$^X" -lne ] . q["print qq['$_' OK]"]; my $stdout = select FOO; $| = 1; select $stdout; print FOO for qw(one two three); sleep 10; print "Finished";
Update (24 hours later): Oh, damn. Though it works well on Win98, today I've had a chance to try and run it on XP, and it doesn't work there, at all. Perhaps it's a difference between the start executables on both platforms, or else, between the command line interpreters — command.exe vs. cmd.exe.
I'll have to try and use BrowserUK's version, using Windows::Console and avoiding start completely. It works on Win98, and hopefully, it'll work on XP, too. And onb anything in between.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Open a second DOS window (a working possibility)
by BrowserUk (Patriarch) on Oct 09, 2003 at 23:26 UTC |