Home
Products
Community
Manuals
Contact
Login or Signup

WaitKey problem

BlitzPlus Forums/BlitzPlus Beginners Area/WaitKey problem

Kyle(Posted 1+ years ago) #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 1+ years ago) #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 1+ years ago) #3
OK, thanks.


GuoQiang(Posted 1+ years ago) #4
How to resolve it ?
How to create a litter window offscreen???

put codes please, thanks.


Rck(Posted 1+ years ago) #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 1+ years ago) #6
Above codes don't work.


WolRon(Posted 1+ years ago) #7
It does in B+, but not B3D. At least on my computer...