WaitKey problem

BlitzPlus Forums/BlitzPlus Beginners Area/WaitKey problem

Kyle(Posted 2005) [#1]
Hello, my struggles with this 'simple' language continue. Want to write a simple command line test program that waits for a keypress. It does not work:

Print "Press a key"
WaitKey
Print "done"
End

If I do this in a graphics windows, it does work. (ie. Graphics 640, 480)...


Beaker(Posted 2005) [#2]
That's because without a window or a graphics mode there is nothing to accept the waitkey event.

Just create a little window offscreen if you need to.


Kyle(Posted 2005) [#3]
OK, thanks.


GuoQiang(Posted 2005) [#4]
How to resolve it ?
How to create a litter window offscreen???

put codes please, thanks.


Rck(Posted 2005) [#5]
Print "Press a key"
Graphics 0,0,0,2
WaitKey
Print "done"
End



As I hope you can tell, WaitKey is useless for the console. And the console is only good for simple input and print statements.


GuoQiang(Posted 2005) [#6]
Above codes don't work.


WolRon(Posted 2005) [#7]
It does in B+, but not B3D. At least on my computer...