Hi folks,

This is a small project I have been circling around for about a year or 
so. It would be a simple command line application that waits for and 
evaluates every keystroke you make.

Some of you were so kind to point me to Application_Read to achieve 
that, but I found it only gives one single keystroke (a Return) and 
(seamingly) is never called again. To make things short, this is the 
core of my application so far:

' Gambas module file

PRIVATE txt AS String



PUBLIC SUB Main()

END


PUBLIC SUB Application_Read()
DIM t$ AS String

   PRINT "hello world" 'this is just debug code

   READ #LAST, t$, -256

     IF t$ <> "" THEN
       PRINT t$ & " : ";
     END IF

     txt = txt & t$

     PRINT "keys are:" & txt;

     txt = ""

END

So, why does "hello world" only appear one single time (after a first 
Return), and why will I never read " : " but only the letters of the 
keys pressed?

On my machine, the whole thing runs within "Konsole" on a graphical 
screen, but I think that will not really make a difference, will it?

Thanks for your help!

Regards

Rolf

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to