Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Console Window

by drodinthe559 (Monk)
on Jul 29, 2008 at 21:45 UTC ( #700931=perlquestion: print w/replies, xml ) Need Help??

drodinthe559 has asked for the wisdom of the Perl Monks concerning the following question:

Perl Monks - How do you change the size of the console window when running a perl script on a Windows 2000 station. Below is a snippet of the code that I'm trying to use.
use Win32::Console; my $console = Win32::Console->Size(500,180,300);

Replies are listed 'Best First'.
Re: Console Window
by syphilis (Archbishop) on Jul 30, 2008 at 00:05 UTC
    use warnings; use Win32::Console; $console = Win32::Console->new(); $console->Alloc(); die "Can't Alloc()" if !$console; $console->Size(500, 180, 300); $console->Write('abcdef' x 80); $console->Display(); sleep 5; # After 5 seconds program stops, console vanishes
    What does the 3rd argument to Size() do ? I couldn't find any documentation for it.

    Cheers,
    Rob
      IIRC the number of lines of the scroll buffer, but I can very well be completely wrong.
      []s, HTH, Massa (κς,πμ,πλ)
Re: Console Window
by BrowserUk (Patriarch) on Jul 30, 2008 at 00:10 UTC
Re: Console Window
by pc88mxer (Vicar) on Jul 29, 2008 at 22:21 UTC
    Don't know if this will work for you, but you can check out Win32::Console::ANSI which has a SetConsoleSize() method.
      Is there a better way to do that?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://700931]
Approved by ww
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2023-06-08 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (34 votes). Check out past polls.

    Notices?