Stop! Forget about getch(), that's a C function, of course...
Try something like this:
PUBLIC SUB Application_Read()
DIM t$ AS String
PRINT "hello there"
READ #LAST, t$, -256
't$ = READ -256
IF t$ <> "" THEN
PRINT t$ & " : ";
END IF
txt = txt & t$
SELECT CASE txt
CASE "b"
PRINT Chr$(27) & "[1m";
CASE ELSE
PRINT "gedrückt:" & txt;
END SELECT
txt = ""
END
Am 15.03.2014 01:03, schrieb Γιώργος Κ:
> Hi! :-)
> Thank you very much for this wonderful project!
>
> I just installed it and giving it a try.
> I have 2 questions, console programming related.
>
> 1) Is there any command Input-like, that allows for a specific number
> of characters input (without pressing Enter)?
> Eg. lets say, I'm presenting the user a Y or N question. What I
> expect, is a single character input (with no need, for pressing
> Enter).
>
> 2) Is there any way for coloring the text (eg. presenting a question
> with red or green letters), other than messing with ncurses?
> Something closer to BASIC tradition, maybe?
> Ncurses is more or less complicated! :-)
>
> TIA! :-)
> Giorgos.
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Gambas-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user