Console problems
Posted: Sat Mar 04, 2006 10:13 am
Hi all,
I'm using PureBasic 3.94d on Mac OS X 10.3.9.
But I'm having difficulty getting the Console functions to work.
Here's my code (compiled as a 'Console' executable):
It seems that Inkey() never returns anything, no matter which keys are pressed. Also, the example Console program doesn't work either. Is there something I'm doing wrong? Thanks for any help.
I'm using PureBasic 3.94d on Mac OS X 10.3.9.
But I'm having difficulty getting the Console functions to work.
Here's my code (compiled as a 'Console' executable):
Code: Select all
Global char$
Procedure GetChar()
Shared char$
Protected key$
While key$ = ""
key$ = Inkey()
Wend
char$ = key$
EndProcedure
If OpenConsole()
Repeat
GetChar()
If char$ <> ""
PrintN("char$ = " + char$)
char$ = ""
EndIf
ForEver
EndIf
End