Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Win32::Console Input Buffer Problem

by dada (Chaplain)
on Jul 22, 2002 at 09:32 UTC ( #183988=note: print w/replies, xml ) Need Help??


in reply to Win32::Console Input Buffer Problem

your problem is that you're creating a console in memory, and this one isn't tied with STDIN. so it has no ways to catch input events. change your new Win32::Console() line to read: new Win32::Console(STD_INPUT_HANDLE) and you'll get the input as you expect.

cheers,
Aldo

__END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;

Replies are listed 'Best First'.
Re: Re: Win32::Console Input Buffer Problem
by osfameron (Hermit) on Jul 22, 2002 at 15:04 UTC
    I have done something similar so many times... I find Win32::Console incredibly confusing though powerful, and I usually cargo-cult my own old scripts, because otherwise it takes me several hours to set up the input and output channels correctly.

    Which is odd, because the module has extensive documentation: I think that it could do with some sort of cookbook though. I'd be interested in helping out with this, if anyone's interested.

    Cheerio!
    Osfameron
    http://osfameron.perlmonk.org/chickenman/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://183988]
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 2022-05-16 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (63 votes). Check out past polls.

    Notices?