Console Input

BlitzMax Forums/BlitzMax Programming/Console Input

Thareh(Posted 2007) [#1]
Hi,
Anyone knows if its possible to create an 'Input' function that doesn't wait for input?
So it can be used inside a loop, and not lock the application up.

Here's how it is now, the Input functions makes the application wait for you to enter something and press Enter.

(Compile without the 'Build GUI App' option, and don't run in output tab. )

This is how I want it to work, but with the functionality of being able to input while it updates.

(Compile without the 'Build GUI App' option, and don't run in output tab. )

Hope it makes sense,
Thanks :)


Brucey(Posted 2007) [#2]
The quick answer is, yes, it is possible to use no-wait key input on the console.

You'll need to call an OS API, most likely tho. Ask google for more info.

Once I get my curses module finished, that will be another way too - in a cross-platform console-based UI kind of way...


tonyg(Posted 2007) [#3]
ASynchronous Input Function by Pantheon .


Brucey(Posted 2007) [#4]
tony, the only issue with that is that according to the docs, PolledInput is "only available when your program is running in Graphics mode".

So it might not work.. (but then again... :-)


Thareh(Posted 2007) [#5]
Alright, Thanks for the answers.

I've taken a look at the Win32 API Console Functions,
it's kind of hard since I've never worked with Externs before.

But I'll just find out how it works. :)

If anyone already written functions for doing this, please share. :)

Thanks :)